Query on sql server cluster monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Query on sql server cluster monitoring

Post by scottwilkerson »

If you go to the service status detail page for this service what is displayed?

Looking at this again, I'm not positive that this plugin conforms to the threshold standards, lets also try with $ARG1$ as

Code: Select all

-U 'sa' -P 'my sa pwd' -p myport --deadlocks --warning 5 --critical 10
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: Query on sql server cluster monitoring

Post by maxwellmiranda »

how do i monitor a non default instance on sql server
i am trying the below query at the command line

./check_mssql_database.py -H 'usmasql1.bose.com' -U 'nagios' -P 'nagios' -I USMASQL1\USMASQL1 -T 'master' -p 1433 --time2connect --warning 1 --critical 5


my sql instance is USMASQL1
and the server name is USMASQL1


the above command doesnot work
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Query on sql server cluster monitoring

Post by slansing »

What do you get as output from the Nagios server's command line when running that check against the MSSQL server? Does it work with just one instance name? "USMASQL1"
maxwellmiranda
Posts: 113
Joined: Thu Mar 22, 2012 3:24 pm

Re: Query on sql server cluster monitoring

Post by maxwellmiranda »

i get the message " cannot connect to the sql server"

i tried with just the instance name but am getting the same error
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Query on sql server cluster monitoring

Post by scottwilkerson »

If you are monitoring an instance you need to remove the -p 1433 and if you have a \ you will need to escape it

Code: Select all

./check_mssql_database.py -H 'usmasql1.bose.com' -U 'nagios' -P 'nagios' -I USMASQL1\\USMASQL1 -T 'master' --time2connect --warning 1 --critical 5
On some servers just

Code: Select all

./check_mssql_database.py -H 'usmasql1.bose.com' -U 'nagios' -P 'nagios' -I USMASQL1 -T 'master' --time2connect --warning 1 --critical 5
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked