Ad Widget

Collapse

MS SQL Monitoring using Zabbix Agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jasdeep!8
    Junior Member
    • Mar 2022
    • 13

    #1

    MS SQL Monitoring using Zabbix Agent

    Hi,

    I am trying to monitor MS SQL using the templates provide on zabbix share https://github.com/zabbix/community-...oft_SQL_Server.

    But after adding the templates and attaching them to the server I am getting unsupported item key for both of them.

    I am looking to monitor MS SQL DB and instances using the agent rather than ODBC.

    Any help would be much appreciated.

    Thanks

    Click image for larger version

Name:	Screenshot 2022-06-13 123101.png
Views:	9527
Size:	31.3 KB
ID:	446087 Click image for larger version

Name:	Screenshot 2022-06-13 123101.png
Views:	9508
Size:	31.3 KB
ID:	446088


  • oceanman
    Junior Member
    • Jun 2022
    • 4

    #2
    At first you should create a user for zabbix sql monitoring at each sql server

    My .ini files content like below

    nano /etc/odbc.ini


    [Zabbix180]
    Driver = ODBC Driver 17 for SQL Server
    Server = 10.0.0.180\\\Zabbix180,1433
    [Zabbix144]
    Driver = ODBC Driver 17 for SQL Server
    Server = 192.168.5.144\\\Zabbix144,1433
    [Zabbix40]
    Driver = ODBC Driver 17 for SQL Server
    Server = 10.0.0.40\\\Zabbix40,1433
    [Zabbix70]
    Driver = ODBC Driver 17 for SQL Server
    Server = 10.0.0.70\\\Zabbix70,1433
    [Zabbix60]
    Driver = ODBC Driver 17 for SQL Server
    Server = 10.0.0.60\\\Zabbix60,1433



    nano /etc/odbcinst.ini

    [ODBC Driver 18 for SQL Server]
    Description=Microsoft ODBC Driver 18 for SQL Server
    Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.0.so.1.1
    UsageCount=1

    [ODBC Driver 17 for SQL Server]
    Description=Microsoft ODBC Driver 17 for SQL Server
    Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.9.so.1.1
    UsageCount=10



    you should connect to sql server with this command from zabbix server.

    # isql -v Zabbix60 'zbxmonitor' 'sqluserpassword'

    Comment


    • jasdeep!8
      jasdeep!8 commented
      Editing a comment
      Hi,
      Thanks for your reply.

      I actually want to monitor the metrics using zabbix agent rather than ODBC since some of the servers in our production are still on ODBC drivers 13 and I guess there's no backwards compatibility that's why I am seeking to do it via the agent.

      If you have any idea for the same that'll be really helpful. i have attached the link from where I have downloaded those templates using agent but they don't provide better clarity. If you could take a look and provide insight I'll be really thankful.
  • studero
    Member
    • Aug 2023
    • 84

    #3
    Hi all,

    I have the same problem. And do not want to use ODBC. So do you have found a solution about the problem.

    Regards
    Olivier​

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4806

      #4
      Templates linked in first post, use windows performance counters to retrieve data... You probably need to enable those. Besides that, it mentions usage of powershell script to do the discovery of DB-s and instances. But that script seems to be missing from git... I suppose it was meant to be installed and defined as UserParameter, that's why topic starter has those "unsupported key" notifications there... no UserParameters defined.

      Comment

      Working...