Page 1 of 1

help with snmp =D

Posted: Tue Nov 22, 2016 2:55 pm
by benhank
Hey guys I need a little help constructing a check command usingg snmp v3. I was given a laundry list of oids to monitor on the target system(s) included in the attachment.
I am trying to poll an Ubuntu Vidyo server.
When I run the following from the cli

Code: Select all

snmpwalk -u Nagios7 -A passscrubbed -a SHA -l authnoPriv 172.30.1.225 -v3
I get

Code: Select all

SNMPv2-MIB::sysDescr.0 = STRING: Linux vidyogw1 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (232655361) 26 days, 22:15:53.6                                        1
SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /opt/vidyo/conf/snmp/snmpd.conf)
SNMPv2-MIB::sysName.0 = STRING: vidyogw1
SNMPv2-MIB::sysLocation.0 = STRING: Unknown (configure /opt/vidyo/conf/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.2 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
 
and more. So I know I can poll successfully.

how do I create a command that will:
1. Properly connect to the server with the credentials supplied
2. Since I have so many items to poll I figure that I should iether
A. create a few checks that will break up the list using the 8 $ARG$ fields in the ccm
or
B. create a check for each oid seperately and pop them into a template
Iether way I dont know how to do anyof this and I welcome any help you guys can give me =D
Thanks in advance!

Re: help with snmp =D

Posted: Tue Nov 22, 2016 3:28 pm
by avandemore
Custom check development is not supported however I can give you a few pointers.

https://mathias-kettner.de/checkmk_localchecks.html
https://exchange.nagios.org/directory/T ... pt/details
http://nagios.manubulon.com/snmp_storage.html

1. check can have credentials hardcoded or passed via arguments.
2. B in general is probably a better route but it depends.

We do offer custom development for a fee, but there are lots of examples on the Internet. Depending on your resources you may want to try there first. If you are interested in custom development, please contact [email protected]

Re: help with snmp =D

Posted: Wed Nov 23, 2016 9:17 am
by benhank
Hey thanks man! those links are far better than what I have found so far! appreciate it!

Re: help with snmp =D

Posted: Wed Nov 23, 2016 11:13 am
by avandemore
Glad it helped. Important points are basically the check return code and if perf data is gathered. Are we good to lock this thread?

Re: help with snmp =D

Posted: Wed Nov 23, 2016 11:43 am
by benhank
yeah I guess so. the hard part is properly constructing the command to poll the server. ill figure it out. lock er up bro! and happy thanksgiving!

Re: help with snmp =D

Posted: Wed Nov 23, 2016 11:48 am
by avandemore
Methodology can vary a lot depending on things, the iReasoning MIB browser is recommended by some Nagios users.

Enjoy your Thanksgiving as well.