Ad Widget

Collapse

Deploy Windows Zabbix agent to multiple hosts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perqvind
    Junior Member
    • Mar 2021
    • 22

    #1

    Deploy Windows Zabbix agent to multiple hosts

    Hi

    I am wondering how people are automatically deploying zabbix agents and configuration to multiple Windows hosts, I found some information on deploying the agent via GPO but I can't figure out how to deploy the agent configuration to each host automatically.

    Regards
    Per


  • perqvind
    Junior Member
    • Mar 2021
    • 22

    #2
    Thanks yeah I know i was just looking if anyone has any experience in deploying the zabbix agent on a large scale windows deployment, I found this https://github.com/Twikki/Zabbix which seems really promising and the guy suggests using git to deploy the agents https://www.youtube.com/watch?v=omm2YUkTkg0

    I will give this a try hopefully it goes smoothly

    Comment

    • perqvind
      Junior Member
      • Mar 2021
      • 22

      #3
      I am one of those Linux people we have windows people also but we are keen on finding a turn key solution that can be deployed but the windows people without too much explanation

      Comment

      • markfree
        Senior Member
        • Apr 2019
        • 868

        #4
        You may start by looking at this document that shows some data about the Agent MSI package for Windows.
        With it, you can automate the package installation with some neat command-line options.

        Integrate that into a PowerShell script and deploy that script to the host or host group you wish.

        In my Windows enviroment, I actually created a full Powershell script to install or update Zabbix Agent with a Zip package stored in a Samba share.
        With GPO I can schedule that script to run whenever I want. If we update the shared package, the script grabs that and automatically updates the Agent.

        Anyway, as cyber pointed out, you might get better help with a Windows forum (maybe stackexchange).
        And, if you make it all work, be sure to recommend us a solution.

        Comment

        • OmegaXis
          Junior Member
          • Apr 2021
          • 6

          #5
          I would recommend using something like intune, MDT or a SCCM server for a centralized deployment of the msi file, your going to need to make sure you have your config file properly modded and all the silent switches set correctly. Other options out there exist (pulseway, tanium, managengine just to think of a couple) I am still working on trying to figure out how to get the silent installer/msi working with some of my windows computers, but the documentation is out there.

          What I would look at is what your company already has for deployment solutions/access management and go from there and see if there is a specific way that that software can handle user scripts and msi files.
          Last edited by OmegaXis; 29-04-2021, 22:18. Reason: additional details

          Comment

          • Andrew Graham
            Junior Member
            • Apr 2021
            • 1

            #6
            If you are using SCCM for deployment on windows then it is a basic create the deployment package following SCCM guides for deploying an MSI

            Otherwise use a freeware PDQ Deploy same thing follow guidelines on package deployments guides for deploying an MSI

            Comment

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

              #7
              That is not exactly Zabbix question, is it? It is the question of how to use your existing software deployment tools.....

              Comment

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

                #8
                In a larger environment you should go to your "windows people" give them your requirements and say, that they should now do it.. Unless you are one of those "windows people"... then you are a bit screwed.......

                Comment

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

                  #9
                  These linked scripts looked pretty ok... Just need some adjustments according to your environment... For example, if you have multiple proxies, then script should put correct one into conf file etc... And how are your local regulations about hostnames... short, long, uppercase, lowercase etc......

                  Comment

                  • B_O_F_H
                    Junior Member
                    • Feb 2021
                    • 12

                    #10
                    When you deploy the agent to multiple hosts you always have to put in the server name in the config file in the Line "Hostname= " under "Active Checks". How do you do that exactly ?

                    Comment

                    • markfree
                      Senior Member
                      • Apr 2019
                      • 868

                      #11
                      Originally posted by B_O_F_H
                      When you deploy the agent to multiple hosts you always have to put in the server name in the config file in the Line "Hostname= " under "Active Checks". How do you do that exactly ?
                      According to doc, Hostname parameter "value is acquired from HostnameItem if undefined".

                      And HostnameItem parameter "defines a Zabbix agent item used for getting host name".
                      Also, HostnameItem uses "system.hostname" key by default.

                      Therefore, if you leave Hostname unspecified, it will default to HostnameItem and acquire the value returned by the "system.hostname" agent key, your host NetBIOS name. Check out Zabbix agent on Microsoft Windows.

                      Unless you need a different Hostname, you can leave it empty.

                      If you are trying to automate the agent deployment, another option is to set Hostname parameter with your Windows hostname variable.
                      Batch uses %COMPUTERNAME% variable and PowerShell uses $env:COMPUTERNAME

                      Comment

                      • B_O_F_H
                        Junior Member
                        • Feb 2021
                        • 12

                        #12
                        Thank you very much for your feedback markfree

                        Comment

                        • edgecase
                          Junior Member
                          • Sep 2012
                          • 2

                          #13
                          Originally posted by markfree

                          According to doc, Hostname parameter "value is acquired from HostnameItem if undefined".

                          Unless you need a different Hostname, you can leave it empty.

                          If you are trying to automate the agent deployment, another option is to set Hostname parameter with your Windows hostname variable.
                          Batch uses %COMPUTERNAME% variable and PowerShell uses $env:COMPUTERNAME
                          This works in the config file itsself, to comment out #Hostname= for example... but with the MSI installer, if you specify parameters, they cannot be blank, so
                          Code:
                          msiexec /i zabbix.msi /q HOSTNAME=
                          does not work (at least if parameters are in an MST file)
                          and if HOSTNAME= is omitted, the MSI installer hardcodes the hostname in the conf file, instead of leaving it blank so hostname.item can take over the setting.

                          Comment

                          Working...