MSSQL server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

MSSQL server

Post by gdolidze »

I ran the MSSQL server wizard and everything is working exept Log Cache Hit Rate works.

The error i get is this

<type 'exceptions.ZeroDivisionError'>

Caught unexpected error. This could be caused by your sysperfinfo not containing the proper entries for this query, and you may delete this service check.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: MSSQL server

Post by ssax »

I get that same error, the cntr_value's for mine are all 0, what version of MSSQL are you running?

Also, can you run this on your MSSQL server and post the output?

* Note: ake sure to change %master% if you're going against something other than master.

Code: Select all

SELECT * FROM sys.sysperfinfo WHERE counter_name LIKE '%Log Cache Hit Ratio%' AND instance_name LIKE '%master%';
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

Re: MSSQL server

Post by gdolidze »

We’re running SQL Server 2012
You do not have the required permissions to view the files attached to this post.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: MSSQL server

Post by ssax »

That's occurring because your values are 0 as well and it's trying to divide 0 by 0. The only way to fix that is to have your DB populate that sys.sysperfinfo entry with the proper data, I'm unsure how to achieve that. Do you have a MSSQL DBA that you could ask?
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

Re: MSSQL server

Post by gdolidze »

I guess I will have it disabled till it gets populated.

Thanks for the help.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: MSSQL server

Post by ssax »

Sounds good, are we ok to mark this as resolved and lock the topic?
gdolidze
Posts: 154
Joined: Tue Apr 07, 2015 10:07 am

Re: MSSQL server

Post by gdolidze »

I also get this error for Free Pages

No output on stdout) stderr: Traceback (most recent call last):
File "/usr/local/nagios/libexec/check_mssql_server.py", line 465, in <module>
main()
File "/usr/local/nagios/libexec/check_mssql_server.py", line 431, in main
execute_query(mssql, options, host)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 444, in execute_query
mssql_query.do(mssql)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 283, in do
self.run_on_connection(connection)
File "/usr/local/nagios/libexec/check_mssql_server.py", line 270, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object is unsubscriptable
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: MSSQL server

Post by ssax »

This is a bug that was already reported but the end result is that you do not have that in your MSSQL DB, you can verify by running this SQL command:

Code: Select all

SELECT * FROM sys.sysperfinfo where counter_name like 'Free pages%%';
Locked