Page 3 of 9

Re: MSSQL using NSClient++

Posted: Tue Jun 25, 2013 1:28 pm
by ofadl
ok what do i do next?

Re: MSSQL using NSClient++

Posted: Tue Jun 25, 2013 1:35 pm
by slansing
So the command is defined, now you can add it to your services if you wish, make sure that the command is correct and you have the correct flags and information set in it.

Re: MSSQL using NSClient++

Posted: Tue Jun 25, 2013 1:55 pm
by ofadl
Ok, so i just added this service definition to my windows.cfg file( where i have all the host and service definitions for my windows servers), and i got a " Check_NRPE: Socket Timeout after 10 seconds" error


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!Equinox!sa!dusT#Controle!sp_CheckCoreLastDeliveredBusHours
check_period 24x7
}

Any idea on what to do next?

Re: MSSQL using NSClient++

Posted: Tue Jun 25, 2013 2:33 pm
by slansing
You should be using the command you just shared with us, NRPE will not be used here:

Code: Select all

# 'check_mssql.sh' command definition
define command{
command_name check_mssql.sh
command_line $USER1$/check_mssql.sh zdat520 sa dusT#Controle

Re: MSSQL using NSClient++

Posted: Tue Jun 25, 2013 3:29 pm
by ofadl
ok i don't think i did this right, but i modified the service definition to :

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_mssql!run_mssql_sproc!vnadat121!Equinox!sa!dusT#Controle!sp_CheckCoreLastDeliveredBusHours
check_period 24x7
}

and now im getting an "(Return code of 127 is out of bounds - plugin may be missing) "

im stuck once again

Re: MSSQL using NSClient++

Posted: Tue Jun 25, 2013 3:40 pm
by slansing
It looks like in the service definition you are trying to pass arguments to the command, the command you defined does not have any arguments defined.

Since you hardcoded all of the information into the check_mssql command, you only need to define:

Code: Select all

check_command check_mssql
However, you have quite a few things wrong or missing in the definition. First, you need to make sure that the check command has all of the required information in it already, you have bits of text after it which will not be valid. So you need to read the usage for the check plugin, then patch the required information in. also, in the command definition, just use check_mssql not check_mssql.sh, as it is just the name.

If you are truly trying to pass all of this:

Code: Select all

!vnadat121!Equinox!sa!dusT#Controle!sp_CheckCoreLastDeliveredBusHours
You will need to figure out how to incorporate it into the command in a properly readable format by the plugin script, either add $ARGn$'s in the command definition to signify arguments in the service which are separated by "!'s" or hard code all the information into the command definition "not recommended unless you want to create a command for each check type."

Re: MSSQL using NSClient++

Posted: Wed Jun 26, 2013 9:02 am
by ofadl
so i modified the service definition again to see if i get the same error and i did, this was the service definition i tried

define service{
use generic-service ; Name of service template to use
host_name vnadat121
service_description Check MSSQL
check_command check_mssql
check_period 24x7
}

Re: MSSQL using NSClient++

Posted: Wed Jun 26, 2013 9:32 am
by slansing
Okay we are on the right path now, it is recommended that you format your command in the fashion it is shown in these examples:

http://nagios.sourceforge.net/docs/3_0/ ... ml#command

This allows the command to automatically use the Nagios Host's IP. It looks like you are still missing the majority of your command definition, as was mentioned before, what you need to do.. is run the command manually from the command line, then format it there to make sure it can communicate with the mssql server and give you valid results, then mirror that into your command definition.

I'd also make an overview of this page, and verify that you have everything you need for the service:

http://nagios.sourceforge.net/docs/3_0/ ... ml#service

Re: MSSQL using NSClient++

Posted: Thu Jun 27, 2013 11:58 am
by ofadl
i decided to give up on trying to define something for "check_mssql_health" and want to get more specific like i stated before in the post and try to find a guide for "check_mssql_proc". I understand the the plugin is found in this link:

http://exchange.nagios.org/directory/Pl ... oc/details

but i was wondering if anyone knows a guide/walkthrough for that check, that website is not too specific

Re: MSSQL using NSClient++

Posted: Thu Jun 27, 2013 3:42 pm
by abrist
The developer of check_mssql_health has decent documentation:
http://labs.consol.de/lang/en/nagios/ch ... ql_health/

EDIT: The link to the check_mssql_proc developer website 404s. You can check the comment on exchange, but it looks like there is very little in the way of documentation. You may be able to reach the developer through the exchange though.