SQL Server Wizard - troubleshooting

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MikeMAN987
Posts: 58
Joined: Fri Sep 29, 2017 9:57 am

SQL Server Wizard - troubleshooting

Post by MikeMAN987 »

Hi Team,

We have recently followed the SQL Monitoring guide in order to start checking the performance of our SQL server. We worked through a few firewall issues (when those checks failed, we got a failure to connect message as expected..) Now that those have been resolved, the only error message we can see is that the service check timed out after 60.01 seconds.

We have tried, by instance, by database, with and without ports.

Wanted to ask a few questions:
Is there any verbose logging on the SQL plugin itself on the server? Happy to look through logs for other items.
Currently see the traffic allowed from the Nagios XI server to the SQL server, but no authentication failures etc in the SQL logs.

Thanks for any insight!

Regards,
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: SQL Server Wizard - troubleshooting

Post by tgriep »

Most plugins have some sort of debugging or verbose option to get more details and to find then, run the plugin with the --help option and it should print out all of the available options for the plugin.

There are a few SQL wizards available on the system, which one did you run?
Be sure to check out our Knowledgebase for helpful articles and solutions!
MikeMAN987
Posts: 58
Joined: Fri Sep 29, 2017 9:57 am

Re: SQL Server Wizard - troubleshooting

Post by MikeMAN987 »

Hello,

We are running the SQL Server Wizard (not database and not query). Specifically check_mssql_server.py.

I don't see an option for additional verbose logging..

Usage: check_mssql_server.py -H hostname -U user -P password -T table --mode

Options:
-h, --help show this help message and exit

Required Options:
-H HOSTNAME, --hostname=HOSTNAME
Specify MSSQL Server Address
-U USER, --user=USER
Specify MSSQL User Name
-P PASSWORD, --password=PASSWORD
Specify MSSQL Password

Optional Connection Information:
-I INSTANCE, --instance=INSTANCE
Specify instance
-p PORT, --port=PORT
Specify port.

Nagios Plugin Information:
-w WARNING, --warning=WARNING
Specify warning range.
-c CRITICAL, --critical=CRITICAL
Specify critical range.

Mode Options:
--pagelooks Page Lookups Per Second
--batchreq Batch Requests / Sec
--lockwaits Lockwaits / Sec
--pagereads Page Reads / Sec
--totalpages Total Pages (Cumulative)
--readahead Readahead Pages / Sec
--pagewrites Page Writes / Sec
--stolenpages Stolen Pages
--targetpages Target Pages
--fullscans Full Scans / Sec
--locktimeouts Lock Timeouts / Sec
--test Run tests of all queries against the database.
--freepages Free Pages (Cumulative)
--bufferhitratio Buffer Cache Hit Ratio
--averagewait Average Wait Time (ms)
--time2connect Time to connect to the database.
--checkpoints Checkpoint Pages / Sec
--lockrequests Lock Requests / Sec
--pagelife Page Life Expectancy
--databasepages Database Pages
--deadlocks Deadlocks / Sec
--cachehit Cache Hit Ratio
--pagesplits Page Splits / Sec
--lockwait Lock Wait Time (ms)
--lazywrites Lazy Writes / Sec
--sqlcompilations SQL Compilations / Sec
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: SQL Server Wizard - troubleshooting

Post by tgriep »

That plugin does not have an option to output verbose information but if you run the plugin with python trace module, it will output a lot of data to you can check it for any errors.
The following example is what you would use.

Code: Select all

python -m trace --trace /usr/local/nagios/libexec/check_mssql_server.py -H xxx.xxx.xxx.xxx -U 'user' -P 'pass' -I 'instance' --freepages --warning 10 --critical 20
FYI, the output is very large so redirect it to a file so you can view the output with an editor.
Be sure to check out our Knowledgebase for helpful articles and solutions!
MikeMAN987
Posts: 58
Joined: Fri Sep 29, 2017 9:57 am

Re: SQL Server Wizard - troubleshooting

Post by MikeMAN987 »

Thanks for that. It allowed me to find out we have some sort of auth error we will have the DBA's look at. Thank you!! Feel free too close.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SQL Server Wizard - troubleshooting

Post by scottwilkerson »

MikeMAN987 wrote:Thanks for that. It allowed me to find out we have some sort of auth error we will have the DBA's look at. Thank you!! Feel free too close.
Great!

Locking
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked