MSSQL - No output to stdout

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ssi.anthony.deguia
Posts: 6
Joined: Tue Mar 24, 2015 9:47 pm

MSSQL - No output to stdout

Post by ssi.anthony.deguia »

Hi Nagios Support,

I'd like to consult the error with regards to MSSQL Server Monitoring plug-in.

We updated the plug-in last March 24, 2015 since the old MSSQL plug-in produce inaccurate values with regards to MSSQL Lock Wait Times. After checking the Nagios server today at March 25, 2015, we noticed these errors. Please refer to the attached images.

Image

Image

Please advise.

Thank you very much.
Last edited by ssi.anthony.deguia on Wed Mar 25, 2015 8:00 pm, edited 1 time in total.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MSSQL - No output to stdout

Post by lmiltchev »

What is the version of the Nagios XI and MSSQL Server wizard that you are currently using?

Admin->Manage Config Wizards

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

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

Code: Select all

grep -i version /usr/local/nagios/libexec/check_mssql_server.py
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssi.anthony.deguia
Posts: 6
Joined: Tue Mar 24, 2015 9:47 pm

Re: MSSQL - No output to stdout

Post by ssi.anthony.deguia »

Hi Sir,

Good morning. These are the informations that you requested. About the manual running of the command, we'll follow up the result of the test.

Nagios Version
Image

Wizard Version
Image

Plugin Version
Version 2.0.2

Before the error happened, we updated the check_mssql_server.py plugin by uploading the new check_mssql_server.py. Is there some implications with the permissions and credentials? Because when I checked the owner and the selinux context of the check_mssql_server.py, these are the results.

-rwxr-xr-x. root root unconfined_u:object_r:usr_t:s0 check_mssql
-rwxr-xr-x. root root unconfined_u:object_r:usr_t:s0 check_mssql_database.py
-rwxr-xr-x apache apache ? check_mssql_server.py

Kindly advise us.

Thank you.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MSSQL - No output to stdout

Post by lmiltchev »

I don't think this is a permissions issue however, you can disable SELinux if it is enabled at the moment by running:

Code: Select all

setenforce 0
and see if this is going to fix the issue.

Does your check fail if you run it from the command line? Can you show us an actual check, along with the output of it? For example:

Code: Select all

/usr/local/nagios/libexec/check_mssql_server.py -H x.x.x.x -U 'username' -P 'password' -I 'INSTANCE' --freepages --warning 100 --critical 200
OK: Free pages is 98.0|free_pages=98.0;100;200;;
Be sure to check out our Knowledgebase for helpful articles and solutions!
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: MSSQL - No output to stdout

Post by ssax »

There could be multiple issues here as I'm running into them as well running SQL Server 2014 Express.

1. What version of MSSQL are you running?

2. My version required a hotfix because performance counters were not working, you can look in your SQL server logs and look for performance counters errors or you can run the SQL query below on the server:

Code: Select all

select * from sysperfinfo;
If that is empty you may be hitting the bug I was.

3. If it does have data in there then the version you may be using might not support those, here are the ones that don't work on my SQL Server 2014 Express edition:
MSSQL Deadlocks Per Sec
MSSQL Free Pages
MSSQL Lazy Writes Per Sec
MSSQL Lock Requests Per Sec
MSSQL Stolen Pages


What's happening is that the database is returning nothing and the script is failing because of that.
ssi.anthony.deguia
Posts: 6
Joined: Tue Mar 24, 2015 9:47 pm

Re: MSSQL - No output to stdout

Post by ssi.anthony.deguia »

Hi,

This was the result of the command line execution of the check_mssql_server.py.

Image

But when we restore the old check_mssql_server.py, the monitoring worked again.

We'll advise you when the error persist again.

Thank you very much.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MSSQL - No output to stdout

Post by lmiltchev »

We'll advise you when the error persist again.

Thank you very much.
Sure. Let us know if the error reappears. We will keep the topic open for a while.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked