Problem SNMP UNKNOWN

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
sofiane
Posts: 19
Joined: Tue Dec 12, 2017 7:05 am

Re: Problem SNMP UNKNOWN

Post by sofiane »

No

PS : I corrected the errors "bad operators", now, there is "error in packet" everywhere
User avatar
rhassing
Posts: 415
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Problem SNMP UNKNOWN

Post by rhassing »

So there are still problems with the MIB files...
The output of:

Code: Select all

snmpget -v2c -c public 127.0.0.1 sysUpTime.0
is still:

Code: Select all

sysUpTime.0: Unknown Object Identifier (Sub-id not found: (top) -> sysUpTime)
And if you would run:

Code: Select all

snmpget -v2c -m ALL -c public 127.0.0.1 sysUpTime.0
Rob Hassing
Image
sofiane
Posts: 19
Joined: Tue Dec 12, 2017 7:05 am

Re: Problem SNMP UNKNOWN

Post by sofiane »

result :

Code: Select all

DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (738966) 2:03:09.66
User avatar
rhassing
Posts: 415
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Problem SNMP UNKNOWN

Post by rhassing »

According to the plugin, you could load all MIB files when using the check:

Code: Select all

 -m, --miblist=STRING
    List of MIBS to be loaded (default = none if using numeric OIDs or 'ALL'
    for symbolic OIDs.)
So if you could change the command file and would add -m ALL to the command, it should work.
commands.cfg
your new command.cfg file
(14.18 KiB) Downloaded 509 times
Rob Hassing
Image
sofiane
Posts: 19
Joined: Tue Dec 12, 2017 7:05 am

Re: Problem SNMP UNKNOWN

Post by sofiane »

I replaced "command.cfg" by the one you gave me. It still doesn't work :?

When I put : ./check_snmp localhost -o 1.3.6.1.2.1.11 -m all


I have

Code: Select all

Erreur d'exécution de commande externe: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-MIB::snmp
User avatar
rhassing
Posts: 415
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Problem SNMP UNKNOWN

Post by rhassing »

When I put : ./check_snmp localhost -o 1.3.6.1.2.1.11 -m all
I'm missing the community and I don't think that's a good oid.
And if you are using OID instead of the names you don't need to load the MIB files
Rob Hassing
Image
sofiane
Posts: 19
Joined: Tue Dec 12, 2017 7:05 am

Re: Problem SNMP UNKNOWN

Post by sofiane »

User avatar
rhassing
Posts: 415
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Problem SNMP UNKNOWN

Post by rhassing »

you are just using the first part of an entire OID. All OID's you want to use with check_snmp should end with 0 (don't just add a zero, but look up the entire OID).
Rob Hassing
Image
sofiane
Posts: 19
Joined: Tue Dec 12, 2017 7:05 am

Re: Problem SNMP UNKNOWN

Post by sofiane »

Hummm Ok. What is the full oid ? :D
User avatar
rhassing
Posts: 415
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Problem SNMP UNKNOWN

Post by rhassing »

.1.3.6.1.2.1.1.3.0 would be a full OID
Rob Hassing
Image
Locked