View Full Version : clear logs
mario.almeida
20-10-2010, 12:52
Hi All,
from db how can I clear the queue of sending email notifications?
zalex_ua
21-10-2010, 01:50
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
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;
mario.almeida
21-10-2010, 15:55
Hi,
Let me try this solution