Check_VMWARE_API Plugin not working

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

Re: Check_VMWARE_API Plugin not working

Postby kwhogster » Fri Apr 05, 2019 1:45 pm

Is this the same version of ESXi/VSphere server as the rest of them (that are working)? Yes all but one I have 9 ESXI hosts 8 6.5 1 6.0
This is an ESXI 6.5 Host having the issue all other hosts work great.

Are the permissions of the user the same? Yes same userid Root and same password I logon to each host or thru vCenter.

Do any other checks work? Yes on the same host I do CPU hardware Check IO check Memory Check network check runtime check service check they all are reporting fine

Do you see the datastores when you log in the server with the same credentials? Yes


Try running:

Will post later but last night when I tried I received no response from any command line on this host had to control break each try
kwhogster
 
Posts: 578
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Check_VMWARE_API Plugin not working

Postby lmiltchev » Fri Apr 05, 2019 4:31 pm

Will post later but last night when I tried I received no response from any command line on this host had to control break each try

Whenever you are ready.

Can you also run the commands below, and post the output?
Code: Select all
dpkg -l | grep libwww-perl
cpan -a | grep libwww-perl
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12447
Joined: Mon May 23, 2011 12:15 pm

Re: Check_VMWARE_API Plugin not working

Postby kwhogster » Fri Apr 05, 2019 7:32 pm

root@tgcs017:~# dpkg -l | grep libwww-perl
ii libwww-perl 6.15-1 all simple and consistent interface to the world-wide web
root@tgcs017:~# cpan -a | grep libwww-perl

LWP 6.15 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Authen::Basic undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Authen::Digest undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Authen::Ntlm 6.15 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::ConnCache 6.15 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Debug undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::DebugFile undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::MemberMixin undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol 6.15 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::cpan undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::data undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::file undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::ftp undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::gopher undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::http undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::loopback undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::mailto undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::nntp undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Protocol::nogo undef 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::RobotUA 6.15 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::Simple 6.15 6.38 OALDERS/libwww-perl-6.38.tar.gz
LWP::UserAgent 6.15 6.38 OALDERS/libwww-perl-6.38.tar.gz
root@tgcs017:~#

root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "##xxxxxxxxx" -l mem
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 30s)

root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "##xxxxxxxxxxx" -l cpu
CHECK_VMWARE_API.PL OK - cpu usage=298.00 MHz (6.23%) | cpu_usagemhz=298.00;; cpu_usage=6.23%;;

root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "############" -l runtime
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 30s)

root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "##xxxxxxxx" -l vmfs
CHECK_VMWARE_API.PL UNKNOWN - plugin timed out (timeout 30s)


See image showing all esxi hosts working except for this one

esxi.PNG
showing all others


Any ideas?
kwhogster
 
Posts: 578
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Check_VMWARE_API Plugin not working

Postby lmiltchev » Mon Apr 08, 2019 11:30 am

It seems like the cpu check is working but the mem, runtime, and vmfs are all timing out... Can you verify that you are using the same credentials?

Can you also upload the plugin that you are using on the forum? Since you modified it a few times, we would like to view it, and compare it to the one that we are using in-house. Thanks!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
QA Manager
 
Posts: 12447
Joined: Mon May 23, 2011 12:15 pm

Re: Check_VMWARE_API Plugin not working

Postby kwhogster » Tue Apr 09, 2019 7:21 am

Thanks

Sorry for the delay been sick lately.

Here it is

check_vmware_api.pl
check_vmware_api.pl
(166.42 KiB) Downloaded 128 times



FYI.
It did start working on Saturday but is back again today with same error

Thanks again
kwhogster
 
Posts: 578
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Check_VMWARE_API Plugin not working

Postby npolovenko » Tue Apr 09, 2019 5:00 pm

@kwhogster, Please run these commands and show us the output:
/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "############" -l runtime -t 200


/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "##xxxxxxxx" -l vmfs -t 200
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
npolovenko
Support Tech
 
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Check_VMWARE_API Plugin not working

Postby kwhogster » Tue Apr 09, 2019 6:30 pm

root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "##########" -l runtime -t 200
Use of uninitialized value $subcommand in string ne at ./check_vmware_api.pl line 1899.
CHECK_VMWARE_API.PL OK - 4/15 VMs up, overall status=green, connection state=connected, maintenance=no, 35 health issue(s), no config issues | vmcount=4units;; health_issues=35;; config_issues=0;;
root@tgcs017:/usr/local/nagios/libexec# ./check_vmware_api.pl -H TGCSESXI-1 -u root -p "##########" -l vmfs -t 200

