Page 9 of 9

Re: MSSQL using NSClient++

Posted: Wed Jul 10, 2013 12:34 pm
by ofadl
am i using the check_nrpe as the plugin for the msssql to work here? if so, heres the output from:

usr/lib/nagios/plugins/check_nrpe -h



NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad ([email protected])
Version: 2.12
Last Modified: 03-10-2008
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required

Usage: check_nrpe -H <host> [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist. ..>]

Options:
-n = Do no use SSL
-u = Make socket timeouts return an UNKNOWN state instead of CRITICAL
<host> = The address of the host running the NRPE daemon
[port] = The port on which the daemon is running (default=5666)
[timeout] = Number of seconds before connection times out (default=10)
[command] = The name of the command that the remote daemon should run
[arglist] = Optional arguments that should be passed to the command. Multiple
arguments should be separated by a space. If provided, this must be
the last option supplied on the command line.
-h,--help Print this short help.
-l,--license Print licensing information.
-n,--no-ssl Do not initial an ssl handshake with the server, talk in plaintext.

Note:
This plugin requires that you have the NRPE daemon running on the remote host.
You must also have configured the daemon to associate a specific plugin command
with the [command] option you are specifying here. Upon receipt of the
[command] argument, the NRPE daemon will run the appropriate plugin command and
send the plugin output and return code back to *this* plugin. This allows you
to execute plugins on remote hosts and 'fake' the results to make Nagios think
the plugin is being run locally.

Re: MSSQL using NSClient++

Posted: Wed Jul 10, 2013 3:54 pm
by abrist
You should not be using nrpe for this check, rather, you should be using check_mssql. You had posted some examples on the first page of this thread:

Code: Select all

# 'check_mssql' command definition
define command{
command_name check_mssql
command_line $USER1$/check_mssql -H $HOSTADDRESS$ -d equinox -u sa -p "dusT#Controle" -q "$ARG1$"
}

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


# 'check_mssql_vnadat121' command definition
define command{
command_name check_mssql_vnadat121
command_line $USER1$/check_mssql -s vnadat121:1433 -d equinox -u sa -p "dusT#Controle" -q "$ARG1$"
}
What are you trying to monitor on this DB?

Re: MSSQL using NSClient++

Posted: Thu Jul 11, 2013 9:25 am
by ofadl
several things, with each server monitoring different databases. For example, this server called vnadat121 is monitoring couple things, here are two of them(not all of them):

define service{
use comtex-service-template-vna ; 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!pass!sp_CheckCoreLastDeliveredBusHours
check_period 7amto5pmweekdays
}

define service{
use comtex-service-template-vna ; Name of service template to use
host_name vnadat121
service_description Check for Slow Processing of TR CCBN Content
check_command check_nrpe!run_mssql_sproc!vnadat121!Equinox!sa!pass!sp_CheckForSlowTRProcessing
check_period 24x7
}


P.S These are the config files for the OLD NAGIOS which uses nrpe_nt, I would like to do the same to the new nagios which uses NSClient but am not sure if its done the same way.

Re: MSSQL using NSClient++

Posted: Thu Jul 11, 2013 9:48 am
by slansing
All of at least the previous 5 pages were us working with you to set up freetds and MSSQL monitoring with that plugin not nsclient.. so now you are trying to use nsclient.....right? You need to tell us exactly what you want to do, with exactly which plugin so that neither of us waste time like this.

Re: MSSQL using NSClient++

Posted: Thu Jul 11, 2013 10:22 am
by ofadl
i want the new nagios server to run the same exact thing as the old one, so its running the same service, and displays the same exact thing, but i am not sure how to go about doing this. For example, the old nagios machine uses this to run database procedure called "EOD_ARCHIVECOUNT". Here is the service definition of it:


define service{
use csta-monitoring-pgh ; Name of service template to use
host_name pdat1
service_description CSTA: Check the end of day tareport status
check_command check_nrpe!run_mssql_sproc!pdat1!cycops!sa!pass!SP_NAGIOS_EOD_ARCHIVECOUNT
contact_groups scott-kurt-joey-grp
}

My question is, can i just copy and paste that onto the new nagios machine, or what do i do to go about doing this so it works fine?

Re: MSSQL using NSClient++

Posted: Thu Jul 11, 2013 11:07 am
by lmiltchev
My question is, can i just copy and paste that onto the new nagios machine, or what do i do to go about doing this so it works fine?
You could, if you had the same template, host, command, contact group, etc., defined on the "new" nagios server.

Since, your original issue has been resolved, I am locking this post. If you have any difficulties with setting up check_nrpe, or other unrelated questions, please, start a new thread.