[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: FW: Error in reminder keyword
RE: FW: Error in reminder keyword
Mon, 21 Nov 2005 15:31:13 +0530
I have created /etc/monitrc file as follow as per your instruction-
set daemon 20
set alert address@hidden
set logfile syslog facility log_daemon
set mailserver mailhost
set pidfile /var/run/monit.pid
set statefile /var/run/monit.state
set httpd port 2812 and use address localhost
check device root-10 path /dev/md/dsk/d0
if space usage > 10% then alert
alert address@hidden with reminder on 6 cycles
check device root-15 path /dev/md/dsk/d0
if space usage > 15% then exec "/usr/local/monit-4.6/bin/monit unmonitor
else if passed then exec "/usr/local/monit-4.6/bin/monit monitor root-10"
alert address@hidden with reminder on 3 cycles
But I am getting alert meaages for both root-10 and root-15 when my root
filesystem usage is > 15%.
Then I executed exec command which is in " " manually and it worked means it
Please let me know why it is not working (exec command) from the configuration
From: Martin Pala [mailto:address@hidden
Sent: Friday, November 18, 2005 8:23 PM
To: Rishikesh Dongre
Subject: Re: FW: Error in reminder keyword
Rishikesh Dongre wrote:
> I was looking into this keyword because i want to see if it is feasible to
> perform multiple time step/threshold reminders.
> What I mean by that is for example when it is 85%, it would remind
every four hours, when it is 90%, it would be every hour
> and when it is 92% every 15 minutes, and when over 95%, every five
minutes. And it should not send all reminders at same time.
> Please suggest.
Every testing rule is standalone, even if it tests the same service
property. If you define several error levels, such as:
1. if space usage > 75% then ...
2. if space usage > 85% then ...
3. if space usage > 90% then ...
4. if space usage > 92% then ...
then monit compares the space usage four times and do the appropriate
action related to all given testing rules which match the condition.
Each testing rule maintains its own state. Monit doesn't group these
testing rules - if the usage is for example 87%, then rules 1+2 match
and their reminder is applied independently.
With current monit version, there is probably the (complex) workaround -
check device datafs-75 with path /dev/sda5
if space usage > 75% then alert
alert address@hidden with reminder on 100 cycles
check device datafs-85 with path /dev/sda5
if space usage > 85% then exec "monit unmonitor datafs-75"
else if passed then exec "monit monitor datafs-75"
alert address@hidden with reminder on 50 cycles
check device datafs-90 with path /dev/sda5
if space usage > 90% then exec "monit unmonitor datafs-85"
else if passed then exec "monit monitor datafs-85"
alert address@hidden with reminder on 5 cycles
Each error level is defined in its own service container. As the error
level increases, the lower levels monitoring is disabled. When the space
usage decrease, the lower level monitoring is enabled again.
More complex rules with common state and multiple error levels are not
supported currently. It can be implemented in the future if people agree
(volunteers are welcomed ;)
if space usage
> 75% then ...
> 85% then ...
> 90% then ...
> 92% then ...
recovered then ... # note: equals <=75%
if space usage > 75% then ...
else if > 85% then ...
else if > 90% then ...
else if > 92% then ...
else if recovered then ...
This email with all infomation contained herein or attached hereto may contain
confidential and/or privileged information intended for the addressee(s) only.
If you have received this email in error, please contact the sender and
immediately delete this email in its entirety and any attachments thereto.