'exceptions.ZeroDivisionError' using logcachehit

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
nelsonw
Posts: 64
Joined: Wed Feb 22, 2017 4:03 am

'exceptions.ZeroDivisionError' using logcachehit

Post by nelsonw »

Hi,

I receive the error below error when running the LogCacheHitRate check with check_mssql_database.py. Please advise

/usr/local/nagios/libexec/check_mssql_database.py -H $USER8$ -U '$USER9$' -P '$USER10$' -T '$USER11$' -p 1433 --logcachehit --warning 0:95 --critical 0:97


<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.



Regards,
Nelson
bwallace
Posts: 1145
Joined: Tue Nov 17, 2015 1:57 pm

Re: 'exceptions.ZeroDivisionError' using logcachehit

Post by bwallace »

Can you look at the following like to make sure the MSSQL prerequisites are installed on the server?
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
That could be one of the reasons why you see that error.

- Are the usernames and passwords you are using to connect to the database have any special characters in i and are they setup as local accounts on the MSSQL server?
- What are the rights that are granted to the user account on the MSSQl server?
- Can you setup that account to have full access to the server to see if that helps out?


Can you log in the mssql server as the user you are running the check with, select the database, run the following query, and show us a screenshot of the results?

Code: Select all

SELECT     object_name, counter_name, instance_name, cntr_value, cntr_type
FROM         sys.sysperfinfo
WHERE     (counter_name = 'Log Cache Hit Ratio')
Be sure to check out the Knowledgebase for helpful articles and solutions!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: 'exceptions.ZeroDivisionError' using logcachehit

Post by tmcdonald »

Just checking in since we have not heard from you in a while. Did @bwallace's post clear things up or has the issue otherwise been resolved?
Former Nagios employee
Locked