On 05/08/2010 03:12, Adam Armstrong wrote:
On 05/08/2010 02:57, Pas wrote:
Hi,
after poking around a little:
includes/functions.php (getHostOS function)
$sysDescr = snmp_get ($device, "sysDescr.0", "-Ovq"); $sysObjectId = snmp_get ($device, "sysObjectID.0", "-Ovqn");
generates the following commands:
/usr/bin/snmpget -v2c -c secretsecret localhost:161 -Ovq -M /srv/observium/mibs/ sysDescr.0 /usr/bin/snmpget -v2c -c secretsecret localhost:161 -Ovqn -M /srv/observium/mibs/ sysObjectID.0
And they're wrong, because the commands lack a "-m SNMPv2-MIB" argument.
$sysDescr = snmp_get ($device, "sysDescr.0", "-Ovq", "SNMPv2-MIB"); $sysObjectId = snmp_get ($device, "sysObjectID.0", "-Ovqn", "SNMPv2-MIB");
Seems to solve the issue.
However, graphs tend to be full of "-nan"s, while the percentage bars are fine.
And doing a " ./poller.php -h all -d 2>&1 | less " shows a lot of these:
UDP/usr/bin/snmpget -v2c -c secretsecret localhost:161 -OQUs -M /srv/observium/mibs/ udpInDatagrams.0 udpOutDatagrams.0 udpInErrors.0 udpNoPorts.0 udpInDatagrams.0: Unknown Object Identifier (Sub-id not found: (top) -> udpInDatagrams) udpOutDatagrams.0: Unknown Object Identifier (Sub-id not found: (top) -> udpOutDatagrams) udpInErrors.0: Unknown Object Identifier (Sub-id not found: (top) -> udpInErrors) udpNoPorts.0: Unknown Object Identifier (Sub-id not found: (top) -> udpNoPorts)
Hmm. net-snmp on your system seems not to automatically load the 'standard' net-snmp MIBs.
I suppose we'll have to start specifying mibs for every command.
Are you using the default net-snmp package for debian?
I have Observium installs on other debian devices and some redhat devices which work ok.
Can you show me the snmp.conf? Has it been changed from default?
Thanks, adam.