Advertisement
Open navigation Go to Reddit Home
Log In Log in to Reddit
Open settings menu
Go to zabbix
r/zabbix
• 2 yr. ago
by
Amit_Pawar1998
 

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.

  1. create the Zabbix user in the Database and give him read permission for sysjobs and other jobs

  2. Install the ODBC driver package on the zabbix server as well as client-server

  3. 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.

Sort by:
Best
Open comment sort options
maclan13
• 2 yr. ago

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.

  1. 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;
    
  2. Install MS SQL ODBC drivers and unixODBC (Found a guide online for Ubuntu)

    • update odbc.ini with DB DSNs

    • test connection and user

  3. Install MS SQL DB Template

  4. Assign Template to host

Amit_Pawar1998
• 2 yr. ago

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?

  • TOPICS
  • Gaming
    • Valheim
    • Genshin Impact
    • Minecraft
    • Pokimane
    • Halo Infinite
    • Call of Duty: Warzone
    • Path of Exile
    • Hollow Knight: Silksong
    • Escape from Tarkov
    • Watch Dogs: Legion
  • Sports
    • NFL
    • NBA
    • Megan Anderson
    • Atlanta Hawks
    • Los Angeles Lakers
    • Boston Celtics
    • Arsenal F.C.
    • Philadelphia 76ers
    • Premier League
    • UFC
  • Business
    • GameStop
    • Moderna
    • Pfizer
    • Johnson & Johnson
    • AstraZeneca
    • Walgreens
    • Best Buy
    • Novavax
    • SpaceX
    • Tesla
  • Crypto
    • Cardano
    • Dogecoin
    • Algorand
    • Bitcoin
    • Litecoin
    • Basic Attention Token
    • Bitcoin Cash
  • Television
    • The Real Housewives of Atlanta
    • The Bachelor
    • Sister Wives
    • 90 Day Fiance
    • Wife Swap
    • The Amazing Race Australia
    • Married at First Sight
    • The Real Housewives of Dallas
    • My 600-lb Life
    • Last Week Tonight with John Oliver
  • Celebrity
    • Kim Kardashian
    • Doja Cat
    • Iggy Azalea
    • Anya Taylor-Joy
    • Jamie Lee Curtis
    • Natalie Portman
    • Henry Cavill
    • Millie Bobby Brown
    • Tom Hiddleston
    • Keanu Reeves
  • RESOURCES
  • About Reddit
  • Advertise
  • Help
  • Blog
  • Careers
  • Press
  • More posts you may like

    Zabbix Free software
    • r/ThePirateBays

      20 Years!

      221 upvotes · 24 comments

    • r/golang

      psql driver that supports the sql.NamedArgs & sql.Named?

      6 upvotes · 3 comments

    • r/csharp

      Help with Entity Framework 6 and SQL Server Audit Log tracking

      2 upvotes · 4 comments

    • Promoted
      sidebar promoted post thumbnail
      r/AZURE

      SQL Server in Azure

      24 upvotes · 16 comments

    • r/ansible

      Chocolately Software Deploy Works with DC but not with Domain Computer

      5 upvotes · 16 comments

    • r/SQLServer

      TLS in an environment with Shared SQL Instance

      2 upvotes · 5 comments

    • r/synology

      Connecting phpmyadmin (MariaDB databse) on Synology to PowerBI

      2 upvotes · 2 comments

    • Promoted
      sidebar promoted post thumbnail
      r/NextCloud

      Setup Nextcloud with Portainer and nginx proxy manager

      14 upvotes · 8 comments

    • r/devops

      Having Issues connecting to MySQL Database build from Docker Image with Python (PyMySQL/SQLAlchemy)

      2 upvotes · 3 comments

    • r/djangolearning

      Is there a way to enable sql tracing in Django?

      2 upvotes · 3 comments

    • r/gis

      Editing ESRI EGDB data in Excel - open source solutions?

      2 upvotes · 4 comments

    • r/PFSENSE

      firewall rules for internal zabbix network scanner server

      9 upvotes · 3 comments

    • r/SQLServer

      Help Installing Oracle OBDC Driver on Windows

      self.SQLServer
      3 comments

    • r/oracle

      I'm on Oracle SQL Developer version 18.1.0.095. How do I automate a sql query and data export to a csv/excel file?

      8 upvotes · 19 comments

    • r/AskProgramming

      Help with VBA + SQL

      4 upvotes · 12 comments