I want to monitor the data on Microsoft sql server database using Zabbix. for example, in table T1 containing columns col1, col2, col3, when the value of col1 is less than 0 it should notify me. Due to the security reason I cannot install agent on the database host. I want to know how can I monitor this database without installing Zabbix agent on its host?
Asked
Active
Viewed 3,503 times
1 Answers
0
You can use ODBC monitoring, described in here.
The template already has standard items preconfigured, you must add your customizations: your item will be a SELECT statement, your trigger will react to the returned value.
You can also find 3rd party stuff in the second tab or in Zabbix Share.

Simone Zabberoni
- 2,024
- 1
- 10
- 15
-
Thanks Simon, I installed ODBC on my Zabbix server (Zabbix appliance on VMWare), and defined macros {HOST.CONN}, {$MSSQL.PORT}, {$MSSQL.USER} and {$MSSQL.PASSWORD}, but when I'm trying to add temple (MSSQL by ODBC) it gives me error: Cannot find host interface on "Database server" for item key "net.tcp.service[tcp,{HOST.CONN},{$MSSQL.PORT}]". – malih Dec 01 '21 at 08:07
-
You need to configure an agent interface for your host: configuration -> hosts -> your host -> interfaces. That ip address is used by Zabbix for the "net.tcp.service" check and other simple checks, it does not need an agent installed. – Simone Zabberoni Dec 01 '21 at 08:24
-
Thanks, I did it and it worked, but in Monitoring->Problems part it says that "The TCP port of the MS SQL Server service is currently unavailable". Could it be the database server problem (I mean granting permissions, wrong port number, etc.) ? Or I should check Zabbix config? – malih Dec 01 '21 at 08:53
-
Means that Zabbix sent a TCP connect to the Database Server on port {$MSSQL.PORT}: could be the wrong port, a windows firewall setting or a firewall in the middle if your zabbix is not in the same network. The database server can also be listening on localhosto only . – Simone Zabberoni Dec 01 '21 at 09:22
-
Thanks Simon, It's got fixed. As you mentioned, the problem was with port number – malih Dec 01 '21 at 11:03