MS SQL Database configuration issues
MS SQL Database configuration issues
Hi,
We have confiugured MS SQL wizards succesfully and were sucessful in monitoring couple of parameters. However, this morning we got an alert saying that the services were now critical and the status info is shown as null. I tried to test the plugin from the commdn line and executed the command ./check_mssql_server.py -h and get the below message.
import: unable to open X server `' @ import.c/ImportImageCommand/359.
./check_mssql_server.py: line 20: from: command not found
./check_mssql_server.py: line 27: requiredArgs: command not found
./check_mssql_server.py: line 28: syntax error near unexpected token `,'
./check_mssql_server.py: line 28: ` ( '-H' , 'hostname' , 'Specify MSSQL Server Address' , False ),'
I have checked the pre-requisites, they look fine. Re-installed the wizards and it is still the same.
We have confiugured MS SQL wizards succesfully and were sucessful in monitoring couple of parameters. However, this morning we got an alert saying that the services were now critical and the status info is shown as null. I tried to test the plugin from the commdn line and executed the command ./check_mssql_server.py -h and get the below message.
import: unable to open X server `' @ import.c/ImportImageCommand/359.
./check_mssql_server.py: line 20: from: command not found
./check_mssql_server.py: line 27: requiredArgs: command not found
./check_mssql_server.py: line 28: syntax error near unexpected token `,'
./check_mssql_server.py: line 28: ` ( '-H' , 'hostname' , 'Specify MSSQL Server Address' , False ),'
I have checked the pre-requisites, they look fine. Re-installed the wizards and it is still the same.
Last edited by HAL on Tue Oct 30, 2012 7:32 am, edited 1 time in total.
Re: MS SQL Database configuration issues
Can you post the output of:
cat /usr/local/nagios/etc/check_mssql_server.py | head
Also can you sucessfully instantiate a python instance? Can you run the following and return the output:
python -v
python -V
cat /usr/local/nagios/etc/check_mssql_server.py | head
Also can you sucessfully instantiate a python instance? Can you run the following and return the output:
python -v
python -V
Nicholas Scott
Former Nagios employee
Former Nagios employee
Re: MS SQL Database configuration issues
Hi,
are you sure its etc/check_mssql_server.py? out put for that command is "No such file or directory" .
If i replace etc with libexec the the output is
#!/usr/bin/env python
################### check_mssql_database.py ####################
# Version 1.1.0
# Date : Jan 25th 2012
# Author : Nicholas Scott ( scot0357 at gmail.com )
# Help : scot0357 at gmail.com
# Licence : GPL - http://www.fsf.org/licenses/gpl.txt
# TODO : Bug Testing, Feature Adding
# Changelog :
# 1.0.2 - Fixed Uptime Counter to be based off of database
output of python -v is output for python -V is 2.6.6
are you sure its etc/check_mssql_server.py? out put for that command is "No such file or directory" .
If i replace etc with libexec the the output is
#!/usr/bin/env python
################### check_mssql_database.py ####################
# Version 1.1.0
# Date : Jan 25th 2012
# Author : Nicholas Scott ( scot0357 at gmail.com )
# Help : scot0357 at gmail.com
# Licence : GPL - http://www.fsf.org/licenses/gpl.txt
# TODO : Bug Testing, Feature Adding
# Changelog :
# 1.0.2 - Fixed Uptime Counter to be based off of database
output of python -v is output for python -V is 2.6.6
You do not have the required permissions to view the files attached to this post.
Re: MS SQL Database configuration issues
Is this an Issue with the plug-in or python??
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: MS SQL Database configuration issues
I would guess python, but I've never seen this before...
Can you run it like this
Also, can we confirm the file size to make sure something hasn't happened to the plugin
Can you run it like this
Code: Select all
python ./check_mssql_server.py -hCode: Select all
ll ./check_mssql_server.pyRe: MS SQL Database configuration issues
Output for the command 'python ./chewck_mssql_server.py'
Output for the second command ll ./check_mssql-server.py is
-rwxr-xr-x 1 nagios users 20336 Oct 2 16:09 ./check_mssql_server.py
Output for the second command ll ./check_mssql-server.py is
-rwxr-xr-x 1 nagios users 20336 Oct 2 16:09 ./check_mssql_server.py
You do not have the required permissions to view the files attached to this post.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: MS SQL Database configuration issues
the file looks good but the attachment is the same one from before...HAL wrote:Output for the command 'python ./chewck_mssql_server.py'
Output for the second command ll ./check_mssql-server.py is
-rwxr-xr-x 1 nagios users 20336 Oct 2 16:09 ./check_mssql_server.py
Re: MS SQL Database configuration issues
This is the output we got
python ./check_mssql_server.py -h
Usage: check_mssql_server.py -H hostname -U user -P password -T table --mode
Options:
-h, --help show this help message and exit
Required Options:
-H HOSTNAME, --hostname=HOSTNAME
Specify MSSQL Server Address
-U USER, --user=USER
Specify MSSQL User Name
-P PASSWORD, --password=PASSWORD
Specify MSSQL Password
Threshold Options:
-I INSTANCE, --instance=INSTANCE
Specify instance
-p PORT, --port=PORT
Specify port. [Default: 1433]
-w WARNING, --warning=WARNING
Specify min:max threshold
-c CRITICAL, --critical=CRITICAL
Specify min:max threshold
Mode Options:
--bufferhitratio Buffer Cache Hit Ratio
--pagelooks Page Lookups Per Second
--freepages Free Pages (Cumulative)
--totalpages Total Pages (Cumulative)
--targetpages Target Pages
--databasepages Database Pages
--stolenpages Stolen Pages
--lazywrites Lazy Writes / Sec
--readahead Readahead Pages / Sec
--pagereads Page Reads / Sec
--checkpoints Checkpoint Pages / Sec
--pagewrites Page Writes / Sec
--lockrequests Lock Requests / Sec
--locktimeouts Lock Timeouts / Sec
--deadlocks Deadlocks / Sec
--lockwaits Lockwaits / Sec
--lockwait Lock Wait Average Time (ms)
--averagewait Average Wait Time (ms)
--pagesplits Page Splits / Sec
--cachehit Cache Hit Ratio
--time2connect Check Time to Connect [DEFAULT]
--batchreq Batch Requests / Sec
--sqlcompilations SQL Compilations / Sec
--fullscans Full Scans / Sec
--pagelife Page Life Expectancy
python ./check_mssql_server.py -h
Usage: check_mssql_server.py -H hostname -U user -P password -T table --mode
Options:
-h, --help show this help message and exit
Required Options:
-H HOSTNAME, --hostname=HOSTNAME
Specify MSSQL Server Address
-U USER, --user=USER
Specify MSSQL User Name
-P PASSWORD, --password=PASSWORD
Specify MSSQL Password
Threshold Options:
-I INSTANCE, --instance=INSTANCE
Specify instance
-p PORT, --port=PORT
Specify port. [Default: 1433]
-w WARNING, --warning=WARNING
Specify min:max threshold
-c CRITICAL, --critical=CRITICAL
Specify min:max threshold
Mode Options:
--bufferhitratio Buffer Cache Hit Ratio
--pagelooks Page Lookups Per Second
--freepages Free Pages (Cumulative)
--totalpages Total Pages (Cumulative)
--targetpages Target Pages
--databasepages Database Pages
--stolenpages Stolen Pages
--lazywrites Lazy Writes / Sec
--readahead Readahead Pages / Sec
--pagereads Page Reads / Sec
--checkpoints Checkpoint Pages / Sec
--pagewrites Page Writes / Sec
--lockrequests Lock Requests / Sec
--locktimeouts Lock Timeouts / Sec
--deadlocks Deadlocks / Sec
--lockwaits Lockwaits / Sec
--lockwait Lock Wait Average Time (ms)
--averagewait Average Wait Time (ms)
--pagesplits Page Splits / Sec
--cachehit Cache Hit Ratio
--time2connect Check Time to Connect [DEFAULT]
--batchreq Batch Requests / Sec
--sqlcompilations SQL Compilations / Sec
--fullscans Full Scans / Sec
--pagelife Page Life Expectancy
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: MS SQL Database configuration issues
Output : /bin/env