monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monit to skip alerts for few cycles


From: Amit Naudiyal
Subject: Re: Monit to skip alerts for few cycles
Date: Thu, 24 May 2012 15:39:36 +0800 (SGT)

Do you have any ideas....




From: Amit Naudiyal <address@hidden>
To: Martin Pala <address@hidden>
Sent: Wednesday, 23 May 2012 11:32 PM
Subject: Re: Monit to skip alerts for few cycles

Here is the verbose output:

GENERAL OUTPUT:
Runtime constants:
 Control file       = /etc/monit.conf
 Log file           = syslog
 Pid file           = /var/run/monit.pid
 Debug              = True
 Log                = True
 Use syslog         = True
 Is Daemon          = True
 Use process engine = True
 Poll time          = 60 seconds with start delay 0 seconds
 Expect buffer      = 256 bytes
 Mail server(s)     = localhost:25 with timeout 5 seconds
 Mail from          = address@hidden
 Mail subject       = recog - $SERVICE $EVENT on <hostname>
 Mail message       = Host:         ec2-50..(truncated)
 Start monit httpd  = True
 httpd bind address = localhost
 httpd portnumber   = 2812
 httpd signature    = True
 Use ssl encryption = False
 httpd auth. style  = Host/Net allow list
 Alert mail to      = address@hidden
   Alert on         = Exec Fsflags Icmp Invalid Nonexist Permission PID Timeout 
   Alert reminder   = 10 cycles


SERVICE OUTPUT:

Process Name          = worker.0
 Group                = worker
 Pid file             = /srv/apps/shared/pids/worker.0.pid
 Monitoring mode      = active
 Start program        = '/etc/init.d/worker0 start' timeout 360 second(s)
 Stop program         = '/etc/init.d/worker0 stop' timeout 360 second(s)
 Existence            = if does not exist 1 times within 1 cycle(s) then restart else if succeeded 1 times within 1 cycle(s) then alert
 Pid                  = if changed 1 times within 1 cycle(s) then alert
 Ppid                 = if changed 1 times within 1 cycle(s) then alert
 Memory amount limit (incl. children) = if greater than 2301960 5 times within 5 cycle(s) then alert else if succeeded 1 times within 1 cycle(s) then alert


PROCESS DETAILS:

We have 7 workers running of Ruby on Rails application starting from 0 - 6, like worker.0, worker.1 .... worker.6.
These workers are starting from Monit only using its "start program" directive. Now as soon as Monit start these workers, it sends out an alert saying  "Worker.0 does not exists on <hostname>". After one or two cycle, sends again alerts for its existence. We have monit starting from init with /etc/rc3.d/S98monit in the end. We also have its entry on /etc/inittab file for respawning. The strange thing is that it sends out alert for only worker.0, and not for any other worker.


Regards,
Amit


From: Martin Pala <address@hidden>
To: Amit Naudiyal <address@hidden>
Sent: Tuesday, 22 May 2012 8:48 PM
Subject: Re: Monit to skip alerts for few cycles

Please can you run monit in verbose mode (using the "-v" option) and provide the monit log output?

Regards,
Martin


On May 22, 2012, at 5:05 PM, Amit Naudiyal wrote:

Hi Martin

Alerts says "<program> Does not exist on <hostname>", I am not sure whether this existence is for PID file or the Program itself, but what I noticed that as soon as monit starts the <program>, it sends out an email saying 'program does not exists' even after 360 timeout given. How can we integrate the "settle" period into it. I would like to check with it.

Regards,
Amit


From: Martin Pala <address@hidden>
To: Amit Naudiyal <address@hidden>; This is the general mailing list for monit <address@hidden>
Sent: Tuesday, 22 May 2012 6:03 PM
Subject: Re: Monit to skip alerts for few cycles

Hi,

what alert exactly you get from monit?

The start timeout sets the time, that will monit wait for process to start, i.e. when the process with PID matching to the "pidfile" content will show up in the process table. As soon as the process is started, monit resumes all tests (e.g. connection test, etc.). Some processes are slow to provide the network service - even though they are started, it takes time to them to start accepting connections and processing requests. Such services need the "settle" period before the connection test can be resumed - this is not provided by the start timeout.

Regards,
Martin


On May 22, 2012, at 1:44 PM, Amit Naudiyal wrote:

Dear All,

Please advise if there is any configuration by which I can skip alerts for few starting cycles.
Like we have few services which we manage through Monit but those application take time to start and on next cycle, monit starts sending mail for them.
We want, monit can skip alerts particularly for those services for defined cycles before actually sending alerts for them.

The option "start program = /etc/init.d/<program> start" with timeout 360 seconds does not seems to be working. Program actually takes few seconds to start with a pid file. Monit does not find pid and start sending mail even when program is under start process.


Regards,
Amit


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general









reply via email to

[Prev in Thread] Current Thread [Next in Thread]