Ad Widget

Collapse

How to clear history of one trigger....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mafa
    Junior Member
    • Jan 2010
    • 5

    #1

    How to clear history of one trigger....

    How to clear history of one trigger....

    I created one trigger and tested it several times, before switch to production I would like to clear all historical data for this trigger (I would like to have a clear Availability report) before start production monitoring – how to do it?
  • madutis
    Junior Member
    • Mar 2010
    • 2

    #2
    Same question here.

    Thanks.

    Comment

    • untergeek
      Senior Member
      Zabbix Certified Specialist
      • Jun 2009
      • 512

      #3
      Even if this is a complicated SQL query I have to run manually, I'd like to know a way to do this also.

      Comment

      • madutis
        Junior Member
        • Mar 2010
        • 2

        #4
        I have found a way to do this in SQL.

        DISCLAIMER: Use at your own risk, these are just guidelines, you will have to adjust values for your situation.

        Basically you need to erase all rows from service_alarms with serviceid that you need.

        You can look up serviceid's in table 'services'.

        Code:
        delete from service_alarms where serviceid=2 and servicealarmid > 10;
        I have added 'servicealarmid > 10' as top rows contain '0' values for each service apparently for a calculation to be correct.

        Do this for a service and every parent IT service.

        Hope this helps,
        Darius

        Comment

        Working...