Hi, I've not found the answer to this question anywhere - please forgive me if I overlooked. I'd like to be able to be automatically alerted if process limits are hit (e.g. max POP3 logins). Is there a way that I can configure a script to be run, in the same way that I can with quota warnings? I can of course use logwatch, but this alerts me the next day, and logwatch can be noisy and it's easy to overlook. My motivation: for some reason my POP3 listener was hanging, and I had to restart dovecot (this is 2.0.9). But I was not aware - the process was still there, it was accepting connections (but not doing anything useful with them) and was actually managing to log the fact that the process limit was being hit (as more and more connections came in). If I could have been alerted I could have restarted dovecot earlier. Many thanks, David -- WordShell - WordPress fast from the CLI - www.wordshell.net
On 01/09/12 09:10, David Anderson wrote:> Hi, > > I've not found the answer to this question anywhere - please forgive > me if I overlooked. > > I'd like to be able to be automatically alerted if process limits are > hit (e.g. max POP3 logins). > > Is there a way that I can configure a script to be run, in the same > way that I can with quota warnings? > > I can of course use logwatch, but this alerts me the next day, and > logwatch can be noisy and it's easy to overlook. > > My motivation: for some reason my POP3 listener was hanging, and I had > to restart dovecot (this is 2.0.9). But I was not aware - the process > was still there, it was accepting connections (but not doing anything > useful with them) and was actually managing to log the fact that the > process limit was being hit (as more and more connections came in). If > I could have been alerted I could have restarted dovecot earlier. > > Many thanks, > David >I believe that nagios or icinga could do this for you with a log analyser plugin. http://exchange.nagios.org/directory/Plugins/Log-Files Cheers Alex
Hi, Thanks. I used monit, and will code something up of that kind - but I was curious as to whether dovecot had something built in; external monitoring is a somewhat blunter tool, as you don't get to know exactly why there was a problem unless you also parse the logs. Tricky to investigate this kind of issue - it has only happened once, and I had a few hundred people trying to log in, so no time to start debugging! But if it recurs I'll be back to ask for guidance... Many thanks, David -- WordShell - WordPress fast from the CLI - www.wordshell.net On 01/09/12 12:15, Noel Butler wrote:> Seen similar, we use mon? for network monitoring, our mon pop3 script > is modified to not only connect, but login, if it cant the trigger > becomes active and if fails again at next check, it alerts engineers > by sms. > > Though, I would investigate the core issue, Timo "apparently" fixed > that hung session stuff in 2.0, it was common in 0.x and 1.x series. > > Cheers > > 1: ( <http://sourceforge.net/projects/mon/files/mon/> > http://sourceforge.net/projects/mon/files/mon/ ) > > >
On 1.9.2012, at 11.10, David Anderson wrote:> I've not found the answer to this question anywhere - please forgive me if I overlooked. > > I'd like to be able to be automatically alerted if process limits are hit (e.g. max POP3 logins). > > Is there a way that I can configure a script to be run, in the same way that I can with quota warnings? > > I can of course use logwatch, but this alerts me the next day, and logwatch can be noisy and it's easy to overlook.Log errors/warnings to a separate file and watch it. Dovecot's error/warning log typically stays completely empty (except when stopping Dovecot). Anything you find there is a potential error..> My motivation: for some reason my POP3 listener was hanging, and I had to restart dovecot (this is 2.0.9). But I was not aware - the process was still there, it was accepting connections (but not doing anything useful with them) and was actually managing to log the fact that the process limit was being hit (as more and more connections came in). If I could have been alerted I could have restarted dovecot earlier.Restarting is kind of a kludgy solution, since the only thing it does is to kill all the existing connections and hope that they don't immediately just reconnect back. An equivalent fix is doveadm kick '*'