Search code examples
centos6observium

oservium cannot add_device but can snmpwalk and fping


Even after I made sure fping in config same as whereis fping output, I'm still cannot add any device, even localhost.

I also had made sure that snmpwalk successul before running add_device.php

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 <[email protected]>
]
    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.

Any tips/hints would be great.


Solution

  • Solved by using hostname instead of IP address

    Add hostname entry in /etc/hosts of observium server, then run ./add_device hostname community v2c