Page 1 of 1
locks-deadlocks issues with check_MSSQL_health plugin
Posted: Tue Dec 30, 2014 3:58 pm
by pkam
Hi All,
I have some issues working with locks-deadlocks with the status information critical - unable to aquire lock info. Does anyone have set it up before?
It looks like all other SQL monitoring services are good except for all the locks. Any help will be appreciated.
Thanks!
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Tue Dec 30, 2014 4:01 pm
by scottwilkerson
Can you post the command definition you are running that is producing the problem?
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Tue Dec 30, 2014 4:10 pm
by pkam
Thanks for the quick reply.
The Nagios3 core is running under Ubuntu 14.04 trying to monitor the MS SQL 2008 server. the command line that I use is as follow:
define command{
command_name check_mssql_health
command_line $USER1/check_mssql_health -username $USER3$ - password $USER4$ -server $HOSTNAME$ -mode $ARG1$ - name $ARG2$ -commit
}
in cfg file I have tried:
check_command check_mssql_health!locks-deadlocks
and
check_command check_mssql_health!locks-deadlocks!DBNAME
still doesn't work. I also try to use both windows and SQL authentication with sysadmin privilege but they don't work either.
Let me know if you need more info.
Thanks!
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Wed Dec 31, 2014 1:07 pm
by pkam
it looks like when I run like this it will give me the result
./check_mssql_health -password PWD -username USERNAME - server 192.168.1.x -mode locks-deadlocks
but not on the web interface, I only get the message "CRITICAL - unable to aquire lock info"
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Fri Jan 02, 2015 10:56 am
by scottwilkerson
The problem is that you command you have defined will add additional items to the command, as you see
Code: Select all
command_line $USER1/check_mssql_health -username $USER3$ - password $USER4$ -server $HOSTNAME$ -mode $ARG1$ - name $ARG2$ -commit
Will get translated to something like
Code: Select all
./check_mssql_health -username USERNAME - password PASSWORD -server 192.168.1.x -mode locks-deadlocks - name -commit
this leaves an extraneous
at the end.
I would suggest breaking this into multiple commands to meet your needs
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Fri Jan 02, 2015 11:33 am
by pkam
does it have to do with the space? sorry I accidentally add the space in the post. with the command in the cfg file actually there is no space.
And also, do you have any suggestions how to break this into multiple commands?
Thanks!
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Fri Jan 02, 2015 1:45 pm
by pkam
scottwilkerson wrote:The problem is that you command you have defined will add additional items to the command, as you see
Code: Select all
command_line $USER1/check_mssql_health -username $USER3$ - password $USER4$ -server $HOSTNAME$ -mode $ARG1$ - name $ARG2$ -commit
Will get translated to something like
Code: Select all
./check_mssql_health -username USERNAME - password PASSWORD -server 192.168.1.x -mode locks-deadlocks - name -commit
this leaves an extraneous
at the end.
I would suggest breaking this into multiple commands to meet your needs
I took out the -name from the command line and it is working now.
Thanks!
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Fri Jan 02, 2015 3:06 pm
by sreinhardt
Fantastic, nice job! Do you want us to lock this one up and call it closed?
Re: locks-deadlocks issues with check_MSSQL_health plugin
Posted: Fri Jan 02, 2015 3:10 pm
by pkam
sreinhardt wrote:Fantastic, nice job! Do you want us to lock this one up and call it closed?
Yes please. I am good with this issue now.
Thanks!