Hello,
I have run a mssql server wizard, all metrics are added but throwing following errors,
Please suggest.
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
mssql wizard monitoring failed
mssql wizard monitoring failed
You do not have the required permissions to view the files attached to this post.
Re: mssql wizard monitoring failed
Can you show us one of the failing checks, run from the command line, along with the output of it? An example would be:
/usr/local/nagios/libexec/check_mssql_server.py -H x.x.x.x -U 'username' -P 'password' -I 'INSTANCE' --averagewait --warning 2000 --critical 3000
OK: Average Wait Time (ms) is 1195.70149254ms|averagewait=1195.70149254ms;2000;3000;;
Also, run the following command and show us the output:
head -25 /usr/local/nagios/libexec/check_mssql_server.py
/usr/local/nagios/libexec/check_mssql_server.py -H x.x.x.x -U 'username' -P 'password' -I 'INSTANCE' --averagewait --warning 2000 --critical 3000
OK: Average Wait Time (ms) is 1195.70149254ms|averagewait=1195.70149254ms;2000;3000;;
Also, run the following command and show us the output:
head -25 /usr/local/nagios/libexec/check_mssql_server.py
Be sure to check out the Knowledgebase for helpful articles and solutions!
Re: mssql wizard monitoring failed
cd /usr/local/nagios/libexec/
./check_mssql_database.py -H 1.2.3.4 -U abc -P 1234 -T master --datasize --warning 10000 --critical 100000
(20009, 'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (1.2.3.4:1433)\nNet-Lib error during Connection timed out (110)\n')
[root@AXmonitor ~]# head -25 /usr/local/nagios/libexec/check_mssql_server.py
#!/usr/bin/env python
################### check_mssql_database.py ############################
# Version 2.0.2
# Date : Apr 4 2013
# Author : Nicholas Scott ( scot0357 at gmail.com )
# Help : scot0357 at gmail.com
# Licence : GPL - http://www.fsf.org/licenses/gpl.txt
#
# Changelog :
# 1.0.2 - Fixed Uptime Counter to be based off of database
# Fixed divide by zero error in transpsec
# 1.1.0 - Fixed port bug allowing for non default ports | Thanks CBTSDon
# Added batchreq, sqlcompilations, fullscans, pagelife | Thanks mike from austria
# Added mode error checking which caused non-graceful exit | Thanks mike from austria
# 1.2.0 - Added ability to specify instances
# 2.0.0 - Complete rewrite of the structure, re-evaluated some queries
# to hopefully make them more portable | Thanks CFriese
# Updated the way averages are taken, no longer needs tempdb access
# 2.0.1 - Fixed try/finally statement to accomodate Python 2.4 for
# legacy systems
# 2.0.2 - Fixed issues where the SQL cache hit queries were yielding improper results
# when done on large systems | Thanks CTrahan
# 2.0.3 - Remove misleading description of lockwait, removing the word Average -SW
# Modified 01/22/2015 Removed extraneous ';' from output. -BD-G
########################################################################
./check_mssql_database.py -H 1.2.3.4 -U abc -P 1234 -T master --datasize --warning 10000 --critical 100000
(20009, 'DB-Lib error message 20009, severity 9:\nUnable to connect: Adaptive Server is unavailable or does not exist (1.2.3.4:1433)\nNet-Lib error during Connection timed out (110)\n')
[root@AXmonitor ~]# head -25 /usr/local/nagios/libexec/check_mssql_server.py
#!/usr/bin/env python
################### check_mssql_database.py ############################
# Version 2.0.2
# Date : Apr 4 2013
# Author : Nicholas Scott ( scot0357 at gmail.com )
# Help : scot0357 at gmail.com
# Licence : GPL - http://www.fsf.org/licenses/gpl.txt
#
# Changelog :
# 1.0.2 - Fixed Uptime Counter to be based off of database
# Fixed divide by zero error in transpsec
# 1.1.0 - Fixed port bug allowing for non default ports | Thanks CBTSDon
# Added batchreq, sqlcompilations, fullscans, pagelife | Thanks mike from austria
# Added mode error checking which caused non-graceful exit | Thanks mike from austria
# 1.2.0 - Added ability to specify instances
# 2.0.0 - Complete rewrite of the structure, re-evaluated some queries
# to hopefully make them more portable | Thanks CFriese
# Updated the way averages are taken, no longer needs tempdb access
# 2.0.1 - Fixed try/finally statement to accomodate Python 2.4 for
# legacy systems
# 2.0.2 - Fixed issues where the SQL cache hit queries were yielding improper results
# when done on large systems | Thanks CTrahan
# 2.0.3 - Remove misleading description of lockwait, removing the word Average -SW
# Modified 01/22/2015 Removed extraneous ';' from output. -BD-G
########################################################################
Re: mssql wizard monitoring failed
Moreover I am getting below error, I have also tried to update my command with -t 120 seconds, but it did not work for me.
Kindly suggest, if I am doing anything wrong.
Kindly suggest, if I am doing anything wrong.
You do not have the required permissions to view the files attached to this post.
Re: mssql wizard monitoring failed
I've looked into the error "Adaptive Server is unavailable or does not exist" and the consensus seems to be that TCP/IP access for the SQL server is disabled ....
http://toamitkumar.com/blog/2011/04/29/ ... not-exist/
http://stackoverflow.com/questions/1934 ... severity-9
https://msdn.microsoft.com/en-us/library/ms177440.aspx
Could you verify TCP/IP access on/to the SQL server is enabled?
http://toamitkumar.com/blog/2011/04/29/ ... not-exist/
http://stackoverflow.com/questions/1934 ... severity-9
https://msdn.microsoft.com/en-us/library/ms177440.aspx
Could you verify TCP/IP access on/to the SQL server is enabled?
Be sure to check out the Knowledgebase for helpful articles and solutions!
Re: mssql wizard monitoring failed
I have already enabled tcp/ip from the path you suggested.
Re: mssql wizard monitoring failed
The first error you posted looks like the password and/or instance name has special characters in it that are causing an issue. Try editing the service and putting single quotes around the password and instance.
To:
Code: Select all
--username test --password "t@$t" --instance SQL$EXPRESSCode: Select all
--username test --password 't@$t' --instance 'SQL$EXPRESS'Re: mssql wizard monitoring failed
I have already tired with this method, but did not any luck so far...
Re: mssql wizard monitoring failed
Does your instance or password have special chars (!, @, $, etc)?
If so, you might try using a user macro in the check:
If so, you might try using a user macro in the check:
Code: Select all
https://assets.nagios.com/downloads/nagiosxi/docs/Understanding-User-Macros.pdf