Page 1 of 1
Clear notification in queue
Posted: Tue Oct 27, 2020 12:45 pm
by steph007
Hi,
We had a major network issue during the weekend. It's now fixed and Nagios work perfectly.
But the problem is I'm still receiving notification for servers down! How can I delete all the cache for not receiving anymore the backlog?
I'm using Outbound Mail Settings with SMTP and teh loging is active in /usr/local/nagiosxi/tmp/phpmailer.log
Re: Clear notification in queue
Posted: Wed Oct 28, 2020 1:13 pm
by benjaminsmith
Hi,
The following commands will clear out the event queues in Nagios XI.
Code: Select all
systemctl stop crond
systemctl stop nagios
systemctl stop ndo2db
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -u root -pnagiosxi nagiosxi
systemctl restart mysqld
systemctl restart httpd
systemctl start ndo2db
systemctl start nagios
systemctl start crond
You may or may not have the ndo2db process running depending on which version the system is running. Let me know if the issue is resolved or not.
Regards,
Benjamin
Re: Clear notification in queue
Posted: Wed Oct 28, 2020 4:13 pm
by steph007
Thanks for this procedure.
In the mean time I run this (as seen in another ticket) without knowing the real impact of doing it.
echo "delete from xi_events" | mysql -uroot -pnagiosxi -Dnagiosxi
That's fixed the problem of notification flood, but not sure if I have caused problems elsewhere (so far so good, all looking good for now).
Can you tell me if what I did is ok and what exactly what it does??
Re: Clear notification in queue
Posted: Thu Oct 29, 2020 3:22 pm
by benjaminsmith
Hi Steph007,
These are essentially intermediate tables to manage interprocess communications and process events in Nagios XI such as global events and notification handlers.
Normally, the scripts will handle any maintenance and cleanup on their own, but in some situations like this or a corrupt event queue, they need to be cleared out manually.
Let me know if you have more questions.
Benjamin
Re: Clear notification in queue
Posted: Fri Oct 30, 2020 8:21 am
by steph007
Thanks for the explanation.
All look good on my side. You can close the ticket.
Re: Clear notification in queue
Posted: Fri Oct 30, 2020 8:35 am
by scottwilkerson
steph007 wrote:Thanks for the explanation.
All look good on my side. You can close the ticket.
Closing case