MSSQL using NSClient++
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: MSSQL using NSClient++
Alright, you will need to download them from the exchange by searching their plugin names here:
http://exchange.nagios.org/
Place them in your plugins directory and make sure that they are executable. Then run one of them to get it's usage output so you can start setting up commands and services.
http://exchange.nagios.org/
Place them in your plugins directory and make sure that they are executable. Then run one of them to get it's usage output so you can start setting up commands and services.
Re: MSSQL using NSClient++
well i have plugins in my plugins folder, i just dont have that check_mssql, where do i download that?
Re: MSSQL using NSClient++
You may have your plugins located in a different directory (depending on the OS/distro). Move to the plugins directory by running:
...then view what plugins do you have in there:
If you see "check_mssql" and "check_mssql.sh" there, you can run the following commands (to view usage):
Code: Select all
cd /path/to/your/plugins/directoryCode: Select all
lsCode: Select all
./check_mssql -h
./check_mssql.sh -hBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: MSSQL using NSClient++
my nagios plugins are located in :
usr/lib/nagios/plugins
but there is no plugin check_mssql in here, theres check_mysql but no check_mssql.
usr/lib/nagios/plugins
but there is no plugin check_mssql in here, theres check_mysql but no check_mssql.
Re: MSSQL using NSClient++
Well, if you don't have the plugins, your checks won't work. You can find these plugins here:
http://exchange.nagios.org/directory/Pl ... ql/details
https://github.com/nagios-plugins/nagio ... k_mssql.sh
http://exchange.nagios.org/directory/Pl ... ql/details
https://github.com/nagios-plugins/nagio ... k_mssql.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: MSSQL using NSClient++
ok so i created the check_mssql.sh and ran:
./check_mssql.sh -h
and got this :
./check_mssql.sh: 38: [: 1: unexpected operator
./check_mssql.sh: 41: [: /usr/bin/tsql: unexpected operator
./check_mssql.sh: 53: [: ==: unexpected operator
./check_mssql.sh: 55: [: ==: unexpected operator
-e is not a supported MS SQL Server version!
./check_mssql.sh -h
and got this :
./check_mssql.sh: 38: [: 1: unexpected operator
./check_mssql.sh: 41: [: /usr/bin/tsql: unexpected operator
./check_mssql.sh: 53: [: ==: unexpected operator
./check_mssql.sh: 55: [: ==: unexpected operator
-e is not a supported MS SQL Server version!
Re: MSSQL using NSClient++
Open the file in vi:
and change the first line from this:
to this:
Save and exit - type ":wq" and hit "Enter".
Note: Now you should see the usage. This is a 3rd party plugin. We cannot guarantee it is going to work as expected. I included the download link, because you had the check set up, but you were missing the plugin.
Code: Select all
vi check_mssql.shCode: Select all
#!/bin/shCode: Select all
#!/bin/bashNote: Now you should see the usage. This is a 3rd party plugin. We cannot guarantee it is going to work as expected. I included the download link, because you had the check set up, but you were missing the plugin.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: MSSQL using NSClient++
this is what i get when i run:
./check_mssql.sh -h
You did not supply enough arguments.
Usage: ./check_mssql.sh <host> <username> <password> <version>
./check_mssql.sh checks Microsoft SQL Server connectivity. It works with versions 7 and 2000.
You need a working version of FreeTDS (http://www.freetds.org/) and tsql (included in FreeTDS 6.0+) to connect to the SQL server.
It was written by Tom De Blende ([email protected]) in 2003.
Example:
./check_mssql.sh dbserver sa f00bar 2000
./check_mssql.sh -h
You did not supply enough arguments.
Usage: ./check_mssql.sh <host> <username> <password> <version>
./check_mssql.sh checks Microsoft SQL Server connectivity. It works with versions 7 and 2000.
You need a working version of FreeTDS (http://www.freetds.org/) and tsql (included in FreeTDS 6.0+) to connect to the SQL server.
It was written by Tom De Blende ([email protected]) in 2003.
Example:
./check_mssql.sh dbserver sa f00bar 2000
Re: MSSQL using NSClient++
ok i got it working, and it returned output. You guys said i have to define command definitions now?
Re: MSSQL using NSClient++
You already have this command defined (from one of your previous posts):
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
}Be sure to check out our Knowledgebase for helpful articles and solutions!