Hello, I am trying to monitor an MSSQL database, in the wizard I add the corresponding data, but when I create the host, the services mark me Warning and show me this error:
(No output on stdout) stderr: /bin/sh: -c: línea 0: EOF inesperado mientras se buscaba un `'' coincidente
Problems monitoring MSSQL Data Base
Re: Problems monitoring MSSQL Data Base
It likely has to do with special characters in the password. Make sure the password is surrounded in single-quotes on the service.
Please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.
Please PM me a copy of your profile, you can download it from Admin > System Profile by clicking the Download Profile button.
Re: Problems monitoring MSSQL Data Base
How about add single quotes in password but now I get this error "(No output returned from plugin)"
Re: Problems monitoring MSSQL Data Base
What is the full command with arguments that the check is running? (you can sanitize the user/password)
If you need help, please PM me a copy of your profile.zip from Admin > System Profile by clicking the Download Profile button and let me know the name of the host/service in question.
If you need help, please PM me a copy of your profile.zip from Admin > System Profile by clicking the Download Profile button and let me know the name of the host/service in question.
Re: Problems monitoring MSSQL Data Base
I share the command to check the connection time:
$ USER1 $ / check_mssql_server.php -H $ HOSTADDRESS $ $ ARG1 $
where ARG1 is --checktype 'database' -U 'user' -P ''password
$ USER1 $ / check_mssql_server.php -H $ HOSTADDRESS $ $ ARG1 $
where ARG1 is --checktype 'database' -U 'user' -P ''password
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Problems monitoring MSSQL Data Base
Hi,
Can you run the full command from the CLI and add the -v option for verbose output and post it to the thread for us to review. Here's a sample command that works from my test system:
The following knowledgebase article has instructions for retrieving the full check command.
Nagios XI - How To Test Check Commands From The Command-line
Also, a system profile would be very helpful.
To Download a System Profile
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Thanks,
Benjamin
Can you run the full command from the CLI and add the -v option for verbose output and post it to the thread for us to review. Here's a sample command that works from my test system:
Code: Select all
/usr/local/nagios/libexec/check_mssql_server.php -H 192.168.x.x 2 --checktype 'database' -U 'administrator' -P 'password' --instancename 'master' --perftype default -p 1433 --mode datasize --warning 10000 --critical 100000 -v
Nagios XI - How To Test Check Commands From The Command-line
Also, a system profile would be very helpful.
To Download a System Profile
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Thanks,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Problems monitoring MSSQL Data Base
Hi, what I get is the following:
Code: Select all
[[email protected] ~]$ /usr/local/nagios/libexec/check_mssql_server.php -H 172.28.1.16 --checktype 'database' -U 'user ' -P ''password
***ERROR***:
Command line parsing error: Required variable "warning" not present.
check_mssql_database 2.0.3 - Copyright 2021 Nagios Enterprises, LLC.
Portions Copyright others (see source code).
Usage: /usr/local/nagios/libexec/check_mssql_server.php <options>
usage = "usage: %prog --checktype type -H hostname -U username -P password --mode testname
-w warning -c critical [-i instancename] [--perftype type] [--custom 'args']
[-v | -vv | -vvv | --verbose --complex]"-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Problems monitoring MSSQL Data Base
Hi,
Thanks for trying that, the command is missing required arguments so it won't complete.
Regards,
Benjamin
Thanks for trying that, the command is missing required arguments so it won't complete.
Try adding a warning option or use the sample command provided in the last post.***ERROR***:
Command line parsing error: Required variable "warning" not present.
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!