MSSQL using NSClient++

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

MSSQL using NSClient++

Post by ofadl »

Helo all,

Would anyone happen to know a guide/website that explains how to define a mssql stored procedure service definition to be used with NSClient++? Thanks for looking
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: MSSQL using NSClient++

Post by abrist »

What type of stored procedure is your objective? Do you want to run the stored procedure from nsclient, or check it's result?
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.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

i would like to ideally set up a check for it, so it can be displayed on the nagios(core) website
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

To be more specific, i have an older version of nagios running and have a couple service checks running for mssql but under nrpe.
The serviec check was called:

check_nrpe!run_mssql_sproc!

Here a list of some of the checks id like to run under NSClient++:

EOD ARCHIVECOUNT
EOD DAILYCYCCOUNT
EOD MARKETDATACOUNT
EOD OVERNIGHT TACOUNT
EOD OVERNIGHT TAISSUECOUNT
EOD OVERNIGHT TAREPORT
EOD RTINITALIZATIONCOUNT
RT CSTAAPPSERVERCOUNT
RT CYCLEMODELCOUNT
RT DAILTYDATACOUNT
RT MARKETMODEL COUNT
RT MODELREQUESTCOUNT
RT TACOUNT
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: MSSQL using NSClient++

Post by slansing »

Well, you could look at the old nrpe command definitions and semi-copy them to the NSClient++'s nsc.ini file, NSClient++ uses NRPE as well, and you would only need to define those commands in that file following the correct format, not a direct copy. Then, as long as they were working on the same system already you should not have much else to do. Do you know how to install nsclient++, then define commands and verify that the correct options are un-commented?
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

Yes, i already have NSClient++ installed on several servers, and configured the nsc.ini file. Ok, so, i just copy and paste the command definition of those services off the nrpe file and paste into nsc.ini file?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: MSSQL using NSClient++

Post by slansing »

You will also need to make sure that the plugin required for this "if it is called on the remote system" is present in the nsclient++/scripts directory, have you looked into using:

http://exchange.nagios.org/directory/Pl ... us/details
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

im confused, here are the command definitions that are running for a server called vnadat121 for the msssql stuff, this is on the old nagios website:

# '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$"
}

so your telling me to copy and paste those into the NSClient++ nci.ini file on that server?

im confused on what to do
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: MSSQL using NSClient++

Post by lmiltchev »

These checks have nothing to do with nsclient++. You can view the usage of these plugins by running the following commands:

Code: Select all

cd /usr/local/nagios/libexec
./check_mssql -h
./check_mssql.sh -h
Be sure to check out our Knowledgebase for helpful articles and solutions!
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: MSSQL using NSClient++

Post by ofadl »

i just tried to run that, and it says theres no such file or directory
Locked