Environmentals SNMPv3

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
coitop
Posts: 52
Joined: Fri Jul 17, 2020 7:35 am

Environmentals SNMPv3

Post by coitop »

Hello,

I was using below script for polling environmentals from various cisco devices.
https://exchange.nagios.org/directory/P ... on/details

Now all devices have turned to snmpv3 instead of 2 but I cannot make the script work, propably because of the syntax of the command. I have tried everything but I cannot make it work.

Anyone has the same script working with SNMPv3 or knows another script for polling environmental errors?

Thank you
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Environmentals SNMPv3

Post by vtrac »

Hi coitop,
I looked and the v04 (check_cisco_envmon.0.4.pl) has added SNMPv3 supports.

May I see the command and errors you were getting?

Regards,
Vinh
coitop
Posts: 52
Joined: Fri Jul 17, 2020 7:35 am

Re: Environmentals SNMPv3

Post by coitop »

vtrac wrote:Hi coitop,
I looked and the v04 (check_cisco_envmon.0.4.pl) has added SNMPv3 supports.

May I see the command and errors you were getting?

Regards,
Vinh
Hello Vinh,

This is the output I get. Mind you that the same credentials I use, are working for all the other services I have so that is not the issue.

[nagios@nagios libexec]$ ./check_cisco_envmon.0.4.pl -v3 -H <HOST IP> -C authPriv username=<username> authpassword=<authpass> privpassword=<privpass> authprotocol=SHA privprotocol=AES
UNKNOWN: SNMP error: Received usmStatsUnknownUserNames.0 Report-PDU with value 73
[nagios@nagios libexec]$
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Environmentals SNMPv3

Post by vtrac »

Hi coitop,
Looks like your syntax might be wrong.
I looked inside the "check_cisco_envmon.0.4.pl" file and noticed that its used the ":" in the "split" function (below) for your "-C" option:

Code: Select all

elsif ($snmp_version == 3) {
	my ($v3_username,$v3_password,$v3_protocol,$v3_priv_passphrase,$v3_priv_protocol) = split(":",$community);
So, you might want to try the followings:

Code: Select all

From:
./check_cisco_envmon.0.4.pl -v3 -H <HOST IP> -C authPriv username=<username> authpassword=<authpass> privpassword=<privpass> authprotocol=SHA privprotocol=AES

To:

./check_cisco_envmon.0.4.pl -v 3 -H <HOST IP> -C <v3_username>:<v3_password>:<v3_protocol>:<v3_priv_passphrase>:<v3_priv_protocol>
Best Regards,
Vinh
coitop
Posts: 52
Joined: Fri Jul 17, 2020 7:35 am

Re: Environmentals SNMPv3

Post by coitop »

Thank you very much Vihn! As expected it was the syntax but I couldn't figure it...

Issue solved.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Environmentals SNMPv3

Post by scottwilkerson »

coitop wrote:Thank you very much Vihn! As expected it was the syntax but I couldn't figure it...

Issue solved.
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked