Page 1 of 1
monitor sqlserver database
Posted: Wed Jul 09, 2014 5:33 am
by hanya.radwan
I created services to connect to sqlserver DB, but all the services return the following:
[root@nms ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 10.102.6.150 -U 'sa' -P 'jwl_f!eet4Altair' -T 'GPS' -I fleet-dbsrv --datasize --warning 17000000 --critical 20000000
<class 'pymssql.InterfaceError'>
Caught unexpected error. This could be caused by your sysperfinfo not containing the proper entries for this query, and you may delete this service check.
Re: monitor sqlserver database
Posted: Wed Jul 09, 2014 7:16 am
by belvdr
Re: monitor sqlserver database
Posted: Wed Jul 09, 2014 7:56 am
by hanya.radwan
I didn't install that on remote server, but this required for linux, what about windows since I used windows.
Re: monitor sqlserver database
Posted: Wed Jul 09, 2014 3:29 pm
by tmcdonald
That's not something you install on the remote server. You need the proper python packages on your Nagios server. Try this:
Re: monitor sqlserver database
Posted: Wed Jul 09, 2014 3:34 pm
by lmiltchev
Double check to make sure you are using the correct IP address, and correct credentials. Can you run the following command and show the output?
Code: Select all
/usr/local/nagios/libexec/check_mssql_database.py -H 10.102.6.150 -U 'sa' -P 'jwl_f!eet4Altair' -T 'GPS' -I fleet-dbsrv
Did you get an output, similar to this one?
Code: Select all
OK: Time to connect was 0.00788998603821s|time=0.00788998603821s;;;;;
Re: monitor sqlserver database
Posted: Thu Jul 10, 2014 3:28 am
by hanya.radwan
I installed yum install pymssql -y.
[root@nms ~]# /usr/local/nagios/libexec/check_mssql_database.py -H 10.102.6.150 -U 'sa' -P 'jwl_f!eet4Altair' -T 'GPS' -I fleet-dbsrv
<class 'pymssql.InterfaceError'>
Caught unexpected error. This could be caused by your sysperfinfo not containing the proper entries for this query, and you may delete this service check.
Re: monitor sqlserver database
Posted: Thu Jul 10, 2014 11:56 am
by lmiltchev
Can you run the following command and show us the output?
Re: monitor sqlserver database
Posted: Sun Jul 13, 2014 3:48 am
by hanya.radwan
[root@nms ~]# nmap 10.102.6.150 -p 1433
Starting Nmap 5.51 (
http://nmap.org ) at 2014-07-13 11:48 EEST
Nmap scan report for 10.102.6.150
Host is up (0.0012s latency).
PORT STATE SERVICE
1433/tcp filtered ms-sql-s
Nmap done: 1 IP address (1 host up) scanned in 0.66 seconds
You have new mail in /var/spool/mail/root
Re: monitor sqlserver database
Posted: Mon Jul 14, 2014 9:33 am
by slansing
It looks like the default port is filtered, you will need to unblock it in order to get proper traffic through. This may or may not be the root cause of this issue, but you will need to unblock it regardless. Let us know how the command's output looks after you unblock that port. If it is still the same, post the output of:
Re: monitor sqlserver database
Posted: Mon Jul 14, 2014 12:12 pm
by belvdr
slansing wrote:It looks like the default port is filtered, you will need to unblock it in order to get proper traffic through. This may or may not be the root cause of this issue, but you will need to unblock it regardless. Let us know how the command's output looks after you unblock that port. If it is still the same, post the output of:
If it's a named instance, it will not use 1433 by default.
It appears the plugin accepts the -I <instance name> parameter, so if you have a named instance, use that instead.