Check_esx error domain user

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

Check_esx error domain user

Post 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
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_esx error domain user

Post 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
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

Re: Check_esx error domain user

Post 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

:|
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Check_esx error domain user

Post 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
nagiosjam
Posts: 81
Joined: Thu Feb 04, 2016 2:47 am

Re: Check_esx error domain user

Post 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 !!!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Check_esx error domain user

Post 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 'user@domain.ext' -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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked