Page 1 of 2
Query on sql server cluster monitoring
Posted: Mon Apr 01, 2013 1:45 pm
by maxwellmiranda
Hi
we already have Nagios XI for monitoring our database infrastructure.
we would like to use the nagios to monitor our Microsoft SQL server Cluster. the version is 2008 cluster.
also we would like to monitor the following
• SQL Error log check
• Database status check
• SQL service check
• Database lock check
please let us know what plugin can be used to configure the service to monitor these parameters
Re: Query on sql server cluster monitoring
Posted: Mon Apr 01, 2013 1:49 pm
by slansing
Have you taken a look at our three MSSQL monitoring wizards from within the Nagios XI UI?
Configuration > Configuration Wizards > MSSQL *
Server:
http://exchange.nagios.org/directory/Ad ... rd/details
Query:
http://exchange.nagios.org/directory/Ad ... rd/details
Database:
http://exchange.nagios.org/directory/Ad ... rd/details
Re: Query on sql server cluster monitoring
Posted: Mon Apr 01, 2013 2:16 pm
by maxwellmiranda
yes..i have these wizards installed...
i didnot find any parameters that i can configure to monitor the events that i specified
Re: Query on sql server cluster monitoring
Posted: Mon Apr 01, 2013 2:41 pm
by abrist
Check out the usage for each of the check plugins:
[snip]
Mode Options:
--bufferhitratio Buffer Cache Hit Ratio
--pagelooks Page Lookups Per Second
--freepages Free Pages (Cumulative)
--totalpages Total Pages (Cumulative)
--targetpages Target Pages
--databasepages Database Pages
--stolenpages Stolen Pages
--lazywrites Lazy Writes / Sec
--readahead Readahead Pages / Sec
--pagereads Page Reads / Sec
--checkpoints Checkpoint Pages / Sec
--pagewrites Page Writes / Sec
--lockrequests Lock Requests / Sec
--locktimeouts Lock Timeouts / Sec
--deadlocks Deadlocks / Sec
--lockwaits Lockwaits / Sec
--lockwait Lock Wait Average Time (ms)
--averagewait Average Wait Time (ms)
--pagesplits Page Splits / Sec
--cachehit Cache Hit Ratio
--time2connect Check Time to Connect [DEFAULT]
--batchreq Batch Requests / Sec
--sqlcompilations SQL Compilations / Sec
--fullscans Full Scans / Sec
--pagelife Page Life Expectancy
As for process status and log checks, you will have to use
NSClient or other windows agents to check the log file for a regex and pull the status of a process.
Re: Query on sql server cluster monitoring
Posted: Mon Apr 01, 2013 2:58 pm
by maxwellmiranda
thanks for the reply...
would you be able to tell us if these plugins work in a sql 2008 cluster environment...
is there any way we can monitor a sql cluster with nagios XI
Re: Query on sql server cluster monitoring
Posted: Mon Apr 01, 2013 3:24 pm
by abrist
You can check the SQL service on the virtual host name instead of the real node name to avoid failures on nodes that are not active. You could also create an event handler that only checks the other node(s) when the master fails.
Re: Query on sql server cluster monitoring
Posted: Mon Apr 01, 2013 3:28 pm
by slansing
In addition yes, you can monitor MSSQL 2008 servers/databases with these plugins.
Re: Query on sql server cluster monitoring
Posted: Fri Apr 19, 2013 5:43 am
by paolodeluca
Hi, we are facing an issue when using some of the available parameters of the "check_mssql_server" plugin.
Some parameters are working correctly and overall command give result as expected, some return (null) and this gives a warning in my services.
warning_small.png
(null)
Notice that for the all parameters, if I run the command in command line, it gives correctly output as expected.
Issue only occurs with following parameters: --deadlocks, --lazywrites, --lockwaits, --pagesplits, --pagewrites
Example of correctly working service
define service {
host_name myhost.mydomain
service_description MSSQL Free Pages Per Sec
use xiwizard_mssqlserver_service
check_command check_xi_mssql_server!-U 'sa' -P 'my sa pwd' -p myport --freepages --warning 10: --critical 20:!!!!!!!
..
Example of service not working -- they look the same to me..
define service {
host_name myhost.mydomain
service_description MSSQL Deadlocks Per Sec
use xiwizard_mssqlserver_service
check_command check_xi_mssql_server! -U 'sa' -P 'my sa pwd' -p myport --deadlocks --warning \~:5 --critical \~:10!!!!!!!
...
what am I missing?
is there a way to debug the problem?
thanks
regards
Paolo
Re: Query on sql server cluster monitoring
Posted: Fri Apr 19, 2013 3:05 pm
by scottwilkerson
Can we try change the not working one to
Code: Select all
check_command check_xi_mssql_server! -U 'sa' -P 'my sa pwd' -p myport --deadlocks --warning :5 --critical :10!!!!!!!
Re: Query on sql server cluster monitoring
Posted: Mon Apr 22, 2013 3:15 am
by paolodeluca
hi,
ok thanks for the suggestion, I have tried this, with no luck .
in "Core Config Manager"> Services > "MSSQL Deadlocks Per Sec" , I changed $ARG1$
from :
"-U 'sa' -P 'my sa pwd' -p myport --deadlocks --warning \~:5 --critical \~:10"
to:
"-U 'sa' -P 'my sa pwd' -p myport --deadlocks --warning :5 --critical :10"
But- i believe the issue is in the "--deadlocks" parameter, not in the range parameters
thank you
regards
Paolo