SNMP v3 Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
riconeo
Posts: 35
Joined: Mon Oct 14, 2013 8:32 am

SNMP v3 Error

Post by riconeo »

nagios XI version 5.2.9

Nagios XI command:
check_xi_service_snmp! -o .1.3.6.1.4.1.41263.502.0 -P 3 --seclevel=authPriv --secname=nagios --authproto=sha --authpasswd='12345678' --privpasswd='12345678' --protocols=sha,aes -m NUTANIX-MIB

Error on the check:
check usage:
check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D output-delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-x privproto] [-X privpasswd]

Anyone can help on why am I getting this error?

Thanks.

Regards,
Rico Neo
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP v3 Error

Post by lmiltchev »

I believe you need to use "--privproto=sha,aes" instead of "--protocols=sha,aes" in your command. Let us know if changing it makes a difference.
Be sure to check out our Knowledgebase for helpful articles and solutions!
riconeo
Posts: 35
Joined: Mon Oct 14, 2013 8:32 am

Re: SNMP v3 Error

Post by riconeo »

lmiltchev wrote:I believe you need to use "--privproto=sha,aes" instead of "--protocols=sha,aes" in your command. Let us know if changing it makes a difference.
Now i got this error:

Unknown

External command error: Invalid privacy protocol specified after -x flag: sha,aes

USAGE: snmpget [OPTIONS] AGENT OID [OID]...

Version: 5.5
Web: http://www.net-snmp.org/
Email: [email protected]

OPTIONS:
-h, --help display this help message
-H display configuration file directives understood
-v 1
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: SNMP v3 Error

Post by ssax »

Try this:

Code: Select all

check_xi_service_snmp! -o .1.3.6.1.4.1.41263.502.0 -P 3 --seclevel=authPriv --secname=nagios --authproto=SHA --authpasswd='12345678' --privproto=AES --privpasswd='12345678' -m NUTANIX-MIB

Let us know the results.

Thank you
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP v3 Error

Post by lmiltchev »

Try running something like this:

Code: Select all

/usr/local/nagios/libexec/check_snmp -H <ipaddress> -o .1.3.6.1.4.1.41263.502.0 -P 3 -L authPriv -U nagios -X '12345678' -A '12345678' -a SHA -x AES -m NUTANIX-MIB
Be sure to check out our Knowledgebase for helpful articles and solutions!
riconeo
Posts: 35
Joined: Mon Oct 14, 2013 8:32 am

Re: SNMP v3 Error

Post by riconeo »

ssax wrote:Try this:

Code: Select all

check_xi_service_snmp! -o .1.3.6.1.4.1.41263.502.0 -P 3 --seclevel=authPriv --secname=nagios --authproto=SHA --authpasswd='12345678' --privproto=AES --privpasswd='12345678' -m NUTANIX-MIB

Let us know the results.

Thank you
this syntax command is good. I believe there is a bug in the current release for SNMP v3.
Pls fix it so that we do not need to manually change it. :)
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP v3 Error

Post by lmiltchev »

Which of the SNMP wizards did you use to set up your check? I will test it, and file a bug report if it is confirmed. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
riconeo
Posts: 35
Joined: Mon Oct 14, 2013 8:32 am

Re: SNMP v3 Error

Post by riconeo »

lmiltchev wrote:Which of the SNMP wizards did you use to set up your check? I will test it, and file a bug report if it is confirmed. Thanks!
SNMP wizard.

Not the snmp trap or snmp walk, just snmp.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SNMP v3 Error

Post by lmiltchev »

Actually, I was not able to recreate the issue. I ran the SNMP wizard in Nagios XI 5.2.9 (SNMP wizard version 1.5.5), and here's the config that was generated:

Code: Select all

define service {
	host_name			001-test-snmp
	service_description		Uptime
	use				xiwizard_snmp_service
	check_command			check_xi_service_snmp! -o sysUpTime.0 -P 3 --seclevel=authPriv --secname=xxx --authproto=md5 --authpasswd='xxx' --privpasswd='xxx' --privproto=des -l "Uptime"
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	notifications_enabled		1
	contacts			nagiosadmin
	_xiwizard			snmp
	register			1
	}
As you can see, I have "--privproto=" instead of "--protocols="... Are you using the same version of the SNMP wizard? Is your Nagios XI server a "new install" or an upgrade?
Be sure to check out our Knowledgebase for helpful articles and solutions!
riconeo
Posts: 35
Joined: Mon Oct 14, 2013 8:32 am

Re: SNMP v3 Error

Post by riconeo »

lmiltchev wrote:Actually, I was not able to recreate the issue. I ran the SNMP wizard in Nagios XI 5.2.9 (SNMP wizard version 1.5.5), and here's the config that was generated:

Code: Select all

define service {
	host_name			001-test-snmp
	service_description		Uptime
	use				xiwizard_snmp_service
	check_command			check_xi_service_snmp! -o sysUpTime.0 -P 3 --seclevel=authPriv --secname=xxx --authproto=md5 --authpasswd='xxx' --privpasswd='xxx' --privproto=des -l "Uptime"
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	notifications_enabled		1
	contacts			nagiosadmin
	_xiwizard			snmp
	register			1
	}
As you can see, I have "--privproto=" instead of "--protocols="... Are you using the same version of the SNMP wizard? Is your Nagios XI server a "new install" or an upgrade?
I confirmed it is fixed after the snmp wizard is updated from 1.5.2 to 1.5.5.
I am using an upgrade version.

You may close this ticket and thanks for the great support!
Locked