我在CentOS 6.5上使用Observium v0.14.4。一切都很好配置,我成功访问该软件(我使用HTTPS进行Web访问)。我按照RHEL / CentOS [1]的指示进行操作。
我正在尝试添加一个主机(“beethoven”),它可以通过ping和fping从Observium机器(“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
但是,当我尝试使用sudo ./add_device.php beethoven.example.com example v2c
添加贝多芬时,我得到:
Try to add beethoven.example.com:
Could not ping beethoven.example.com.
Devices skipped: 1.
Google和DDG没有透露任何有用的解决方案。谢谢!
答案 0 :(得分:2)
我有同样的问题,当我检查ping代码时,因为它正在寻找/ usr / bin中的fping并且我的fping已安装到/ usr / sbin所以我刚刚做了
ln -s /usr/sbin/fping /usr/bin/fping
您可以通过取消注释includes / functions.php
中的第619行来启用ping调试$ping_debug = TRUE; $file = '/tmp/pings_debug.log'; $time = date('Y-m-d H:i:s', time()); /// Uncomment this line for DEBUG isPingable()
显示此日志
# 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:
答案 1 :(得分:1)
尝试编辑工具的Observium配置和设置路径,而不是符号链接(这可能会导致您的发行版包管理器出现问题)。
见这里: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";