How to purge the mail queue for flood mail

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
bojha
Posts: 55
Joined: Thu Jul 26, 2012 1:18 am

How to purge the mail queue for flood mail

Post by bojha »

Hi All,

We are using Nagios XI 2011R1.9 which is running on the below OS
[nagios@nagiosvm01 /]$ uname --a
Linux nagiosvm01 2.6.18-308.1.1.el5 #1 SMP Fri Feb 17 16:47:13 EST 2012 i686 i686 i386 GNU/Linux

and some times we are getting the flood messages which is not relevant , So is there any way so that we can purge the mail queue for flood mail.


Thanks in advance,

Bijay
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: How to purge the mail queue for flood mail

Post by scottwilkerson »

Can you describe what you mean by "mail queue flood"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
bojha
Posts: 55
Joined: Thu Jul 26, 2012 1:18 am

Re: How to purge the mail queue for flood mail

Post by bojha »

What i am trying to know is, is there any way to remove all the notification(alert due to some wrong configuration or invalid alert ) which are pending(either in nagios or in the mail server) to sent to the contact.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: How to purge the mail queue for flood mail

Post by slansing »

I guess the question here would be, how extensive are you planning to go with this? There are quite a few things caught under the notifications and errors umbrella. Do you already have a way to tell if the service/host is erroring due to a configuration issue? Off of the Nagios side, you should be able to configure spam filters to search for keywords, depending on what you are using. In this way you could eliminate such notifications from flooding your inbox.
bigtarr
Posts: 1
Joined: Thu Jan 24, 2013 2:12 pm

Re: How to purge the mail queue for flood mail

Post by bigtarr »

Anyone find a solutions of how to flush the notification queue. I have over 15000 emails and they keep coming.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: How to purge the mail queue for flood mail

Post by abrist »

First of all, make sure the queue problem is with your nagios server and not you smtp server etc.

Type:

Code: Select all

mailq
into the terminal. If you see a giant list, then that is your problem. We will check exim next to see if that is culprit:

Code: Select all

exim -bp
If you see all of the messages there, then run:

Code: Select all

exim -bp | exiqgrep -i | xargs exim -Mrm
Then run mailq and exim -bp one more time to make sure it is cleared up.

WARNING! This will remove these emails permanently! Any historical records that you wished to save from them will not be possible once they are removed.

If the queue is empty, it may be on your smtp server's end.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bojha
Posts: 55
Joined: Thu Jul 26, 2012 1:18 am

Re: How to purge the mail queue for flood mail

Post by bojha »

Hi abrist,

Thank you for the replay that helps us a lot and now we are good with the issues..


With Regards,

Bijay
Locked