Clear notification in queue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

Clear notification in queue

Post 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
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Clear notification in queue

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

Re: Clear notification in queue

Post 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??
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Clear notification in queue

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
steph007
Posts: 177
Joined: Mon Jul 24, 2017 12:00 pm

Re: Clear notification in queue

Post by steph007 »

Thanks for the explanation.
All look good on my side. You can close the ticket.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Clear notification in queue

Post by scottwilkerson »

steph007 wrote:Thanks for the explanation.
All look good on my side. You can close the ticket.
Closing case
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked