L0j1k
L0j1k

Reputation: 12645

Adding Host in Observium (Cannot Ping)

I am using Observium v0.14.4 on CentOS 6.5. Everything is good to go with configuration and I am successfully accessing the software (I'm using HTTPS for web access). I am following the directions available for RHEL/CentOS [1].

I am attempting to add a host ("beethoven") that is visible via ping and fping from the Observium machine ("mozart"):

[user@mozart observium]$ sudo fping beethoven.example.com
beethoven.example.com is alive
[user@mozart observium]$ sudo ping -c2 beethoven.example.com
... (this works) ...
2 packets transmitted, 2 received, 0% packet loss, time 1001ms

However, when I attempt to add beethoven using sudo ./add_device.php beethoven.example.com example v2c I get:

Try to add beethoven.example.com:
Could not ping beethoven.example.com.
Devices skipped: 1.

Google and DDG don't reveal any helpful solutions. Thanks!

[1] http://www.observium.org/wiki/RHEL_Installation

Upvotes: 2

Views: 12563

Answers (3)

Daniel Benites
Daniel Benites

Reputation: 1

Check if you have snmp installed, I know it sounds dumb, but it happened to me, and after apt install snmp, problem was resolved.

Upvotes: 0

M3NT4L.M4N
M3NT4L.M4N

Reputation: 13

Rather than symlinking (which can cause issues with your distribution's package manager) try editing your Observium config and settings paths for the tools.

See here : Observium : Location Of Executables

$config['rrdtool']        = "/usr/bin/rrdtool";
$config['fping']          = "/usr/bin/fping";
$config['fping6']         = "/usr/bin/fping6";
$config['snmpwalk']       = "/usr/bin/snmpwalk";
$config['snmpget']        = "/usr/bin/snmpget";
$config['snmpbulkwalk']   = "/usr/bin/snmpbulkwalk";
$config['whois']          = "/usr/bin/whois";
$config['ping']           = "/bin/ping";
$config['mtr']            = "/usr/bin/mtr";
$config['nmap']           = "/usr/bin/nmap";
$config['nagios_plugins'] = "/usr/lib/nagios/plugins";
$config['ipmitool']       = "/usr/bin/ipmitool";
$config['virsh']          = "/usr/bin/virsh";

Upvotes: 1

Gareth Hastings
Gareth Hastings

Reputation: 429

I had the same issue and when I checked the ping code it's because it was looking for fping in /usr/bin and my fping was installed into /usr/sbin so I just did

ln -s /usr/sbin/fping /usr/bin/fping

You can enable ping debugging by un-commenting line 619 in includes/functions.php

$ping_debug = TRUE; $file = '/tmp/pings_debug.log'; $time = date('Y-m-d H:i:s', time()); /// Uncomment this line for DEBUG isPingable()

which showed this log

# cat pings_debug.log
2014-08-02 10:16:43 | PING ERROR: firewall (1) | FPING OUT: sh: /usr/bin/fping: No such file or directory
2014-08-02 10:16:43 | PING ERROR: firewall (2) | FPING OUT: sh: /usr/bin/fping: No such file or directory
2014-08-02 10:16:43 | PING ERROR: firewall (3) | FPING OUT: sh: /usr/bin/fping: No such file or directory
MTR OUT:

Upvotes: 2

Related Questions