Ad Widget

Collapse

Zabbix 3.4- Problems export to CSV on a schedule

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kmstrube81
    Junior Member
    • May 2018
    • 11

    #1

    Zabbix 3.4- Problems export to CSV on a schedule

    I'm capable of writing php scripts and scheduling them as a cron job. I would like to be able to schedule a morning report to email to everyone in the IT department about the current unresolved problems that the zabbix server is reporting. They do get an email after every trigger but it still would be nice to have an overview email for everyone to review when they first come in.

    Could anyone help me write an SQL query for unresolved problems or a API call to return only unresolved problems and be able to correlate that with hostnames? Thanks in advanced!
  • kernbug
    Senior Member
    • Feb 2013
    • 330

    #2
    Originally posted by kmstrube81
    I'm capable of writing php scripts and scheduling them as a cron job. I would like to be able to schedule a morning report to email to everyone in the IT department about the current unresolved problems that the zabbix server is reporting. They do get an email after every trigger but it still would be nice to have an overview email for everyone to review when they first come in.

    Could anyone help me write an SQL query for unresolved problems or a API call to return only unresolved problems and be able to correlate that with hostnames? Thanks in advanced!
    Hello

    Use native Zabbix API https://www.zabbix.com/documentation/3.4/manual/api

    Comment

    • kmstrube81
      Junior Member
      • May 2018
      • 11

      #3
      Originally posted by kernbug
      The API works. I was able to create a basic report that works. The API documentation was super clear on it but i was able to experiment and figure it out. The part that was hanging me up is that I didn't realize that the objectid correlates to the trigger and the host that was triggered as well. After I got the json array of problems i was able to step through it and correlate it to a host and trigger. Thanks. Anybody who needs help in the future and comes across this post from search, feel free to PM me to find out what I did exactly. Thanks for getting me on the right path kernbug

      Comment

      Working...