Ad Widget

Collapse

Zabbix Agent auto deploy?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jrosetto
    Member
    • Apr 2015
    • 38

    #1

    Zabbix Agent auto deploy?

    I have been searching for a way to auto deploy the zabbix agent over GPO to no avail. My end goal is to have an agent get installed onto a windows computer and through active checks auto add itself to a group with the required templates attached and begin monitoring. I have everything working, just looking for a way to auto deploy the agent on a mass scale though group policy or something similar. Any help or suggestions are greatly appreciated.

    Thanks.
  • nick0909
    Member
    • Apr 2013
    • 73

    #2
    I just use a script, we run it manually but you could run it from a Computer GPO. You could also add check at the start to see if it has been run before (even with a version check so you can easily use it to update agents as well).

    --
    Code:
    @ECHO -----------------------------------------
    @ECHO Copying new agent...
    mkdir C:\zabbix
    
    if defined ProgramFiles(x86) (
    @ECHO Assuming 64-Bit OS!
    copy \\FILESHARE\Zabbix-Agents\bin\win64\zabbix_agentd.exe C:\zabbix
    ) else (
    @ECHO Assuming 32-Bit OS!
    copy \\FILESHARE\Zabbix-Agents\bin\win32\zabbix_agentd.exe C:\zabbix
    )
    copy \\FILESHARE\Zabbix-Agents\scripts\* C:\zabbix
    copy \\FILESHARE\Zabbix-Agents\bin\zabbix_agentd-cb.conf C:\zabbixzabbix_agentd.conf
    
    @ECHO -----------------------------------------
    @ECHO Installing service and starting agent...
    
    C:\zabbix\zabbix_agentd.exe -i -c C:\zabbix\zabbix_agentd.conf
    C:\zabbix\zabbix_agentd.exe -V
    net start "zabbix agent"

    Comment

    • jrosetto
      Member
      • Apr 2015
      • 38

      #3
      Thanks for the suggestion. I was going a totally different way with it. I think I'll script some vbs so it runs silently on the machines at each boot.

      Originally posted by nick0909
      I just use a script, we run it manually but you could run it from a Computer GPO. You could also add check at the start to see if it has been run before (even with a version check so you can easily use it to update agents as well).

      --
      Code:
      @ECHO -----------------------------------------
      @ECHO Copying new agent...
      mkdir C:\zabbix
      
      if defined ProgramFiles(x86) (
      @ECHO Assuming 64-Bit OS!
      copy \\FILESHARE\Zabbix-Agents\bin\win64\zabbix_agentd.exe C:\zabbix
      ) else (
      @ECHO Assuming 32-Bit OS!
      copy \\FILESHARE\Zabbix-Agents\bin\win32\zabbix_agentd.exe C:\zabbix
      )
      copy \\FILESHARE\Zabbix-Agents\scripts\* C:\zabbix
      copy \\FILESHARE\Zabbix-Agents\bin\zabbix_agentd-cb.conf C:\zabbixzabbix_agentd.conf
      
      @ECHO -----------------------------------------
      @ECHO Installing service and starting agent...
      
      C:\zabbix\zabbix_agentd.exe -i -c C:\zabbix\zabbix_agentd.conf
      C:\zabbix\zabbix_agentd.exe -V
      net start "zabbix agent"

      Comment

      • tiarnaigh
        Junior Member
        • Sep 2013
        • 27

        #4
        In my case, I use Chef to do the base install of the Zabbix agent on my remote hosts (The recipe I have does an install from source. i.e. installs various dependencies, then pulls down tar ball and builds from source).

        Once I have Zabbix up and running, I then use Zabbix server thereafter to upgrade to the various versions (i.e. 2.2 to 2.4 etc. etc.) using remote calls.

        As for the discovery/auto-registration, I defined a bunch of "Auto Registration" rules in Zabbix server under "Configuration/Actions/Auto Registration", based on the expected hostname of the new node. So, if the new nodes phones home to Zabbix server say initially as apache01, then it's added to the Apache Servers host group and linked with the "Template OS Linux" for instance.

        Comment

        Working...