Ad Widget

Collapse

Monitoring Templates for config drift?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tmroberts
    Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Jan 2017
    • 73

    #1

    Monitoring Templates for config drift?

    With as many users and templates we we currently have in our system, we have decided to implement a change/version control on our templates by uploading them to git. I'm trying to figure out a way to monitor/notify if a user makes a change to a template. So far the only thought I have is to export all of the templates to individual files and execute a diff against each template, but that seems clunky to me. Has anyone done anything similar to this?
  • Magumbo
    Junior Member
    • Mar 2019
    • 6

    #2
    Anyone know if its possible to extract template definitions directly from nysql? This may allow for easier config comparison Version controlling templates issomething i want to do too, but the workflow is onerous enough that colleagues are unlikely to follow it. Some simple cli export & import tools would really help

    Comment

    • tmroberts
      Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Jan 2017
      • 73

      #3
      Exporting is relatively simple. I have found a couple options. One option that I explored was using Zabbix-CLI, but unfortunately the templates were exported with timestamps and that didn't work for my needs. What I found that worked, at least for exporting the templates, was a script I found here: template_export.py

      I still don't have a solution to actually monitoring configuration drift though....

      Comment

      • Magumbo
        Junior Member
        • Mar 2019
        • 6

        #4
        if you can export the configs, can you not then diff them with your latest git versions as a scheduled job? Sounds nasty, but it may work.
        We could really do with a hook to push template changes in Zabbix straight to a git repo...

        Comment

        Working...