Page 1 of 1

SQL Database Monitor

Posted: Thu Mar 26, 2020 9:22 am
by lance.peterson
I am trying to just monitor the size of a single database. This is the first I've tried it. I am getting the error seen in the attachment.

Advice?

Re: SQL Database Monitor

Posted: Thu Mar 26, 2020 10:08 am
by jbrunkow
Hey Lance!

Can you please let us know what plug-in you are running to configure this check?

What is the exact check command you are running to return this message? You can see this by navigating to Configure in the header > clicking Core Config Manager under Advanced Configuration on the left pane > then Services under the Monitoring section > and then clicking the wrench next to the service in question to see the Check command and associated arguments.

It would help us greatly if you could also test the check command from the command line, as it will return more detailed information about what's going on. Instructions on how to do so are outlined in the following linked article.
ref: https://support.nagios.com/kb/article.php?id=167

Re: SQL Database Monitor

Posted: Fri Mar 27, 2020 8:08 am
by lance.peterson
I used the MSSQL Database Wizard when I created this.

Attached is a screenshot of that screen. If I didn't get everything you needed there please let me know.

I also included the check command but it appears I may have done it incorrect.

Let me know what would be next.

Re: SQL Database Monitor

Posted: Fri Mar 27, 2020 10:56 am
by jbrunkow
It is also possible that certain characters are being misinterpreted. You may be able to sidestep this by escaping a certain character with another, or defining certain strings as macros instead of writing them out in the command.

Please refer to the following linked article for more information on this.
https://support.nagios.com/kb/article.php?id=580

Re: SQL Database Monitor

Posted: Fri Mar 27, 2020 2:27 pm
by jbrunkow
It looks like you entered a value for the second argument, but did not put it in the command. What happens if you try including the text from the second argument in the first one, or call the second argument in the command?

What output do you get when you run the following commands on your XI server? It may help to see if the command works without using macros.

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_mssql_database.py -H [host IP address] [argument one and two]