Page 1 of 1

SQL Server Error

Posted: Wed Jun 17, 2015 12:44 pm
by awang
Hello,
received the error below for all the services after set up a host to monitor a MS SQL server 2008 by using the wizard. It was working fine when I tested it from the VM NagiosXI. Any ideas about it? thanks.

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

/bin/sh: -c: line 1: syntax error: unexpected end of file

Re: SQL Server Error

Posted: Wed Jun 17, 2015 1:05 pm
by lmiltchev
What is the version of the Nagios XI and the MSSQL Server wizard that you are currently using?

Admin->Manage Config Wizards

Can you show us one of the failing checks, run from the command line, along with the output of it?

Also, run the following command and show us the output:

Code: Select all

head -25 /usr/local/nagios/libexec/check_mssql_server.py

Re: SQL Server Error

Posted: Wed Jun 17, 2015 2:04 pm
by awang
Thank you for the quick response.

We used the latest version NagiosXI offline mode.
MS SQL Server Version: 1.8.5

Below shows the output from the command.

==> standard input <==

Re: SQL Server Error

Posted: Wed Jun 17, 2015 2:25 pm
by lmiltchev
Below shows the output from the command.

==> standard input <==
Did you forget to show us the output?

Code: Select all

head -25 /usr/local/nagios/libexec/check_mssql_server.py
Also, we didn't see one of the failing checks, run from the command line, along with the output of it. An example of a check would be:

Code: Select all

/usr/local/nagios/libexec/check_mssql_server.py -H x.x.x.x -U 'username' -P 'password' -I 'INSTANCE' --averagewait --warning 2000 --critical 3000
OK: Average Wait Time (ms) is 1195.70149254ms|averagewait=1195.70149254ms;2000;3000;;

Re: SQL Server Error

Posted: Wed Jun 17, 2015 3:51 pm
by awang
Thanks for your help!
I followed your steps, I think the error was caused by the password contains a special char "!". Thanks for your time again.

Re: SQL Server Error

Posted: Wed Jun 17, 2015 4:42 pm
by lmiltchev
I am glad your issue has been resolved! I am locking this topic.