Page 1 of 1

Error when hiding password from WMI checks

Posted: Fri Mar 06, 2015 10:17 am
by litsupport.box
Hello.

I use the resource.cfg file for the input of usernames and passwords for the WMI Wizard. For some reason this is not working anymore on hosts that i add.

It looks like this on one that is working:
'$USER9$'
'$USER10$'

When i run the check the error message looks like this:

Code: Select all

OMMAND: /usr/local/nagios/libexec/check_wmi_plus.pl -H SERVER -u '\$USER9\$' -p '\$USER10\$' -m checkeventlog -a 'Application' -o 2 -3 1
OUTPUT: UNKNOWN - The WMI query had problems. You might have your username/password wrong or the user's access level is too low. Wmic error text on the next line.
If i use plain text it works.

For some reason it now adds \ to the $USER$ arg.

Anybody any idea? tried multiple things like checking if permissions were correct etc, but i find it weird since this is working on all already added hosts. only with new ones.

Re: Error when hiding password from WMI checks

Posted: Fri Mar 06, 2015 10:20 am
by tmcdonald
It looks like you are using the "Test Check Command" button. That's notorious for escaping meta-characters. Save the check in the CCM the way you think it should be and let it run naturally. No escaping should be performed.

Re: Error when hiding password from WMI checks

Posted: Mon Mar 09, 2015 2:57 am
by litsupport.box
hm okay thanks tmcdonald ;)

Re: Error when hiding password from WMI checks

Posted: Mon Mar 09, 2015 9:34 am
by jolson
How did this work for you, litsupport.box?

Re: Error when hiding password from WMI checks

Posted: Mon Mar 09, 2015 9:37 am
by litsupport.box
jolson wrote:How did this work for you, litsupport.box?
It was indeed somekind of false positive, when i save the service check it runs as it should. this can close in my opinion.