Monitor Netapp device which is using SNMP V3
-
arunkrishnan.tvm
- Posts: 28
- Joined: Wed Mar 16, 2016 12:31 am
Monitor Netapp device which is using SNMP V3
I would like to monitor Netapp device which is using SNMP V3. I have tried use some plugins (Perl script) from Nagios Exchange but it is not supporting SNMP V3.
Is there any Nagios Xi plugin can I use to monitor Netapp with following options.
SNMP version: v3
Host
User Name
Authentication Method (usm)
Engine Id
Authentication Protocol
Privacy Protocol
Security Group
Password
Is there any Nagios Xi plugin can I use to monitor Netapp with following options.
SNMP version: v3
Host
User Name
Authentication Method (usm)
Engine Id
Authentication Protocol
Privacy Protocol
Security Group
Password
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitor Netapp device which is using SNMP V3
Is there a particular plugin that you have found that you would like to get working with SNMP v3?
If there is, provide us a link to it, as it shouldn't be very hard to make it work.
If there is, provide us a link to it, as it shouldn't be very hard to make it work.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
arunkrishnan.tvm
- Posts: 28
- Joined: Wed Mar 16, 2016 12:31 am
Re: Monitor Netapp device which is using SNMP V3
Yes, I have already configured the plugin check-netapp-ng.pl
Following is the Nagios Exchange link for this plugin:
https://exchange.nagios.org/directory/P ... NG/details
Following is the Nagios Exchange link for this plugin:
https://exchange.nagios.org/directory/P ... NG/details
Re: Monitor Netapp device which is using SNMP V3
Looking at the plugin, it's establishing a connection here -
The help menu indicates -
With that said, you might be able to modify -V to be equal to '3' as suggested by cpan.
Additionally, if this does not work, other netapp plugins can be found at our Exchange, located here - https://exchange.nagios.org/index.php?o ... ord=netapp
Code: Select all
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => $version, -community => $comm, -timeout => $timeout);
Code: Select all
-V <1|2c> SNMP version (default 1), some checks run only 2c
Can you try to run the plugin with the -V 3 flag and post the full input / output?The -version argument controls which other arguments are expected or required by the session() constructor. The Net::SNMP module supports SNMPv1, SNMPv2c, and SNMPv3. The module defaults to SNMPv1 if no -version argument is specified. The -version argument expects either a digit (i.e. '1', '2', or '3') or a string specifying the version (i.e. 'snmpv1', 'snmpv2c', or 'snmpv3') to define the SNMP version.
Additionally, if this does not work, other netapp plugins can be found at our Exchange, located here - https://exchange.nagios.org/index.php?o ... ord=netapp
Former Nagios Employee
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Monitor Netapp device which is using SNMP V3
If what @rkennedy has suggested doesn't work, he has pointed to the line I was going to.
There's no reason why you (for testing purposes originally) hard code the required parameters.
For example:
Have a look at the plugin /user/local/nagios/libexec/check_snmp_process.pl as it has all the parameters.
Keep in mind, this all assumes the device supports SNMP v3.
There's no reason why you (for testing purposes originally) hard code the required parameters.
For example:
Code: Select all
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => '3', -username => 'the_user_name', -authprotocol => 'SHA', -authpassword => 'the_SHA_string', -privprotocol => 'AES', -privpassword => 'the_SHA_string', -timeout => $timeout);Keep in mind, this all assumes the device supports SNMP v3.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
arunkrishnan.tvm
- Posts: 28
- Joined: Wed Mar 16, 2016 12:31 am
Re: Monitor Netapp device which is using SNMP V3
I have ran the plugin using -V 3 flag. Also edited the Perl script and added the below line with correct details. But when I executing the check command I am getting the error message "Missing -C".
I have found one another plugin which is already supporting SNMP V3. When I executed the the check command I am getting some error message. Am I missing anything in the below command ? Is the command format correct ?
https://nerhood.wordpress.com/2006/06/1 ... giosgraph/
Please help me on this.
Code: Select all
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => '3', -username => 'the_user_name', -authprotocol => 'SHA', -authpassword => 'the_SHA_string', -privprotocol => 'AES', -privpassword => 'the_SHA_string', -timeout => $timeout);I have found one another plugin which is already supporting SNMP V3. When I executed the the check command I am getting some error message. Am I missing anything in the below command ? Is the command format correct ?
https://nerhood.wordpress.com/2006/06/1 ... giosgraph/
Code: Select all
[root@TCVNG01 libexec]# ./check_netapp.pl -H 192.168.23.45 -v DISKUSED -w 60 -c 70 -t 60 -P 3 -L authPriv -U myuser -a sha -A mypassword -X mypassword -o /vol/vol0/
Missing arguments!
check_netapp -H <ip_address> -v variable [-w warn_range] [-c crit_range]
[-C community] [-t timeout] [-p port-number]
[-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-X privpasswd] [-o volume]Re: Monitor Netapp device which is using SNMP V3
Try executing the new plugin you downloaded and add the -C parameter, this represents the community string which will be required.arunkrishnan.tvm wrote:I have ran the plugin using -V 3 flag. Also edited the Perl script and added the below line with correct details. But when I executing the check command I am getting the error message "Missing -C".
Code: Select all
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => '3', -username => 'the_user_name', -authprotocol => 'SHA', -authpassword => 'the_SHA_string', -privprotocol => 'AES', -privpassword => 'the_SHA_string', -timeout => $timeout);
I have found one another plugin which is already supporting SNMP V3. When I executed the the check command I am getting some error message. Am I missing anything in the below command ? Is the command format correct ?
https://nerhood.wordpress.com/2006/06/1 ... giosgraph/
Please help me on this.Code: Select all
[root@TCVNG01 libexec]# ./check_netapp.pl -H 192.168.23.45 -v DISKUSED -w 60 -c 70 -t 60 -P 3 -L authPriv -U myuser -a sha -A mypassword -X mypassword -o /vol/vol0/ Missing arguments! check_netapp -H <ip_address> -v variable [-w warn_range] [-c crit_range] [-C community] [-t timeout] [-p port-number] [-P snmp version] [-L seclevel] [-U secname] [-a authproto] [-A authpasswd] [-X privpasswd] [-o volume]
Based off of Troy's modifications, it looks to be missing the community string which may be needed -
Code: Select all
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => '3', -community => $comm, -username => 'the_user_name', -authprotocol => 'SHA', -authpassword => 'the_SHA_string', -privprotocol => 'AES', -privpassword => 'the_SHA_string', -timeout => $timeout);
Former Nagios Employee
-
arunkrishnan.tvm
- Posts: 28
- Joined: Wed Mar 16, 2016 12:31 am
Re: Monitor Netapp device which is using SNMP V3
Thank you very much rkennedy and Box293
. I can see the details when I execute the check now.
But if I configure another Netapp device with different SNMP parameters (different password and security protocol), then should I change the SNMP settings directly in the Perl script ? because right now below SNMP details are hard coded in the script.
Is there any way to use the same script to monitor multiple Netapp devices and which using different SNMP values ?
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => '3', -username => 'the_user_name', -authprotocol => 'SHA', -authpassword => 'the_SHA_string', -privprotocol => 'AES', -privpassword => 'the_SHA_string', -timeout => $timeout);
About the new Perl script, when I added the -C parameter I am getting the following result:
Code: Select all
[root@TCVNG01 libexec]# ./check-netapp-ng.pl -H 192.168.23.45 -C -V 3c -T DISKUSED -v n3_sata -w 60 -c 70 -t 60
CRIT: DISKUSED n3_sata 86% | n3_sata=109821806579KB;0;0;; n3_sata:perc=86%;60;70;;100
[root@TCVNG01 libexec]# ./check-netapp-ng.pl -H 192.168.23.45 -C -V 3c -T CPULOAD -w 60 -c 70 -t 60
OK: CPULOAD 30% | cpuload=30%;60;70;;But if I configure another Netapp device with different SNMP parameters (different password and security protocol), then should I change the SNMP settings directly in the Perl script ? because right now below SNMP details are hard coded in the script.
Is there any way to use the same script to monitor multiple Netapp devices and which using different SNMP values ?
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => '3', -username => 'the_user_name', -authprotocol => 'SHA', -authpassword => 'the_SHA_string', -privprotocol => 'AES', -privpassword => 'the_SHA_string', -timeout => $timeout);
About the new Perl script, when I added the -C parameter I am getting the following result:
Code: Select all
[root@TCVNG01 libexec]# ./check_netapp.pl -H 192.168.23.45 -C -P 3 -L authPriv -U myuser -a sha -A mypassword -X mypassword -v DISKUSED -o /vol/vol0/ -w 60 -c 70 -t 60
CRITICAL:No response from remote host '192.168.23.45' for .1.3.6.1.4.1.789.1.5.4.1 with snmp version 1Re: Monitor Netapp device which is using SNMP V3
Yeah, you'll need to modify them to use the variables, but possibly only hard code in the -version => '3' part. You could use all of the dynamic variables in the script still, just have to ignore the version part. Essentially this script should be rewritten for SNMPv3 support.
You'll need to specify something after the -C for community, to represent the community string. ./check_netapp.pl -H 192.168.23.45 -C public -P 3 -L authPriv -U myuser -a sha -A mypassword -X mypassword -v DISKUSED -o /vol/vol0/ -w 60 -c 70 -t 60 should work. (provided your community string is the word 'public' - adjust as needed)[root@TCVNG01 libexec]# ./check_netapp.pl -H 192.168.23.45 -C -P 3 -L authPriv -U myuser -a sha -A mypassword -X mypassword -v DISKUSED -o /vol/vol0/ -w 60 -c 70 -t 60
Former Nagios Employee
-
arunkrishnan.tvm
- Posts: 28
- Joined: Wed Mar 16, 2016 12:31 am
Re: Monitor Netapp device which is using SNMP V3
So I have to modify the script like below, right ? Is there any more changes needed ?
Also how should I call the check command after this changes in the script ? What letters should I give for (username, authprotocol, authpassword, privprotocol, privpassword) Like we used V - volume, w - warning, c- critical ?
About another script, I have tried to change the community string to public and private but that time I am getting the old error "Missing arguments!"
Code: Select all
my ($server, $comm, $version, $username, $authprotocol, $authpassword, $privprotocol, $privpassword, $timeout) = @_;
my ($sess, $err) = Net::SNMP->session( -hostname => $server, -version => '3', -username => $username, authprotocol => $authprotocol, -authpassword => $authpassword, -privprotocol => $privprotocol, -privpassword => $privpassword, -timeout => $timeout);About another script, I have tried to change the community string to public and private but that time I am getting the old error "Missing arguments!"
Code: Select all
[root@TCVNG01 libexec]# ./check_netapp.pl -H 192.168.23.45 -C public -P 3 -L authPriv -U myuser -a sha -A mypassword -X mypassword -v DISKUSED -o /vol/vol0/ -w 60 -c 70 -t 60
Missing arguments!
check_netapp -H <ip_address> -v variable [-w warn_range] [-c crit_range]
[-C community] [-t timeout] [-p port-number]
[-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A authpasswd] [-X privpasswd] [-o volume]