monitor sqlserver database
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
monitor sqlserver database
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.
[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.
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: monitor sqlserver database
I didn't install that on remote server, but this required for linux, what about windows since I used windows.
Re: monitor sqlserver database
That's not something you install on the remote server. You need the proper python packages on your Nagios server. Try this:
Code: Select all
yum install pymssql -yFormer Nagios employee
Re: monitor sqlserver database
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?
Did you get an output, similar to this one?
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-dbsrvCode: Select all
OK: Time to connect was 0.00788998603821s|time=0.00788998603821s;;;;;Be sure to check out our Knowledgebase for helpful articles and solutions!
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: monitor sqlserver database
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.
[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
Can you run the following command and show us the output?
Code: Select all
nmap 10.102.6.150 -p 1433Be sure to check out our Knowledgebase for helpful articles and solutions!
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: monitor sqlserver database
[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
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
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: monitor sqlserver database
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:
Code: Select all
nmap 10.102.6.150 -p 1433Re: monitor sqlserver database
If it's a named instance, it will not use 1433 by default.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:
Code: Select all
nmap 10.102.6.150 -p 1433
It appears the plugin accepts the -I <instance name> parameter, so if you have a named instance, use that instead.