Page 1 of 1

SNMP V3 Engine ID Usage

Posted: Mon Jul 23, 2012 5:34 pm
by jczitnik
Hi, I have to query a few switches using SNMP V3. I need to address the switches (on the same IP Address) via the Engine ID [switch #]. Any idea how to set up the check_snmp command to use the Engine ID?
Thanks, John

Re: SNMP V3 Engine ID Usage

Posted: Tue Mar 08, 2016 6:16 am
by newbe
Hi,

i have same kind of request to pass a ENGINE ID to Nagios, thats why i wont create same topic.


I like to set my host name as ENGINE ID and pass it to Nagios because the Device which is sending SNMPv3 Traps is behind an IAD,
where the IP Adress is changing. Any suggestions are highly appreciated.

Thank you.

Re: SNMP V3 Engine ID Usage

Posted: Tue Mar 08, 2016 6:47 am
by nozlaf
you havent specified what type of switch we are talking about
but assuming its cisco

https://exchange.nagios.org/directory/P ... es/details
try this out

Code: Select all

-e ENGINE-ID	set security engine ID (e.g. 800000020109840301) 
-E ENGINE-ID	set context engine ID (e.g. 800000020109840301) 

Re: SNMP V3 Engine ID Usage

Posted: Tue Mar 08, 2016 8:03 am
by newbe
Thank you for quick reply.

In my case, iam not workin with any switches. So this check_cisco Plugin would not work for me but thanks anyway @noziaf

Does Nagios offer a Service Check for ENGINE ID´s instead of Hostname nor IP Adress ?

Re: SNMP V3 Engine ID Usage

Posted: Tue Mar 08, 2016 11:46 am
by tmcdonald
Nagios needs an IP or hostname in order to perform a SNMP check, otherwise it does not know how to reach the device. If there is some sort of intermediate SNMP manager that Nagios can give an Engine ID to query, that might work, but you would still need a SNMP for that manager device. Otherwise, if you are sending traps in, you may be able to configure the remote machine to include the Engine ID in the SNMP trap. Barring all of that, you will need to find/write a plugin that can query based on Engine ID.

Re: SNMP V3 Engine ID Usage

Posted: Wed Mar 09, 2016 9:07 am
by newbe
tmcdonald wrote:Nagios needs an IP or hostname in order to perform a SNMP check, otherwise it does not know how to reach the device. If there is some sort of intermediate SNMP manager that Nagios can give an Engine ID to query, that might work, but you would still need a SNMP for that manager device. Otherwise, if you are sending traps in, you may be able to configure the remote machine to include the Engine ID in the SNMP trap. Barring all of that, you will need to find/write a plugin that can query based on Engine ID.
Im workin with passive traps included with ENGINE ID's. Ive passed ENGINE ID via SNMPTT ( Perl Embedded handler )as a B* Variable and they are logged fine.
In the localhost definition of Nagios i put the ENGINE ID ( 0x8000000001020304 )as host_name to see if it will work this way. Its not working. Could it be because of submit check result parameter ? :?:

Thank you for your hint with quering on Engine ID. I came across an EXAMPLE on https://metacpan.org/pod/NetSNMP::TrapReceiver. The output of this script includes the engine id.
From here how can i feed Nagios with the ENGINE ID's ?

Thank you!

Re: SNMP V3 Engine ID Usage

Posted: Wed Mar 09, 2016 1:06 pm
by tgriep
Nagios needs an IP or hostname in order to receive a SNMP trap. It uses that to segregate where the check results go.
If you can get the Engine ID information in the message, this may be a way to get what you are looking for.