check_snmp_int.pl authentication with snmpv3?

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.
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

check_snmp_int.pl authentication with snmpv3?

Post by majed »

what is the correct syntax to authenticate this plugin with snmpv3?

Code: Select all

nagios@nagios /usr/local/nagios/libexec $ ./check_snmp_int.pl -H 10.x.y.z -l username -x pass -X pass -L md5,aes -w 1500,295 -c 2500,400 -k -B --label -k -B --label -n "Tunnel.*"

Put snmp login info!
Usage: ./check_snmp_int.pl [-v] -H <host> -C <snmp_community> [-2] | (-l login -x passwd [-X pass -L <authp>,<privp>) [-p <port>] -n <name in desc_oid> [-i -a -D] [-r] [-f[eSyY]] [-k[qBMGu] -g -w<warn levels> -c<crit levels> -d<delta>] [-o <octet_length>] [-t <timeout>] [-s] --label [-V]
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_int.pl authentication with snmpv3?

Post by tgriep »

It depends in how the device that you are trying to monitor is setup. Can you provide info on how that was done?
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_snmp_int.pl authentication with snmpv3?

Post by ssax »

This one works on mine but tgriep is right, we would need to know how yours is setup (mine is using md5 and des, yours maybe md5 and aes) and the tun1interface:

Code: Select all

./check_snmp_int.pl -H 192.168.4.134 -l snmpv3user -x testpassw -X testpassw -L md5,des -w 1500,295 -c 2500,400 -k -B --label -k -B --label -n "tum1"
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: check_snmp_int.pl authentication with snmpv3?

Post by majed »

amazing, today i tried:

Code: Select all

nagios@nagios /usr/local/nagios/libexec $ ./check_snmp_int.pl -H 10.x.y.z -l username -x pass -X pass -L md5,aes -w 1500,295 -c 2500,400 -k -B --label -k -B --label -n "Port-channel1"
Port-channel1:UP No usable data on file (2 rows) :(1 UP): UNKNOWN
and it works!
it looks like the same command but today it works!
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: check_snmp_int.pl authentication with snmpv3?

Post by majed »

this might be an amateur question but it's been long since i configured nagios.

how to configure the plugin for nagios?
here is my configuration:

Code: Select all

define service {
	use						quick-graph-service	; Inherit values from a template
	host_name				cisco-
	service_description		Port-channel 3 Link to Pri- bandwidth
	check_command 			check_snmp_int_V3!Port-channel3!md5,aes!-k -w 250,500 -c 500,700
	} 

Code: Select all

define command{
  command_name check_snmp_int_V3
  command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -n $ARG1$ -l $USER3$ -x $USER4$ -X $USER4$ -L "$ARG2$,$ARG3$" "$ARG4$,$ARG5$" -s -Y -f -e -r -k
}
i tried several varients but couldn't get past the error:

Code: Select all

2 warning levels for bandwidth checks
if anyone got it configured correctly, do share.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_snmp_int.pl authentication with snmpv3?

Post by ssax »

Change your command to this and try it again:

Code: Select all

define command{
  command_name check_snmp_int_V3
  command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -n $ARG1$ -l $USER3$ -x $USER4$ -X $USER4$ -L "$ARG2$" $ARG3$ -s -Y -f -e -r -k
}
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: check_snmp_int.pl authentication with snmpv3?

Post by majed »

thank you
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: check_snmp_int.pl authentication with snmpv3?

Post by hsmith »

majed wrote:thank you
Did this work for you?

If so, are we all right to close this thread?
Former Nagios Employee.
me.
majed
Posts: 98
Joined: Mon Mar 17, 2014 5:29 am

Re: check_snmp_int.pl authentication with snmpv3?

Post by majed »

now you are asking stubborn questions.
Seek and you shall find, knock and it shall be opened, cry and you shall find comfort
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: check_snmp_int.pl authentication with snmpv3?

Post by tmcdonald »

majed wrote:now you are asking stubborn questions.
@hsmith is a new employee here at Nagios, and as part of the training process we have all new support staff do "Forum Janitor" duties - closing threads, asking if the issues have been resolved, getting low-hanging fruit, etc. His question was perfectly valid - You replied "thank you" which didn't give us any indication of whether or not the issue had been resolved, so he asked for clarification. This is standard procedure for all techs, regardless of how long they have been around. If we did not ask, we would not know whether you require additional assistance or not.

If your issue has been resolved, we would like to close this thread and mark is as "Solved". Otherwise, please tell us specifically what the effects were in regards to:
ssax wrote:Change your command to this and try it again:

Code: Select all

define command{
  command_name check_snmp_int_V3
  command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ -n $ARG1$ -l $USER3$ -x $USER4$ -X $USER4$ -L "$ARG2$" $ARG3$ -s -Y -f -e -r -k
}
and we will continue the troubleshooting process.
Former Nagios employee
Locked