Help with MSSQL
Help with MSSQL
Hey guys,
I am continuing from the other thread and starting at the first page, where it get more complex and confusing. I copied over the service template, and service defintion. Reset nagios, and now am getting a "CHECK_NRPE: Socket timeout after 10 seconds" on the nagios website. Help is greatly appreciated
I am continuing from the other thread and starting at the first page, where it get more complex and confusing. I copied over the service template, and service defintion. Reset nagios, and now am getting a "CHECK_NRPE: Socket timeout after 10 seconds" on the nagios website. Help is greatly appreciated
Re: Help with MSSQL
For more information on troubleshooting NRPE, please, refer to the NRPE Documentation here:This error can indicate several things:
– The command that the NRPE daemon was asked to run took longer than 10 seconds to execute. This is the
most likely cause if the error message was "CHECK_NRPE: Socket timeout after 10 seconds". Use the -t
command line option to specify a longer timeout for the check_nrpe plugin. The following example will
increase the timeout to 30 seconds:
/usr/local/nagios/check_nrpe -H localhost -c somecommand -t 30
– The NRPE daemon is not installed or running on the remote host. Verify that the NRPE daemon is running as
a standalone daemon or under inetd/xinetd with one of the following commands:
ps axuw | grep nrpe
netstat -at | grep nrpe
– There is a firewall that is blocking the communication between the monitoring host (which runs the check_nrpe
plugin) and the remote host (which runs the NRPE daemon). Verify that the firewall rules (e.g. iptables) that
are running on the remote host allow for communication and make sure there isn't a physical firewall that is
located between the monitoring host and the remote host.
http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Help with MSSQL
ok, so im resuming on this problem since i solved my others. Here is the service definition i am trying to get to work :
but im getting a unknown error on nagios with the description as " No handler for that command"
Any help is appreciated
Code: Select all
define service{
use generic-service ; Name of service template to use
host_name vnadat121
service_description Check for Content Received from High Volume Sources
check_command check_nrpe!run_mssql_sproc!vnadat121!database!user!pass!sp_CheckCoreLastDeliveredBusHours
}
but im getting a unknown error on nagios with the description as " No handler for that command"
Any help is appreciated
Last edited by ofadl on Fri Aug 02, 2013 2:52 pm, edited 1 time in total.
Re: Help with MSSQL
Have you created a handler for the command in your nsclient config?
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: Help with MSSQL
i have not, and i am not sure how to go about creating one
i have found the command definition on the older nagios :
command[run_mssql_sproc]=cscript.exe //NoLogo //T:300 c:\nrpe_nt\run_mssql_sproc.wsf /s:$ARG1$ /d:$ARG2$ /u:$ARG3$ /p:$ARG4$ $ARG5$
i have found the command definition on the older nagios :
command[run_mssql_sproc]=cscript.exe //NoLogo //T:300 c:\nrpe_nt\run_mssql_sproc.wsf /s:$ARG1$ /d:$ARG2$ /u:$ARG3$ /p:$ARG4$ $ARG5$
Re: Help with MSSQL
Do you have a script named "run_mssql_sproc.wsf" in the "c:\nrpe_nt\" directory? Can you run the script locally from the DOS Command Prompt?
Code: Select all
cscript.exe //NoLogo //T:300 c:\nrpe_nt\run_mssql_sproc.wsf /s:vnadat121 /d:$Equinox /u:user /p:pass sp_CheckCoreLastDeliveredBusHoursBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Help with MSSQL
yes, i moved the script named "run_mssql_sproc.wsf" into the scripts folder of NSClient++ folder. I am not entirely sure how to run it from command prompt locally.
Re: Help with MSSQL
to run it localy, open a command prompt, and type
-Yancy
Code: Select all
cscript.exe //NoLogo c:\nrpe_nt\run_mssql_sproc.wsf /s:vnadat121 /d:$Equinox /u:user /p:pass sp_CheckCoreLastDeliveredBusHoursRe: Help with MSSQL
yes, it is running fine locally.
Code: Select all
CRITICAL. Query result is: More than 20 minute gap found in high volume sources:
INW
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Help with MSSQL
Then add the following to [External Scripts] section of your nsclient.ini
restart NSClient++
Then call from Nagios server with
Code: Select all
[External Scripts]
run_mssql_sproc=cscript.exe //NoLogo c:\nrpe_nt\run_mssql_sproc.wsf /s:vnadat121 /d:$Equinox /u:user /p:pass sp_CheckCoreLastDeliveredBusHoursThen call from Nagios server with
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <HOST_ADDRESS> -c run_mssql_sproc