On 05/08/2010 04:13, Pas wrote:
On 2010.08.05. 4:22, Adam Armstrong wrote:
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?
$ cat /etc/snmp/snmp.conf # # As the snmp packages come without MIB files due to license reasons, loading # of MIBs is disabled by default. If you added the MIBs you can reenable # loaging them by commenting out the following line. mibs : mibdirs +/srv/observium/mibs
== EOF ==
Only change was when I added the mibdirs line. It's the default snmpd for squeeze which pulls the snmp, libsnmp15 and other packages. (It's actually quite bad, snmpd.conf is a mess and the comments are not actually helpful. snmpconf generates a better one, which is surprising, but leaves snmp.conf as it was.)
I'm guessing they put the MIBs into this package: http://packages.debian.org/squeeze/snmp-mibs-downloader , but as this is non-free I wouldn't count on it being installed on every Debian box.
My word, debain can be pretty spectacularly brain-dead at times.
Using this style of idiotic packaging, you can't even query the MIBs the snmp daemon supports as default!
That package doesn't seem to exist on debian lenny, which is the debian system i've tested on before. seems like some idiot at debian was bored and thought they'd make life even harder for people who bother sticking with them.
It almost makes me as angry as network vendors randomly changing how they implement mibs between software releases! (or forgetting to implement some mibs in some releases)
adam.