Ad Widget

Collapse

add item to zabbix agent configuration

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wickeren
    Junior Member
    • Sep 2021
    • 3

    #1

    add item to zabbix agent configuration

    I just found to have forgotten to add
    Code:
    AllowKey=system.run[*]
    to all couple of hundred hosts...
    Is there a simple way to add this or do I really have to RDP to all servers just to add one mising key?
  • wickeren
    Junior Member
    • Sep 2021
    • 3

    #2
    Originally posted by cyber
    How did you add all those agents and configs at first place? .
    We have a template machine and just clone them. For new machines it will befine as I just added AllowKey=system.run[*] to the config. But for existing machines it will be a challenge.


    Is AllowKey=system.run[*] a parameter you can specfify when doing a scripted install with msiexec, just like SERVER= and LISTENPORT=? So far I had no luck doing this...




    Comment

    • wickeren
      Junior Member
      • Sep 2021
      • 3

      #3
      simple powershell script will do:

      Code:
      (Get-Content "C:\Program Files\Zabbix Agent\zabbix_agentd.conf" -Raw).Replace('EnableRemoteCommands=1','AllowKey=sy stem.run[*]') |
      Set-Content "C:\Program Files\Zabbix Agent\zabbix_agentd.conf"
      I already have a version check action that triggers an MSI installation of a new zabbix agent, just have to add this powershell script and I think all will be fine when upgrading to agent version 5.4.4.

      Comment

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

        #4
        There is a limited set of options you can specify on command line

        If you do not have any central tool for package distribution, you are quite limited in options I think... Script, which connects to all hosts and installs/modifies config file seems most painless ...

        Comment

        Working...