locks-deadlocks issues with check_MSSQL_health plugin
locks-deadlocks issues with check_MSSQL_health plugin
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!
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!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: locks-deadlocks issues with check_MSSQL_health plugin
Can you post the command definition you are running that is producing the problem?
Re: locks-deadlocks issues with check_MSSQL_health plugin
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!
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
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"
./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"
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: locks-deadlocks issues with check_MSSQL_health plugin
The problem is that you command you have defined will add additional items to the command, as you see
Will get translated to something like
this leaves an extraneous
at the end.
I would suggest breaking this into multiple commands to meet your needs
Code: Select all
command_line $USER1/check_mssql_health -username $USER3$ - password $USER4$ -server $HOSTNAME$ -mode $ARG1$ - name $ARG2$ -commitCode: Select all
./check_mssql_health -username USERNAME - password PASSWORD -server 192.168.1.x -mode locks-deadlocks - name -commitCode: Select all
- name -commitI would suggest breaking this into multiple commands to meet your needs
Re: locks-deadlocks issues with check_MSSQL_health plugin
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!
And also, do you have any suggestions how to break this into multiple commands?
Thanks!
Re: locks-deadlocks issues with check_MSSQL_health plugin
I took out the -name from the command line and it is working now.scottwilkerson wrote:The problem is that you command you have defined will add additional items to the command, as you seeWill get translated to something likeCode: Select all
command_line $USER1/check_mssql_health -username $USER3$ - password $USER4$ -server $HOSTNAME$ -mode $ARG1$ - name $ARG2$ -committhis leaves an extraneousCode: Select all
./check_mssql_health -username USERNAME - password PASSWORD -server 192.168.1.x -mode locks-deadlocks - name -commitat the end.Code: Select all
- name -commit
I would suggest breaking this into multiple commands to meet your needs
Thanks!
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: locks-deadlocks issues with check_MSSQL_health plugin
Fantastic, nice job! Do you want us to lock this one up and call it closed?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: locks-deadlocks issues with check_MSSQL_health plugin
Yes please. I am good with this issue now.sreinhardt wrote:Fantastic, nice job! Do you want us to lock this one up and call it closed?
Thanks!