2

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

L0j1k
  • 12,255
  • 7
  • 53
  • 65
  • after typing this `./add_device.php ` Here I've add new device ip and its community and version. gives this error.. `Observium CE 0.16.1.7533 Add Device(s) Try to add X.X.X.X: Could not resolve X.X.X.X. Devices failed: 1.` BLA BLA BLA ... But when I snmpwalk to that ip it works and gives snmp data `snmpwalk v1 -c abc X.X.X.X X`.(abc is version) what is the wrong that I've done in adding device in to observium.The same problem shows in adding web console.That gives this error message `Could not resolve X.X.X.X.`. – Thusitha Sumanadasa Jun 20 '16 at 10:54

3 Answers3

2

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:
Gareth Hastings
  • 419
  • 1
  • 11
  • 17
  • Broheim! I shall be forever grateful for this answer of yours. Indeed, a symlink to put fping into /usr/bin/ worked to solve the problem. Additionally, the debug information is in the logfile after removing the comment. Thank you so much! – L0j1k Aug 15 '14 at 09:04
  • don't forget to restart httpd too :) – Satish Jul 29 '16 at 21:20
1

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";
M3NT4L.M4N
  • 13
  • 2
0

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

cigien
  • 57,834
  • 11
  • 73
  • 112