Ad Widget

Collapse

How do I use MSSQL Plugin and Install it on Zabbix Agent 2?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RaulChiarella
    Member
    • Apr 2021
    • 59

    #1

    How do I use MSSQL Plugin and Install it on Zabbix Agent 2?

    Hello.

    I want to monitor my SQL Server using the following documentation: https://www.zabbix.com/integrations/mssql
    But I am not understanding how to install and enable the plugin MSSQL for Zabbix Agent 2.



    The article above does tell some things about the configs, but I just downloaded Zabbix Agent 2 and there is no MSSQL Plugin - How do I install it?
    Do I need to compile it and install manually?

    Below are the plugins that come with Zabbix Agent 2 when we download it from the site.



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

    #2
    Plugins for PG, mongodb and mssql need to be separately installed. for linuxes those rpm-s, deb-s whatever are available in same place as agents (for example for 6.4 on rh8 -> https://repo.zabbix.com/zabbix/6.4/rhel/8/x86_64/ ) for Windows you can find installers from here https://cdn.zabbix.com/zabbix/binaries/stable/6.4/

    Comment

    • RaulChiarella
      Member
      • Apr 2021
      • 59

      #3
      Originally posted by cyber
      Plugins for PG, mongodb and mssql need to be separately installed. for linuxes those rpm-s, deb-s whatever are available in same place as agents (for example for 6.4 on rh8 -> https://repo.zabbix.com/zabbix/6.4/rhel/8/x86_64/ ) for Windows you can find installers from here https://cdn.zabbix.com/zabbix/binaries/stable/6.4/
      Hello. I see. I need to monitor on a SQL Server on a Windows Server installation.. But the installers for Windows are just MSIs that installs Zabbix Agent 2 normally, and there is no MSSQL plugin. How do I compile and install those on Windows installations? On Linux it worked, but I am having trouble doing that on Windows.

      Comment

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

        #4
        Ehh... trying to format it nicely and editing a post couple of times sent it to approvals..
        But There are agent MSI-s and there are plugin MSI-s... like https://cdn.zabbix.com/zabbix/binari...dows-amd64.msi
        I guess you need to browse a bit to find exactly your version ...

        Comment

        • RaulChiarella
          Member
          • Apr 2021
          • 59

          #5
          Originally posted by cyber
          Ehh... trying to format it nicely and editing a post couple of times sent it to approvals..
          But There are agent MSI-s and there are plugin MSI-s... like https://cdn.zabbix.com/zabbix/binari...dows-amd64.msi
          I guess you need to browse a bit to find exactly your version ...
          Yes, I did find my version but the MSSQL plugin does not come with the MSI package...
          I need to put the plugin inside it. There is not a single MSI package on that repository that comes with MSSQL Plugin installed...

          I was able to do this in Linux but I am having problems on installing those GO plugins in Zabbix Agent 2 for Windows.

          Comment

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

            #6
            How many times I have to say , separate installer, not the "agent installer"...

            Click image for larger version

Name:	image.png
Views:	7514
Size:	100.8 KB
ID:	484993
            Zip for sure had mssql plugin inside...
            Click image for larger version

Name:	image.png
Views:	7489
Size:	6.9 KB
ID:	484994

            Comment

            • RaulChiarella
              Member
              • Apr 2021
              • 59

              #7
              Oh, I see. Sorry! Thank you. It worked!

              Comment

              • The-Tech
                Junior Member
                • Jan 2022
                • 29

                #8
                Good evening, I am new to Zabbix and I am attempting to do the same thing as Raul. I have the agent and plugins installed on a Test Win server with MS SQL2022 however I am not sure what settings I need to make to the mssql.conf file. I am sure it's simple enough but is there any examples that anyone can offer? I have created my SQL account as follows below but the conf file has me confused.



                CREATE LOGIN zabbix WITH PASSWORD = 'password'
                GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
                USE msdb
                CREATE USER zabbix FOR LOGIN zabbix
                GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
                GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
                GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
                GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
                GO

                Comment

                • anslu
                  Member
                  • Aug 2023
                  • 30

                  #9
                  Originally posted by The-Tech
                  Good evening, I am new to Zabbix and I am attempting to do the same thing as Raul. I have the agent and plugins installed on a Test Win server with MS SQL2022 however I am not sure what settings I need to make to the mssql.conf file. I am sure it's simple enough but is there any examples that anyone can offer? I have created my SQL account as follows below but the conf file has me confused.



                  CREATE LOGIN zabbix WITH PASSWORD = 'password'
                  GRANT VIEW SERVER PERFORMANCE STATE TO zabbix
                  USE msdb
                  CREATE USER zabbix FOR LOGIN zabbix
                  GRANT EXECUTE ON msdb.dbo.agent_datetime TO zabbix
                  GRANT SELECT ON msdb.dbo.sysjobactivity TO zabbix
                  GRANT SELECT ON msdb.dbo.sysjobservers TO zabbix
                  GRANT SELECT ON msdb.dbo.sysjobs TO zabbix
                  GO
                  Please update the tempate at webconsole level and then unlink and link template again
                  {$MSSQL.USER}
                  {$MSSQL.PASSWORD}
                  {$MSSQL.URI} - usually entry such as "sqlserver://localhost:1433" will work, here you can find different use cases if necessar Browse Zabbix Agent 2 Plugins / MSSQL - ZABBIX GIT

                  Macros can be set at global template level or at host level.

                  Comment

                  Working...