Microsoft SQL DB monitoring by ODBC in zabbix
Hi team
Did anyone monitor the multiple Database name within the same server?
I want to monitor the MS SQL DB and different database names for single server.
Please let me know my steps are correct or not.
I am going to config monitoring by below steps.
-
create the Zabbix user in the Database and give him read permission for sysjobs and other jobs
-
Install the ODBC driver package on the zabbix server as well as client-server
-
provide the username and password in macros field in zabbix front end and apply the default MSSql DB by odbc template on the server.
Please let me is there any simple way other than the above steps.
Yes, you will be able to monitor multiple databases once the discover rule of the template runs.
This guide helped me.
https://www.zabbix.com/integrations/mssql
Looking at my notes it's similar to what you outlined.
-
Setup db user and provide necessary permissions.
TSQL to create and grant monitoring user appropriate permissions:
USE [master] GO CREATE LOGIN zbx_monitor WITH PASSWORD=N'superSecurePassword', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF GO GRANT VIEW SERVER STATE TO zbx_monitor GO GRANT VIEW ANY DEFINITION TO zbx_monitor GO USE msdb; GO CREATE USER zbx_monitor FOR LOGIN zbx_monitor; --EXEC sp_addrolemember @rolename='public', @membername=zbx_monitor; --EXEC sp_addrolemember N''db_datawriter'', zbx_monitor GRANT SELECT ON OBJECT::msdb.dbo.sysjobs TO zbx_monitor; GRANT SELECT ON OBJECT::msdb.dbo.sysjobservers TO zbx_monitor; GRANT SELECT ON OBJECT::msdb.dbo.sysjobactivity TO zbx_monitor; GRANT EXECUTE ON OBJECT::msdb.dbo.agent_datetime TO zbx_monitor;
-
Install MS SQL ODBC drivers and unixODBC (Found a guide online for Ubuntu)
-
update odbc.ini with DB DSNs
-
test connection and user
-
-
Install MS SQL DB Template
-
Assign Template to host
Hello
I have install the MS SQL 18 ODBC driver pkg
I am getting the login timeout error while executing the isql -v <DSN>
Which parameters did you mention in odbc.ini file? We can put any DSN name in odbc.ini file? Right?