Hi Team,
We are getting some issue with MSSQLSERVER monitoring.
Manual checks are working fine but GUI is not working .
-bash-3.2$ ./check_nt -H usa0300as937 -p 12489 -v SERVICESTATE -l MSSQL\$USA0300AV1576_7
OK: All services are in their appropriate state.
IF I use attached format in GUI .It is working fine but command line is giving error.Can you please help with this.
MSSQL server monitoring issue
MSSQL server monitoring issue
You do not have the required permissions to view the files attached to this post.
Re: MSSQL server monitoring issue
Any suggestions on this
Re: MSSQL server monitoring issue
What error do you receive from the gui for the check?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: MSSQL server monitoring issue
Below is the Error we are seeing in GUI
COMMAND: /usr/local/nagios/libexec/check_nt -H usa0300as937 -p 12489 -v SERVICESTATE -l MSSQL\\\\\$USA0300AV1576_7
OUTPUT: MSSQL\\$USA0300AV1576_7: Error
COMMAND: /usr/local/nagios/libexec/check_nt -H usa0300as937 -p 12489 -v SERVICESTATE -l MSSQL\\\\\$USA0300AV1576_7
OUTPUT: MSSQL\\$USA0300AV1576_7: Error
Re: MSSQL server monitoring issue
Replace "-l MSSQL\\\\\$USA0300AV1576_7" in the $ARG3$ field with "-l MSSQL\$USA0300AV1576_7". No-quotes should work, but if it doesn't - try single or double quotes. Let me know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: MSSQL server monitoring issue
Command used in console is working fine
-bash-3.2$ /usr/local/nagios/libexec/check_nt -H usa0300as937 -p 12489 -v SERVICESTATE -l MSSQL\$USA0300AV1576_7
OK: All services are in their appropriate state.
Command used in GUI
Command view
$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v SERVICESTATE -l $ARG1$
$USER1$ is /usr/local/nagios/libexec
$HOSTADDRESS$ is taken as usa0300as937
ARG1 value is given as MSSQL\$USA0300AV1576_7 it is without quotes
Error we saw is when executing test command
COMMAND: /usr/local/nagios/libexec/check_nt -H usa0300as937 -p 12489 -v SERVICESTATE -l MSSQL\\\\\$USA0300AV1576_7
OUTPUT: MSSQL\\$USA0300AV1576_7: Error
-bash-3.2$ /usr/local/nagios/libexec/check_nt -H usa0300as937 -p 12489 -v SERVICESTATE -l MSSQL\$USA0300AV1576_7
OK: All services are in their appropriate state.
Command used in GUI
Command view
$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v SERVICESTATE -l $ARG1$
$USER1$ is /usr/local/nagios/libexec
$HOSTADDRESS$ is taken as usa0300as937
ARG1 value is given as MSSQL\$USA0300AV1576_7 it is without quotes
Error we saw is when executing test command
COMMAND: /usr/local/nagios/libexec/check_nt -H usa0300as937 -p 12489 -v SERVICESTATE -l MSSQL\\\\\$USA0300AV1576_7
OUTPUT: MSSQL\\$USA0300AV1576_7: Error
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: MSSQL server monitoring issue
I would highly suggest against using the test check command when testing things that need to be escaped. PHP has some very odd sanatization that happens, that is not directly needed in an actual nagios check and can cause false issue. I would suggest disabling notifications for that check, and allowing nagios to execute it as lmiltchev has defined for you as a normal service check.
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: MSSQL server monitoring issue
Can you clearly explain what needs to be done.Test check command is giving error even if we are using correct variables.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL server monitoring issue
The best way to test how nagios perceives the command, use the service details page from the Home menu to test the check.. simply navigate to the service details page of this service, if changes need to be made, either reconfigure the service, or go back into the ccm and alter the service, then apply config, hope this helps!
Re: MSSQL server monitoring issue
This worked ...
Thank you for your suggestion. You an close this.
Thank you for your suggestion. You an close this.