Page 1 of 1

WMI error

Posted: Wed Nov 19, 2014 12:24 pm
by kfree71
To start of, I am new to Nagios and Linux systems.
I am attempting to monitor virtualized Windows servers using the WMI monitoring wizard. When I enter the server IP, username, & password in through the wizard I get this error when it attempts to retrieve the info from the server.

(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''

The user account I am using is a domain account with admin privileges to all servers. Here is the command that is generated when I use the wizard, domain/user & password changed for security reasons.

check_xi_service_wmiplus!'DOMAIN/USER'!'PASSWORD'!checkmem!-s physical -w '80' -c '90'

I have also tried using the local box admin account and creating a specific local account for this process and they all return the same error. Can anyone explain why this is occurring and how to fix it?
Thanks.

Re: WMI error

Posted: Wed Nov 19, 2014 2:03 pm
by slansing
Can you manually run your wmi check from the XI server's ssh session and post the output? Just to see if we get anything different and have a good place to start with troubleshooting:

Code: Select all

/usr/local/nagios/libexec/check_wmi_plus.pl -u 'Dom/User' -p 'password' -m checkmem -s physical -w '80' -c '90'

Re: WMI error

Posted: Wed Nov 19, 2014 2:59 pm
by kfree71
Slansing,
I just found the issue, you cant use special characters in the password and all of my AD service accounts have special characters in them. I created a local account with a simple password on the server I was testing with and was able to get everything working.

I would like to know if there is a way to modify the command string to allow it to utilize special characters in the password.

Thanks for a quick response.

Re: WMI error

Posted: Thu Nov 20, 2014 4:10 pm
by lmiltchev
Have you tried placing the password with the special characters in the resource.cfg file as described in our documentation?

http://assets.nagios.com/downloads/nagi ... Macros.pdf