ESXi standalone host monitoring issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: ESXi standalone host monitoring issue

Post by jyoti22 »

Code: Select all

vi-admin@vma:~> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server esxi --username "domain\user" --password "xxx"
Existing entry modified successfully.
vi-admin@vma:~> ~/box293_check_vmware.pl --server esxi--check Host_OS_Name_Version
Enter username: user
OK: VMware ESXi 5.5.0 build-2068190
vi-admin@aushosvmaprd00:~>
here I had added the entry for username and password but still while checking plugin, it asks username and after providing it, output get displayed

I guess because of it, when I try to test it from nagios, I get error. Please advice

Code: Select all

[nagios@nagiosxi ~]$ /usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H <vMA> -C "~/box293_check_vmware.pl --server esxi --check Host_OS_Name_Version"
CRITICAL - Plugin timed out after 10 seconds
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: ESXi standalone host monitoring issue

Post by lgroschen »

Try using -t to bump up the timeout and see if it works.
/Luke
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: ESXi standalone host monitoring issue

Post by jyoti22 »

Code: Select all

[nagios@nagios ~]$ /usr/local/nagios/libexec/check_by_ssh -E 1 -l vi-admin -H vMA -C "~/box293_check_vmware.pl --server esxi--check Host_OS_Name_Version" -t 30
CRITICAL - Plugin timed out after 30 seconds
tried but get same output
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: ESXi standalone host monitoring issue

Post by Box293 »

jyoti22 wrote:Code: Select all
vi-admin@vma:~> /usr/lib/vmware-vcli/apps/general/credstore_admin.pl add --server esxi --username "domain\user" --password "xxx"
Existing entry modified successfully.
vi-admin@vma:~> ~/box293_check_vmware.pl --server esxi--check Host_OS_Name_Version
Enter username: user
OK: VMware ESXi 5.5.0 build-2068190
vi-admin@aushosvmaprd00:~>



here I had added the entry for username and password but still while checking plugin, it asks username and after providing it, output get displayed

I guess because of it, when I try to test it from nagios, I get error. Please advice
There are two possible problems here and they are covered on Page 27 of the manual.

If you are being prompted for the username, it is possible you have added more than one user account that is associated with that esx server, hence the API doesn't know which one to use. In the manual it shows you how to list all the users and remove the additional account.

The other problem is that the username may be in a format the server doesn't support. It might need to be domain\user or user@domain or user.

Let us know how that goes.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: ESXi standalone host monitoring issue

Post by jyoti22 »

Thanks a lot! After removing duplicate entries now plugin test works fine.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: ESXi standalone host monitoring issue

Post by lgroschen »

Glad you got it working! Locked.
/Luke
Locked