Error when hiding password from WMI checks

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

Error when hiding password from WMI checks

Post 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.
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error when hiding password from WMI checks

Post 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.
Former Nagios employee
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

Re: Error when hiding password from WMI checks

Post by litsupport.box »

hm okay thanks tmcdonald ;)
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Error when hiding password from WMI checks

Post by jolson »

How did this work for you, litsupport.box?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
litsupport.box
Posts: 80
Joined: Wed Apr 02, 2014 7:24 am

Re: Error when hiding password from WMI checks

Post 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.
Nagios XI Version : 2014R2.6
fqdn 2.6.32-431.17.1.el6.x86_64 x86_64
CentOS release 6.5 (Final)
Gnome is not installed
Proxy appears to be in use
VMware Image
Mod Gearman
Locked