Ad Widget

Collapse

clear logs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mario.almeida
    Member
    • Nov 2008
    • 44

    #1

    clear logs

    Hi All,

    from db how can I clear the queue of sending email notifications?
  • zalex_ua
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2009
    • 1286

    #2
    Originally posted by mario.almeida
    from db how can I clear the queue of sending email notifications?
    First:TRUNCATE TABLE `escalations`

    But if you asked the question exactly, then this is not your case.
    Once, I investigated how the Zabbix server works. The text is crude, be careful. Results:

    Every 30 seconds the server (the value set by parameter SenderFrequency the server configuration file) make the query (where a.status = 0 and a.mediatypeid = mt.mediatypeid and a.alerttype = 0) from the table 'alerts'. If anything is found then the routine 'execute_action' starts, which does an immediate sending of the email.

    So, i think trying to do a request to make the status of alerts = 1. Or delete some fresh data from table or others....

    /* Alert statuses */
    0 ALERT_STATUS_NOT_SENT,
    1 ALERT_STATUS_SENT,
    2 ALERT_STATUS_FAILED

    I hope that at least than it helped. Once I spent a lot of time studying Zabbix core.

    p.s. ha-ha. is my post #200

    Comment

    • MrKen
      Senior Member
      • Oct 2008
      • 652

      #3
      Originally posted by mario.almeida
      Hi All,

      from db how can I clear the queue of sending email notifications?
      1. stop zabbix_server
      2. Execute the following SQL statements:

      update alerts set status=2,error='' where status=0 and alerttype=0;
      delete from escalations;
      Disclaimer: All of the above is pure speculation.

      Comment

      • mario.almeida
        Member
        • Nov 2008
        • 44

        #4
        Hi,

        Let me try this solution

        Comment

        Working...