Page 2 of 2

Re: ESXi standalone host monitoring issue

Posted: Tue Sep 29, 2015 4:49 pm
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

Re: ESXi standalone host monitoring issue

Posted: Tue Sep 29, 2015 4:58 pm
by lgroschen
Try using -t to bump up the timeout and see if it works.

Re: ESXi standalone host monitoring issue

Posted: Tue Sep 29, 2015 5:10 pm
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

Re: ESXi standalone host monitoring issue

Posted: Wed Sep 30, 2015 9:31 am
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.

Re: ESXi standalone host monitoring issue

Posted: Wed Sep 30, 2015 4:13 pm
by jyoti22
Thanks a lot! After removing duplicate entries now plugin test works fine.

Re: ESXi standalone host monitoring issue

Posted: Wed Sep 30, 2015 4:15 pm
by lgroschen
Glad you got it working! Locked.