oservium不能add_device但可以snmpwalk和fping

时间:2015-12-15 15:55:15

标签: centos6 observium

即使我确保配置中的fping与whereis fping输出相同,我仍然无法添加任何设备,甚至是localhost。

在运行add_device.php

之前,我还确保了snmpwalk的成功

OS:Centos 6 amd64

[root@nms observium]# ./add_device.php -d 127.0.0.1 public v2c 
DEBUG!
Observium CE 0.15.6.6430
Add Device(s)

Wrong process status! Try fix..

CMD[/opt/observium/scripts/distro]
EXITCODE[0]
RUNTIME[0.0295s]
STDOUT[
Linux|2.6.32-573.8.1.el6.x86_64|amd64|CentOS|6.7
]

CMD[/usr/bin/env python --version 2>&1]
EXITCODE[0]
RUNTIME[0.039s]
STDOUT[
Python 2.6.6
]

SQL[SELECT version()]
RUNTIME[0.01287103s]

CMD[/usr/bin/snmpget --version 2>&1]
EXITCODE[0]
RUNTIME[0.0169s]
STDOUT[
NET-SNMP version: 5.5
]

CMD[/usr/bin/rrdtool --version |head -n1]
EXITCODE[0]
RUNTIME[0.0891s]
STDOUT[
RRDtool 1.3.8  Copyright 1997-2009 by Tobias Oetiker <tobi@oetiker.ch>
]
    Software versions:
  OS:        Linux 2.6.32-573.8.1.el6.x86_64 [amd64] (CentOS 6.7)
  PHP:       5.3.3
  Python:    Python 2.6.6
  MySQL:     5.1.73
  SNMP:      NET-SNMP 5.5
  RRDtool:   1.3.8

Try to add 127.0.0.1:

SQL[SELECT COUNT(*) FROM `devices` WHERE `hostname` = '127.0.0.1']
RUNTIME[0.04451895s]
Could not resolve 127.0.0.1.
Devices failed: 1.

任何提示/提示都会很棒。

1 个答案:

答案 0 :(得分:0)

使用主机名而不是IP地址解决

在observium服务器的/ etc / hosts中添加主机名条目,然后运行./add_device hostname community v2c