Check_VMWARE_API Plugin not working
Re: Check_VMWARE_API Plugin not working
I got it working now
Found it in two other locations
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H Myhost-8 -D MTDatacenter
Usage: check_vmware_api.pl -D <data_center> | -H <host_name> [ -C <cluster_name> ] [ -N <vm_name> ]
-u <user> -p <pass> | -f <authfile>
-l <command> [ -s <subcommand> ] [ -T <timeshift> ] [ -i <interval> ]
[ -x <black_list> ] [ -o <additional_options> ]
[ -t <timeout> ] [ -w <warn_range> ] [ -c <crit_range> ]
[ -V ] [ -h ]
Missing argument: command
Anyone have a valid command as an example?
Found it in two other locations
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H Myhost-8 -D MTDatacenter
Usage: check_vmware_api.pl -D <data_center> | -H <host_name> [ -C <cluster_name> ] [ -N <vm_name> ]
-u <user> -p <pass> | -f <authfile>
-l <command> [ -s <subcommand> ] [ -T <timeshift> ] [ -i <interval> ]
[ -x <black_list> ] [ -o <additional_options> ]
[ -t <timeout> ] [ -w <warn_range> ] [ -c <crit_range> ]
[ -V ] [ -h ]
Missing argument: command
Anyone have a valid command as an example?
Re: Check_VMWARE_API Plugin not working
I got a sample but it errors out.
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H MYHOST-3 -u myroot -p "##########" -l runtime -s status
Undefined subroutine &Nagios::Monitoring::Plugin::plugin_exit called at ./check_vmware_api.pl line 824.
This is line 824 in check_vmware_api.pl
$np->plugin_exit($result, $output);
Any ideas?
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H MYHOST-3 -u myroot -p "##########" -l runtime -s status
Undefined subroutine &Nagios::Monitoring::Plugin::plugin_exit called at ./check_vmware_api.pl line 824.
This is line 824 in check_vmware_api.pl
$np->plugin_exit($result, $output);
Any ideas?
Re: Check_VMWARE_API Plugin not working
Can you upload your plugin on the forum? I would like to test it in house. Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_VMWARE_API Plugin not working
Here it is
Re: Check_VMWARE_API Plugin not working
Make a backup of your original plugin:
Download the plugin below, and place it in the plugins directory.
Test the new plugin to see if it fixes your issue.
Code: Select all
mv check_vmware_api.pl check_vmware_api.pl.backup
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_VMWARE_API Plugin not working
Now working..
Thank you.
do you have any sample checks I can set up?
I ran this one
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l runtime -s status
CHECK_VMWARE_API.PL OK - overall status=green
I tried this
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -D MY-Datacenter -u root -p "############" -l runtime -s status
CHECK_VMWARE_API.PL CRITICAL - Server version unavailable at 'https://TGCSNET-Datacenter:443/sdk/vimService.wsdl' at /usr/share/perl/5.22/VMware/VICommon.pm line 734.
Thank you
Tom
Thank you.
do you have any sample checks I can set up?
I ran this one
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l runtime -s status
CHECK_VMWARE_API.PL OK - overall status=green
I tried this
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -D MY-Datacenter -u root -p "############" -l runtime -s status
CHECK_VMWARE_API.PL CRITICAL - Server version unavailable at 'https://TGCSNET-Datacenter:443/sdk/vimService.wsdl' at /usr/share/perl/5.22/VMware/VICommon.pm line 734.
Thank you
Tom
Re: Check_VMWARE_API Plugin not working
You could try some basic checks as these:
Depending on what you would like to monitor, and what metrics are available, you could "narrow down" the output by using a subcommand ("-s").
Example:
Code: Select all
./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l -l "CPU"
./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l "VMFS"
./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l "IO"
./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l "MEM"
./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l "NET"
./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l "SERVICE"
./check_vmware_api.pl -H MYHOST-3 -u root -p "###############" -l "RUNTIME"
Example:
Code: Select all
[root@main-nagios-xi var]# /usr/local/nagios/libexec/check_vmware_api.pl -H <ip address> -u <username> -p <password> -l "NET"
CHECK_VMWARE_API.PL OK - net receive=1165.00 KBps, send=5918.00 KBps, all 2 NICs are connected | net_receive=1165.00;; net_send=5918.00;; OK_NICs=2;; Bad_NICs=0;;
[root@main-nagios-xi var]# /usr/local/nagios/libexec/check_vmware_api.pl -H <ip address> -u <username> -p <password> -l "NET" -s usage
CHECK_VMWARE_API.PL OK - net usage=5005.00 KBps | net_usage=5005.00;;
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_VMWARE_API Plugin not working
Thank you that's what I was looking for.
The plugin is timing out
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H MYHOST-1 -u root -p "#########" -l "CPU"
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 30s)
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H Myhost-1 -u root -p "############" -l runtime -s status
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 30s)
The plugin is timing out
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H MYHOST-1 -u root -p "#########" -l "CPU"
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 30s)
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H Myhost-1 -u root -p "############" -l runtime -s status
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 30s)
Re: Check_VMWARE_API Plugin not working
Hmm, the default timeout is quite a bit - 30 sec.
There must be some other issue though... Try increasing the verbosity in order to debug the problem:
You could try increasing the timeout to see if this is going to resolve the issue:-t, --timeout=INTEGER
Seconds before plugin times out (default: 30)
Code: Select all
./check_vmware_api.pl -H MYHOST-1 -t 50 -u root -p "#########" -l "CPU"
Code: Select all
./check_vmware_api.pl -H MYHOST-1 -u root -p "#########" -l "CPU" -vvv
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Check_VMWARE_API Plugin not working
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H myhost-2 -t 50 -u root -p "#########" -l runtime -s status -vvv
[extra-opts] check_vmware_api.pl -H muhost-2 -t 50 -u root -p ##My95hog -l runtime -s status -vvv
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 50s)
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H myhost-2 -t 120 -u root -p "##########" -l "CPU" -vvv
[extra-opts] check_vmware_api.pl -H myhost-2 -t 120 -u root -p ##My95hog -l CPU -vvv
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 120s)
Even upping it to 120 still time outs
[extra-opts] check_vmware_api.pl -H muhost-2 -t 50 -u root -p ##My95hog -l runtime -s status -vvv
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 50s)
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H myhost-2 -t 120 -u root -p "##########" -l "CPU" -vvv
[extra-opts] check_vmware_api.pl -H myhost-2 -t 120 -u root -p ##My95hog -l CPU -vvv
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 120s)
Even upping it to 120 still time outs