New Install, Can't add first device

Hello,

I’m a new user and just deployed a fresh install of LibreNMS today on CentOS 7. I can’t seem to add any of the network devices I need to monitor. LibreNMS comes back with the error “Could not ping 10.0.100.1”. I’ve tried other hosts on the network as well with the same result.

Funny thing is I can ping all these devices from the LibreNMS shell just fine along with performing SNMPwalks. Is there a setting I missed somewhere?

./validate.php

====================================

Component Version
LibreNMS 1.33-18-g1dfcde3
DB Schema 215
PHP 7.1.10
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

====================================

[OK] Database connection successful
[OK] Database schema correct
[WARN] You have not added any devices yet.
[FIX] You can add a device in the webui or with ./addhost.php

1 Like

try adding this to your config.php

$config['fping'] = "/usr/sbin/fping";

Not sure if it’s cool to continue to use this thread, but I was able to ping/fping successfully from the shell before I made that change. Both before and after adding that I still have the same issue. My validate.php results were the same as Joshua_B.

2 Likes

this is a pin poted in discord

If you have devices suddenly showing as down, you need to set $config[‘fping’] = ‘/usr/sbin/fping’; or $config[‘fping’] = ‘/usr/bin/fping’; in your config.php and it will start working again. We fixed a bug where fping always showed up even if the command failed.(edited)

@Kevin_Krumm Thanks! So this fixed the discovery/adding of the device from the shell with ./addhost -b host, but oddly enough I still can’t add through the web gui. I’m fine adding from the shell, but curious if you know why the gui side would still fail?

is it still giving the same message in web ui?

Mine also adds VIA shell, but no SNMP connection is added. Manually adding SNMP doesn’t work either.
Running snmpwalk using the hostname pulls OIDs from the target without a problem in the shell.

run ./daily.sh iirc issues with discovery… so it may help pull those updates.

also, run ./validate.php see if you have any fails of fixes.

Hrm. The cron error is new (after daily.sh)…

====================================

Component Version
LibreNMS 1.33-20-g6fcd406
DB Schema 215
PHP 7.1.10
MySQL 5.5.56-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

====================================

[OK] Database connection successful
[OK] Database schema correct
[FAIL] Discovery has never run.", "Check the cron job

check it in cron and also look at your event log see if have any discovery events in the last 24 hours.

I ran a bunch of the crons manually, with nothing of note happening;
discovery.php -h all
discovery.php -h new
etc, etc.

Cron is running, but the host has only been installed for an hour or so.

librenms.log is remarkably sparse. Nothing much there, 26 lines I could post somewhere but it’s all zero discovery.

there was issue with ping only devices causing discovery to stop. the fix has been pushed. So the discovery for you probably hasn’t run due to that.

Likely. My expectations are that I should a) be able to add hosts (and begin collecting their SNMP stats) manually and b) run discoveries manually. Am I on track with those?

you can try and add the device and then run ./discovery.php -h HOSTNAME

No impact.

./discovery.php -h 10.177.176.106
LibreNMS Discovery
SNMP: Get[0/0.00s] Walk [0/0.00s]
MySQL: Cell[0/0.00s] Row[0/0.00s] Rows[3/0.00s] Column[0/0.00s] Update[0/0.00s] Insert[0/0.00s] Delete[0/0.00s]

is this device in LibreNMS with that as its name?

I tried the hostname as well, same result. Just didn’t want to post the actual host/domain publicly.

remove the device and add it back… sounds like it didn’t add correctly with SNMP.

@Kevin_Krumm Correct. In the web ui it gives the same message as before “could not ping xxx” and fails to add the device. Adding via shell is working perfectly now.

yall may want to pop into discord https://t.libren.ms/discord