SNMP V3 Engine ID Usage

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.
Locked
jczitnik
Posts: 1
Joined: Mon Jul 23, 2012 5:20 pm

SNMP V3 Engine ID Usage

Post 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
newbe
Posts: 17
Joined: Wed Dec 09, 2015 11:10 am
Location: Germany

Re: SNMP V3 Engine ID Usage

Post 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.
User avatar
nozlaf
Posts: 172
Joined: Sun Nov 09, 2014 9:50 pm
Location: Victoria, Australia

Re: SNMP V3 Engine ID Usage

Post 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) 
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
newbe
Posts: 17
Joined: Wed Dec 09, 2015 11:10 am
Location: Germany

Re: SNMP V3 Engine ID Usage

Post 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 ?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: SNMP V3 Engine ID Usage

Post 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.
Former Nagios employee
newbe
Posts: 17
Joined: Wed Dec 09, 2015 11:10 am
Location: Germany

Re: SNMP V3 Engine ID Usage

Post 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!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: SNMP V3 Engine ID Usage

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked