Ad Widget

Collapse

Zabbix agents upgrade

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • j0vis
    Junior Member
    • Jan 2024
    • 3

    #1

    Zabbix agents upgrade

    Hello,
    We have 1000+ VMs in our company and it has agents from v5.0 and above. I'm looking for information how to upgrade all of them to 6.4 since it happens that we desperately need new supported keys.

    We can upgrade agents with Software Center, but then it leaves problem with config (upgrading agent removes "UserParameter" from config file. 2nd idea was to copy config/upgrade agent/overwrite new config with a new one. But I found that in new config "EnableRemoteCommands" was changed to Allow/DenyKey=system.run[*]. So Im afraid overwriting idea wont work if there are any "EnableRemoteCommands" filled somewhere.

    Hit a wall here. Not gonna waste the time to upgrade every agent manually.

    Maybe somenone have some experience with that? Any help would be appreciated
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Zabbix agent will read one or more config files from a specific directory, as long as each text config file ends in .conf. You can keep your per-host customizations in files in that directory, so that the main config file has few or no changes made to it, and it can safely be replaced by an upgrade.

    You're going to have to find some way to identify which hosts currently have EnableRemoteCommands, probably through scripting and something like PowerShell Remoting or ssh or whatever, and then generate a config file with the necessary SystemRun commands in it.

    Ultimately, with 1000+ VMs, you're going to have problems like this if you don't adopt some kind of configuration management platform.​

    Comment

    • MRedbourne
      Senior Member
      • Feb 2023
      • 103

      #3
      Tim is correct here. This is a scalability problem you need to fix with proper tools. Zabbix won't do it for you. Fortunately, this is well-researched. You need a tool like:There are of course other tools to do such configuration management, those are just the bigger names in the industry. You need to do your own research on what tool fits your orgs needs the best. (At a thousand servers, I'm genuinely surprised you don't already have a tool like this. Ask around and make sure you don't!) We push our configuration through multiple split files. We have a templated J2 Zabbix Configuration that serves the core of our requirements (Eg: where we define where the active/passive servers are, listening ports, inclusivity, etc.) From there, we split our configurations by what the Zabbix config file contains. We might have several files per host (by role) that get deployed. For example:
      • 00-Connectivity.conf
      • 01-Scripts-<Application>.conf
      • 02-UserParams-<Application>.conf
      • [...]
      You probably get the point. Which configuration files the target host gets depends on which host inventories it's in (or inventory). Depending on the complexity of your needs you can also get into compliance as well. We don't deal with compliance (yet), but some of these tools will periodically check managed hosts to ensure they're compliant with the image used. If they aren't, they get forced into compliance.

      Hope this makes sense. This is outside the scope of Zabbix though. You're best off asking around on the open source tools forums, or Reddit.

      Comment

      • jhboricua
        Senior Member
        • Dec 2021
        • 114

        #4
        Keep in mind that Zabbix doesn't do any sorting on configurations files, it will read them randomly, even if they have number prefix on them as the example above. Avoid having duplicate settings on separate files.

        Comment

        Working...