Ad Widget

Collapse

Integrating Zabbix and CMDB.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vesal
    Junior Member
    • Dec 2013
    • 13

    #1

    Integrating Zabbix and CMDB.

    Hello,

    I was given an task to find out if Zabbix is suitable for our environment. We have around ~1000 servers, switches, routers to monitor. Important thing for us is to integrate the monitoring tool with our existing CMDB.

    What I was thinking to do is fetch active triggers (PROBLEM) from Zabbix API which output I parse for our needs and send it via HTTP to our CMDB which automatically opens the ticket.

    BUT, what puzzles me if its possible to get RECOVERY message via Zabbix API? If the PROBLEM state changes to RECOVERY we want our CMDB to automatically close the ticket.

    I've been using Python and pyzabbix module https://github.com/lukecyca/pyzabbix

    Has anyone implemented anything similar in the past?
  • jan.garaj
    Senior Member
    Zabbix Certified Specialist
    • Jan 2010
    • 506

    #2
    IMHO API is not the best option for integration, because you have to use pooling data from Zabbix.
    Concept:
    Create custom media with script type. This "media script" will be always executed with 3 parameters by Zabbix server:
    $1 – recipient of the message (probably you don't need it this info)
    $2 – the subject of the message
    $3 – the main message body
    Now you can parse these parameters or can call API of your CMDB in "media script" - you can do everything in your script.
    And then don forget to create some Zabbix user for CMDB with this special media enabled. In this state you can handle also recovery messages :-)
    Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
    My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

    Comment

    • vesal
      Junior Member
      • Dec 2013
      • 13

      #3
      Originally posted by jan.garaj
      IMHO API is not the best option for integration, because you have to use pooling data from Zabbix.
      Concept:
      Create custom media with script type. This "media script" will be always executed with 3 parameters by Zabbix server:
      $1 – recipient of the message (probably you don't need it this info)
      $2 – the subject of the message
      $3 – the main message body
      Now you can parse these parameters or can call API of your CMDB in "media script" - you can do everything in your script.
      And then don forget to create some Zabbix user for CMDB with this special media enabled. In this state you can handle also recovery messages :-)
      Ah yes, your suggested concept makes much more sense. Thanks for the input. I just gotta figure out how to handle recovery messages in CMDB, probably with event id's.

      Comment

      • jan.garaj
        Senior Member
        Zabbix Certified Specialist
        • Jan 2010
        • 506

        #4
        Yes, you can use macro {EVENT.ID} in subject or in content for event identification.
        Devops Monitoring Expert advice: Dockerize/automate/monitor all the things.
        My DevOps stack: Docker / Kubernetes / Mesos / ECS / Terraform / Elasticsearch / Zabbix / Grafana / Puppet / Ansible / Vagrant

        Comment

        Working...