CHECK_VMWARE_API.PL CRITICAL - SOAP request error - possibly a protocol issue: S SL read timeout: at /usr/share/perl5/Net/HTTP/Methods.pm line 278.
at /usr/lib/x86_64-linux-gnu/perl5/5.22/Net/SSL.pm line 191.
Net::SSL::die_with_error(LWP::Protocol::https::Socket=GLOB(0x3c9e4f8), " SSL read timeout") called at /usr/lib/x86_64-linux-gnu/perl5/5.22/Net/SSL.pm lin e 198
Net::SSL::__ANON__("ALRM") called at /usr/lib/x86_64-linux-gnu/perl5/5.2 2/Net/SSL.pm line 202
eval {...} called at /usr/lib/x86_64-linux-gnu/perl5/5.22/Net/SSL.pm lin e 202
Net::SSL::read(LWP::Protocol::https::Socket=GLOB(0x3c9e4f8), "HTTP/1.1 2 00 OK\x{d}\x{a}Date: Tue, 9 Apr 2019 23:04:39 GMT\x{d}\x{a}Cache-Co"..., 1024, 2 048) called at /usr/share/perl5/Net/HTTP/Methods.pm line 278
Net::HTTP::Methods::my_readline(LWP::Protocol::https::Socket=GLOB(0x3c9e 4f8), "Status") called at /usr/share/perl5/Net/HTTP/Methods.pm line 397
Net::HTTP::Methods::read_response_headers(LWP::Protocol::https::Socket=G LOB(0x3c9e4f8), "laxed", 1, "junk_out", ARRAY(0x2e983f8)) called at /usr/share/p erl5/LWP/Protocol/http.pm line 426
LWP::Protocol::http::request(LWP::Protocol::https=HASH(0x3d415e0), HTTP: :Request=HASH(0x3d289e8), undef, undef, undef, 180) called at /usr/share/perl5/L WP/UserAgent.pm line 192
eval {...} called at /usr/share/perl5/LWP/UserAgent.pm line 191
LWP::UserAgent::send_request(LWP::UserAgent=HASH(0x3c913c0), HTTP::Reque st=HASH(0x3d289e8), undef, undef) called at /usr/share/perl5/LWP/UserAgent.pm li ne 274
LWP::UserAgent::simple_request(LWP::UserAgent=HASH(0x3c913c0), HTTP::Req uest=HASH(0x3d289e8), undef, undef) called at /usr/share/perl5/LWP/UserAgent.pm line 282
LWP::UserAgent::request(LWP::UserAgent=HASH(0x3c913c0), HTTP::Request=HA SH(0x3d289e8)) called at /usr/share/perl/5.22/VMware/VICommon.pm line 2398
SoapClient::request(SoapClient=HASH(0x3c9dfd0), "RetrieveProperties", "< _this type=\"PropertyCollector\">ha-property-collector</_this>"..., "\"urn:vim25 /6.5\"") called at (eval 43) line 8275
VimService::RetrieveProperties(VimService=HASH(0x2e2f718), "_this", Mana gedObjectReference=HASH(0x3ca8ab8), "specSet", PropertyFilterSpec=HASH(0x3d27568 )) called at /usr/share/perl/5.22/VMware/VICommon.pm line 1862
ViewBase::update_view_data(Datastore=HASH(0x2cbc6a8), ARRAY(0x27be538)) called at /usr/share/perl/5.22/VMware/VICommon.pm line 1705
Vim::get_view("mo_ref", ManagedObjectReference=HASH(0x3d338a0), "propert ies", ARRAY(0x27be538)) called at ./check_vmware_api.pl line 1211
CheckVMwareAPI::datastore_volumes_info(ARRAY(0x3d33af8), Nagios::Monitor ing::Plugin=HASH(0x2316b10), undef, undef, undef, undef) called at ./check_vmwar e_api.pl line 1885
CheckVMwareAPI::host_list_vm_volumes_info(undef, Nagios::Monitoring::Plu gin=HASH(0x2316b10), undef, undef, undef, undef) called at ./check_vmware_api.pl line 698
eval {...} called at ./check_vmware_api.pl line 580
CheckVMwareAPI::main() called at ./check_vmware_api.pl line 827
at /usr/lib/x86_64-linux-gnu/perl5/5.22/Net/SSL.pm line 202.
Net::SSL::read(LWP::Protocol::https::Socket=GLOB(0x3c9e4f8), "HTTP/1.1 2 00 OK\x{d}\x{a}Date: Tue, 9 Apr 2019 23:04:39 GMT\x{d}\x{a}Cache-Co"..., 1024, 2 048) called at /usr/share/perl5/Net/HTTP/Methods.pm line 278
Net::HTTP::Methods::my_readline(LWP::Protocol::https::Socket=GLOB(0x3c9e 4f8), "Status") called at /usr/share/perl5/Net/HTTP/Methods.pm line 397
Net::HTTP::Methods::read_response_headers(LWP::Protocol::https::Socket=G LOB(0x3c9e4f8), "laxed", 1, "junk_out", ARRAY(0x2e983f8)) called at /usr/share/p erl5/LWP/Protocol/http.pm line 426
LWP::Protocol::http::request(LWP::Protocol::https=HASH(0x3d415e0), HTTP: :Request=HASH(0x3d289e8), undef, undef, undef, 180) called at /usr/share/perl5/L WP/UserAgent.pm line 192
eval {...} called at /usr/share/perl5/LWP/UserAgent.pm line 191
LWP::UserAgent::send_request(LWP::UserAgent=HASH(0x3c913c0), HTTP::Reque st=HASH(0x3d289e8), undef, undef) called at /usr/share/perl5/LWP/UserAgent.pm li ne 274
LWP::UserAgent::simple_request(LWP::UserAgent=HASH(0x3c913c0), HTTP::Req uest=HASH(0x3d289e8), undef, undef) called at /usr/share/perl5/LWP/UserAgent.pm line 282
LWP::UserAgent::request(LWP::UserAgent=HASH(0x3c913c0), HTTP::Request=HA SH(0x3d289e8)) called at /usr/share/perl/5.22/VMware/VICommon.pm line 2398
SoapClient::request(SoapClient=HASH(0x3c9dfd0), "RetrieveProperties", "< _this type=\"PropertyCollector\">ha-property-collector</_this>"..., "\"urn:vim25 /6.5\"") called at (eval 43) line 8275
VimService::RetrieveProperties(VimService=HASH(0x2e2f718), "_this", Mana gedObjectReference=HASH(0x3ca8ab8), "specSet", PropertyFilterSpec=HASH(0x3d27568 )) called at /usr/share/perl/5.22/VMware/VICommon.pm line 1862
ViewBase::update_view_data(Datastore=HASH(0x2cbc6a8), ARRAY(0x27be538)) called at /usr/share/perl/5.22/VMware/VICommon.pm line 1705
Vim::get_view("mo_ref", ManagedObjectReference=HASH(0x3d338a0), "propert ies", ARRAY(0x27be538)) called at ./check_vmware_api.pl line 1211
CheckVMwareAPI::datastore_volumes_info(ARRAY(0x3d33af8), Nagios::Monitor ing::Plugin=HASH(0x2316b10), undef, undef, undef, undef) called at ./check_vmwar e_api.pl line 1885
CheckVMwareAPI::host_list_vm_volumes_info(undef, Nagios::Monitoring::Plu gin=HASH(0x2316b10), undef, undef, undef, undef) called at ./check_vmware_api.pl line 698
eval {...} called at ./check_vmware_api.pl line 580
CheckVMwareAPI::main() called at ./check_vmware_api.pl line 827

