Page 2 of 3

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Tue Apr 21, 2015 2:11 pm
by tgriep
You should upgrade to the latest MSSQL Server Wizard.
Go to Admin > Manage Config Wizards > Click the Check for Updates button and download and install it.

I would guess that the performance data files on the system are corrupt so the easiest way to fix this it to delete then and they will recreate themselves.
Go to this folder /usr/local/nagios/share/perfdata/centcshdb on the Nagios system.
You should see a .rrd and .xml file called "MSSQL_Lock_Requests_Per_Sec", go ahead and delete them and wait for the check to run for a while and they should recreate the new graphs.

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Tue Apr 21, 2015 3:05 pm
by hillhealthcenter
This is what I get now.

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Tue Apr 21, 2015 4:50 pm
by tgriep
Open up the service and schedule a forced immediate check.
Could you go in to Core Config Manager, search for that service check, click View Text Config "floppy disk icon" copy the config and post it here.

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Tue Apr 21, 2015 5:11 pm
by rseiwert
A note from the MS SQL Install Doc. Note: If you have installed the MSSQL Wizards previous to versions having the “Instance” ability, you may need to remove the plugins before installing the wizard again.

rm /usr/local/nagios/libexec/check_mssql_database.py
rm /usr/local/nagios/libexec/check_mssql_server.py
rm /usr/local/nagios/libexec/check_mssql
http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

Also I'm sure you know the data being returned in is invalid. Maybe you do have 1/2 million database locks per second but I think that might be wrong. This data is raw and needs to be cooked. I discovered this the hard way last year. I just installed the updated MSSQL Wizard and it is still this way.
http://support.nagios.com/forum/viewtop ... 16&t=29452

Also, I wonder if you have a min and max on your rrd which might be being exceeded because you are definitely getting perfdata on the check. I assume other graphs in Nagios are updating no problem?

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Wed Apr 22, 2015 1:09 am
by rseiwert
I just installed the lastest MSSQL check and added it using the wizard with all the defaults. I also am not getting any performance graphs. I get the message, No performance graphs were found for this service. If you have just started monitoring this object then it may take up to 15 minutes for the performance graphs to appear. I also added a new host with my standard checks and it is getting it's graphs. In the advanced tab I do see performance data
In the perfdata.log I did enable debugging and find the following:

2015-04-22 02:02:33 [47567] [2] Processing Line 26
2015-04-22 02:02:33 [47567] [2] Datatype set to 'SERVICEPERFDATA'
2015-04-22 02:02:33 [47567] [1] Found Performance Data for sql2k8.vca.com / MSSQL_Lock_Requests_Per_Sec (lock_requests=11517.6500329;20;30;;;)
2015-04-22 02:02:33 [47567] [2] No Custom Template found for check_xi_mssql_server (/usr/local/nagios/etc/pnp/check_commands/check_xi_mssql_server.cfg)
2015-04-22 02:02:33 [47567] [2] RRD Datatype is GAUGE
2015-04-22 02:02:33 [47567] [2] Template is check_xi_mssql_server.php
2015-04-22 02:02:33 [47567] [2] No pattern match in function _parse(; )
2015-04-22 02:02:33 [47567] [1] Invalid Perfdata detected

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Wed Apr 22, 2015 1:22 am
by rseiwert
So to get this produce graphs on my system I changed the following line in function return_nagios
from

Code: Select all

    stdout = '%s%s|%s=%s%s;%s;%s;;;' % (prefix, stdout, label, strresult, unit, options.warning or '', options.critical or '')
to

Code: Select all

 stdout = '%s%s|%s=%s%s;%s;%s;' % (prefix, stdout, label, strresult, unit, options.warning or '',options.critical or '')
Since the acceptable Min and Max (4th and 5th perfdata args) were hardcoded to nothing I simply removed them. I think adding a return or even a whitespace might also of worked.

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Wed Apr 22, 2015 12:14 pm
by hillhealthcenter
rseiwert,

What is the path to the file where you made the change?

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Wed Apr 22, 2015 12:58 pm
by tgriep
This is the file that rseiwert posted about the changes that he did.

Code: Select all

/usr/local/nagios/libexec/check_mssql_server.py

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Wed Apr 22, 2015 1:51 pm
by hillhealthcenter
It's working again! I owe you both a beer at the next conference!

Re: No MSSQL_Lock_Reqests_Per_Sec Performance Graph Data

Posted: Wed Apr 22, 2015 1:55 pm
by hillhealthcenter
I meant to say that I owe the 3 of you a beer!

You can lock this thread, if you'd like.