Page 2 of 4
Re: Monitor Netapp device which is using SNMP V3
Posted: Tue Apr 05, 2016 4:10 pm
by tgriep
The second script with the missing arguments message, It looks like you have to use a capital SHA1 for the protocol.
Code: Select all
-a, --authproto authentication protocol (MD5 or SHA1)
Try this and see if it works.
Code: Select all
./check_netapp.pl -H 192.168.23.45 -C public -P 3 -L authPriv -U myuser -a SHA1 -A mypassword -X mypassword -v DISKUSED -o /vol/vol0/ -w 60 -c 70 -t 60
Re: Monitor Netapp device which is using SNMP V3
Posted: Tue Apr 05, 2016 4:16 pm
by arunkrishnan.tvm
I have tried the below command but still getting the "Missing arguments!" error.
Code: Select all
./check_netapp.pl -H 192.168.23.45 -C public -P 3 -L authPriv -U myuser -a SHA1 -A mypassword -X mypassword -v DISKUSED -o /vol/vol0/ -w 60 -c 70 -t 60
Re: Monitor Netapp device which is using SNMP V3
Posted: Tue Apr 05, 2016 4:21 pm
by rkennedy
There could be an if statement that is checking for a 1 or 2c, which means you'll need to modify the perl script even further.
As it's custom plugin, we're limited on the support we can provide. The plugin will need to be updated for full SNMPv3 support.
Re: Monitor Netapp device which is using SNMP V3
Posted: Tue Apr 05, 2016 4:29 pm
by arunkrishnan.tvm
Ok, so I have to just change 2c to 3c in the below if statements, right?
Code: Select all
if( ($opt{'check_type'} eq 'ISCSIOPS') or ($opt{'check_type'} eq 'FCPOPS') ) {
$opt{'version'} = '2c';
}
if ($opt{'version'} eq '2c') {
$used = _get_oid_value($snmp_session,"$snmp_netapp_volume_id_table_df64_used.$oid");
$capacity = _get_oid_value($snmp_session,"$snmp_netapp_volume_id_table_df64_total.$oid");
}
Also what about check command parameters for (username, authprotocol, authpassword, privprotocol, privpassword) ? What letter should I use to call these variables ?
Re: Monitor Netapp device which is using SNMP V3
Posted: Tue Apr 05, 2016 4:47 pm
by Box293
Have a look at the plugin /user/local/nagios/libexec/check_snmp_process.pl as it has all the parameters.
You should be able to use that code example to define the opt arguments etc.
Re: Monitor Netapp device which is using SNMP V3
Posted: Wed Apr 06, 2016 2:00 pm
by arunkrishnan.tvm
Sorry, I have failed to modify the Perl script using the required variables.
Finally found one another plugin in Nagios Exchange with SNMP3 support. When I execute the check command like below I am getting incorrect argument error.
Please help me to correct the command:
https://exchange.nagios.org/directory/P ... p3/details
./check_netapp3.pl -H 192.168.23.4 -P 3 -L authpriv -U myusr -a SHA1 -A mypasswd -X mypasswd -v CPULOAD -w 60 -c 70
Re: Monitor Netapp device which is using SNMP V3
Posted: Wed Apr 06, 2016 2:01 pm
by arunkrishnan.tvm
Following is the error I am getting
Code: Select all
Missing or incorrect arguments!
(SNMP v1, v2c)
./check_netapp3.pl -H ip_address -v variable
[ -P snmp_version ] [ -c community ] [ -p port_number ]
(SNMP v3)
./check_netapp3.pl -H ip_address -v variable -L sec_level -U sec_name
[ -w warn_range ] [ -c crit_range ] [ -c community ] [ -t timeout ]
[ -p port_number ] [ -P 3 ] [ -a auth_proto ]
[ -A auth_passwd ] [ -X priv_passwd ] [-o volume ]
Re: Monitor Netapp device which is using SNMP V3
Posted: Wed Apr 06, 2016 2:20 pm
by arunkrishnan.tvm
Any help please ?
Re: Monitor Netapp device which is using SNMP V3
Posted: Wed Apr 06, 2016 5:01 pm
by hsmith
Bumping your post will not result in a quicker response time. With that being said, does your username or password have any special characters in it that may be messing the syntax up?
Re: Monitor Netapp device which is using SNMP V3
Posted: Wed Apr 06, 2016 5:03 pm
by tmcdonald
arunkrishnan.tvm wrote:Any help please ?
Please be patient - 20 minutes is not a long time to wait for an answer.
Check the case-sensitivity of the
authpriv string you use - looking into the source code it might need to be
authPriv with a capital
P.