root@tgcs017:/usr/local/nagios/libexec#
kwhogster
 
Posts: 578
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Check_VMWARE_API Plugin not working

Postby ssax » Wed Apr 10, 2019 1:23 pm

I see this here:

https://communities.vmware.com/thread/501356

What version are you running?

Code: Select all
[root@xid xicore]# perl -MLWP -e 'print "$LWP::VERSION\n"';
6.05


What version of the SDK do you have installed now?

Code: Select all
/usr/bin/vmware-cmd --version


Thank you!
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 4239
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_VMWARE_API Plugin not working

Postby kwhogster » Wed Apr 10, 2019 9:36 pm

root@tgcs017:/usr/local/nagios/libexec# perl -MLWP -e 'print "$LWP::VERSION\n"';
6.15

root@tgcs017:/usr/bin# vmware-cmd --version
vSphere SDK for Perl version: 6.5.0
Script 'vmware-cmd' version: 6.5.0
kwhogster
 
Posts: 578
Joined: Wed Oct 14, 2015 6:51 pm
Location: Wood Ridge NJ USA

Re: Check_VMWARE_API Plugin not working

Postby ssax » Thu Apr 11, 2019 3:50 pm

Send the output of this command:

Code: Select all
apt list --installed | grep -i perl


Then try running this command:

Code: Select all
cpan -i GAAS/libwww-perl-6.05.tar.gz


Then once it's done installing, test the command again and see if it works. If it doesn't work, try running this command:

Code: Select all
cpan -i GAAS/libwww-perl-5.837.tar.gz


Then test again, if it still doesn't work, let us know.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 4239
Joined: Wed Feb 11, 2015 12:54 pm

Previous

Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 25 guests