Page 1 of 1

Check_esx error domain user

Posted: Wed Oct 30, 2019 2:29 am
by nagiosjam
Hi !!!
I have a validation problem when executing a command to monitor vmware.

If I execute the command with root user it works for me

./check_vmware_api.pl -H serveresxi -u root -p password -l cpu

CHECK_VMWARE_API.PL OK - cpu usage = 9862.00 MHz (14.67%) | cpu_usagemhz = 9862.00 ;; cpu_usage = 14.67% ;;

But with the domain user nagiosusr I get validation error.

The user in vmware is registered with the role read, as indicated in the documentation of the plugin.

./check_vmware_api.pl -H serveresxi-u nagiosusr -p password -l cpu
CHECK_VMWARE_API.PL UNKNOWN - Error: Cannot complete login due to an incorrect user name or password

I have tried with

nagiosusr@domain

domain\nagiosusr

domain\\nagiosusr

but it gives the same validation error

Any more options?

Thank you

Re: Check_esx error domain user

Posted: Wed Oct 30, 2019 3:45 pm
by ssax
Is there special chars in both? Try surrounding with single-quotes like below:

Code: Select all

./check_vmware_api.pl -H serveresxi -u 'nagiosusr' -p 'password' -l cpu

Re: Check_esx error domain user

Posted: Thu Oct 31, 2019 2:30 am
by nagiosjam
the user does not contain special characters, the password if ... I have added the quotes, but still giving the same invalid username or password error

:|

Re: Check_esx error domain user

Posted: Thu Oct 31, 2019 3:30 pm
by ssax
Send the FULL output of this one:

Code: Select all

./check_vmware_api.pl -H serveresxi -u 'nagiosusr' -p 'password' -l cpu -vvv --trace=4

Re: Check_esx error domain user

Posted: Mon Nov 04, 2019 2:06 am
by nagiosjam
[root@server nagios plugins]# ./check_vmware_api.pl -H server -u 'nagiosusr' -p 'xxxxxxx' -l cpu -vvv --trace=4
[extra-opts] check_vmware_api.pl -H server-u nagiosusr -p xxxxxx -l cpu -vvv --trace=4
CHECK_VMWARE_API.PL UNKNOWN - Error: Cannot complete login due to an incorrect user name or password.

thanks !!!

Re: Check_esx error domain user

Posted: Tue Nov 05, 2019 2:39 pm
by scottwilkerson
I just re-verified domain user login should be in this format:

Code: Select all

./check_vmware_api.pl -H 192.168.7.20 -u '[email protected]' -p 'password' -l cpu
CHECK_VMWARE_API.PL OK - cpu usage=11058.00 MHz (27.10%) | cpu_usagemhz=11058.00;; cpu_usage=27.10%;;
Make sure that the user you are using has all the required permissions to view details on the server