Ad Widget

Collapse

How to distinguish maintenance and no mantenance events through event.get

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • chg627
    Junior Member
    • Jul 2024
    • 8

    #1

    How to distinguish maintenance and no mantenance events through event.get

    Hi all, I wrote a script using API method event.get to collect problems every day and output an excel sheet.

    But recently when testing the maintenance funtion, I found that events under maintenance still can be collected by event.get. I would like to see maintenance events disappear in the sheet, anyone know how to filter them?

    Thanks in advance.
  • Answer selected by chg627 at 14-04-2025, 02:04.
    cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    Event is not marked in DB for being "during maintenance", as long as I know... Maintenance is applied "on the fly" to events and they are kept from escalations etc. But they do not get marked in DB.
    So you need to pull maintenance data separately and apply it on you events data again....

    Comment


    • chg627
      chg627 commented
      Editing a comment
      Thank you bro. I'm just confused, because I noticed that in 7.0 doc, there is a parameter for event.get, "selectSuppressionData", which returns "maintenanceid". And maintenance.get also returns "maintenanceid".

      When I try maintenance.get. There is a "maintenanceid" for the maintenance period and another "maintenanceid" for host, and apparently they are not the same.
      Last edited by chg627; 11-04-2025, 04:22.
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4806

    #2
    Event is not marked in DB for being "during maintenance", as long as I know... Maintenance is applied "on the fly" to events and they are kept from escalations etc. But they do not get marked in DB.
    So you need to pull maintenance data separately and apply it on you events data again....

    Comment


    • chg627
      chg627 commented
      Editing a comment
      Thank you bro. I'm just confused, because I noticed that in 7.0 doc, there is a parameter for event.get, "selectSuppressionData", which returns "maintenanceid". And maintenance.get also returns "maintenanceid".

      When I try maintenance.get. There is a "maintenanceid" for the maintenance period and another "maintenanceid" for host, and apparently they are not the same.
      Last edited by chg627; 11-04-2025, 04:22.
Working...