Page 1 of 1
Prevent previous alerts from sending when server turned on
Posted: Tue Mar 16, 2021 11:07 am
by mrjsokol
Good morning all,
We had started to use our XI server again and getting ghost emails from previous down alerts that either A) The client is no longer in the configuration or B) The host is reporting down and its currently up. We suspect these are emails that should have been generated and should have been sent out but didnt due to other issues with XI. Is there a way to clear this, if there is a cache producing these emails as we have already received 200 emails prior to shutting down the email server again.
Re: Prevent previous alerts from sending when server turned
Posted: Wed Mar 17, 2021 3:36 pm
by vtrac
Hi,
Please try the below command (NOTE: this is a ONE line command):
Code: Select all
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -pnagiosxi nagiosxi
Regards,
Vinh
Re: Prevent previous alerts from sending when server turned
Posted: Fri Mar 19, 2021 1:10 pm
by mrjsokol
Good afternoon,
We are getting the following error:
No database selected.
Re: Prevent previous alerts from sending when server turned
Posted: Fri Mar 19, 2021 4:28 pm
by vtrac
Hi,
Please try this (added -u root).
NOTE: this is a ONE line, so make sure you copy all:
echo "truncate table xi_events; truncate table xi_meta; truncate table xi_eventqueue;" | mysql -uroot -pnagiosxi nagiosxi
Regards,
Vinh
Re: Prevent previous alerts from sending when server turned
Posted: Mon Mar 22, 2021 4:59 pm
by mrjsokol
Just to update posting,
We were able to run command but waiting on team to turn on smtp server to confirm that this resolved the massive amount of previous non sent alert emails from being sent.
Re: Prevent previous alerts from sending when server turned
Posted: Tue Mar 23, 2021 1:39 pm
by vtrac
OK ... just let us know!!
Regards,
Vinh
Re: Prevent previous alerts from sending when server turned
Posted: Fri Mar 26, 2021 1:54 pm
by mrjsokol
Good evening,
We have enabled the smtp server and verified that the server is operational from the smtp server itself but it seems that nagios is not communicating properly with the server to send the emails. I have tried so far the following troubleshooting steps and will continue to look further into the logs and enable debugging.
- Tried switching email addresses for the account
- updated existing email address and saved to account again
- used a different user account
- Used multiple machines for testing
- Changed the contact for a machine as a test to have the direct contact of the account I was using
Re: Prevent previous alerts from sending when server turned
Posted: Fri Mar 26, 2021 4:36 pm
by dchurch
What do you mean by "not communicating properly with the server"? Where do you see that? Please include any error messages you see.
What happens if you send a test email from Admin => Email Settings? Any error messages there? Does the message arrive in your inbox?
Is Nagios XI set up to use an SMTP server, or sendmail?
Re: Prevent previous alerts from sending when server turned
Posted: Mon Mar 29, 2021 8:30 am
by mrjsokol
Good morning,
When enabling debugging using the following guide:
https://support.nagios.com/kb/article/p ... g-820.html
We received the error that it could not connect, to find out that our connection information was provided incorrectly.
We have not seen the flood of emails come in after turning it back on after using the truncate statement listed above.
This thread can be locked.
Re: Prevent previous alerts from sending when server turned
Posted: Mon Mar 29, 2021 10:34 am
by scottwilkerson
mrjsokol wrote:Good morning,
When enabling debugging using the following guide:
https://support.nagios.com/kb/article/p ... g-820.html
We received the error that it could not connect, to find out that our connection information was provided incorrectly.
We have not seen the flood of emails come in after turning it back on after using the truncate statement listed above.
This thread can be locked.
Closing case