Hello,
I'm trying to get specific SNMP info from a host,
diskusage from an ESXi server to be exact.
I have been struggling to get this check_snmp_generic plugin from
exchange.nagios.org to work in Nagwin.
I have already put other perl plugins in Nagwin which work fine.
I can run check_snmp_generic.pl just fine from the command prompt,
but when I put it in Nagwin, I get a red critical line, and (null) as output.
I already tried various changes in my commands.cfg and host.cfg, I also carefully
re-typed the configs, but no avail.
I also tried pl2bat to run the plugin as a bat,
that returns a yellow warning line in Nagwin, also with (null) as output.
I just don't get why the plugin won't work in Nagwin,
but runs just fine in the command prompt and also in the Nagwin bash.
Try to give the service account admin privileges.
Thanks for the reply tk,
however, Nagwin already runs with admin privileges.
Is there a way that I can see "verbose" output from the plugin running in Nagwin,
or any more details about the execution of the plugin than just null?
Have a look at var/log directory. Stdout and stderr log files for Nagwin can give you some hints.
The nagios-stderr.log file indeed has some extra info:
Can't open perl script "/plugins/check_snmp_generic.pl": No such file or directory
But the plugin name is correct.
I'm now trying different solutions:
- Entering full path in commands.cfg;
- Changing Perl path on top of pl script;
- ...
Nothing seems to be working so far.
Can you publish your plugin and service/command definitions you use ?
Here's the plugin I use,
here's the command:
# Check SNMP Generic command definition
define command{
command_name check_snmp_generic
command_line $USER1$/check_snmp_generic.pl -H $HOSTADDRESS$ -N "-v 2c -c public" -d $ARG1$ -l $ARG2$ -u $ARG3$ -w $ARG4$ -c $ARG5$ $ARG6$
}
Here's the service:
define service{
use generic-service
host_name VMware ESXi 01
service_description Diskusage Disk 2
check_command check_snmp_generic!Usage:!usage!MB!55000!58000!1.3.6.1.2.1.25.2.3.1.6.2
}
And here's the full command + output in cmd:
C:\Program Files (x86)\Nagwin\plugins>check_snmp_generic.pl -H 0.0.0.0 -N "-v 2c -c public" -d "Usage:" -l usage -u MB -w 55000 -c 58000 1.3.6.1.2.1.25.2.3.1.6.2
OK - Usage: 38954MB | usage=38954MB;55000;58000;;
A copy or a link to the pluging itself will be fine.
Here's a direct link to the plugin:
http://exchange.nagios.org/components/com_mtree/attachment.php?link_id=1...
Have you been able to spot the problem, tk? Does the plugin work for you?
Do you maybe know of an alternative script to monitor VMware diskusage in Nagios?