[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alert/mail-format syntax questions
From: |
Martin Pala |
Subject: |
Re: alert/mail-format syntax questions |
Date: |
Fri, 6 Mar 2015 01:12:35 +0100 |
Hi,
the custom formats shouldn't be necessary since 5.12 - as you noted, the event
description for space usage event was changed to use bytes (with dynamic
scaling to kB/MB/GB/etc.) instead of absolute blocks count.
Regarding the "monitor all" and multiple alerts ... please can you send related
excerpt from monit log?
Regards,
Martin
> On 04 Mar 2015, at 11:56, Weedy <address@hidden> wrote:
>
> In light of older monit versions sending me garbage for file system
> usage alerts I changed the subject with mail-format.
>
> check filesystem home with path /dev/md2
> if failed permission 660 then alert
> if failed uid root then alert
> if failed gid disk then alert
> if inode usage gt 80% then alert
> if inode usage gt 95% then alert
> if space usage gt 5035 GB for 5 times within 10 cycles then alert
> alert address@hidden with
> mail-format { subject: "WARN Low disk space on /home, less
> then 5 gigs left" }
> reminder on 600 cycles
> alert address@hidden with
> mail-format { subject: "WARN Low disk space on /home, less
> then 5 gigs left" }
> reminder on 600 cycles
> if space usage gt 5039 GB then alert
> alert address@hidden with
> mail-format { subject: "CRIT Low disk space on /home, less
> then 1 gig left" }
> reminder on 180 cycles
> alert address@hidden with
> mail-format { subject: "CRIT Low disk space on /home, less
> then 1 gig left" }
> reminder on 180 cycles
> group server
>
> But when I run monitor all not only do I get my custom subject for the
> monitor action I get 2 emails. One for each subject.
>
> Shouldn't I receive the normal "monitor action done" for this?
>
> 5.12 fixed space usage tests right? Can I change the test back to "lt
> 5 GB" or what ever it was and get human readable reports now?
>
> The reason I bumped into this was because a network outage caused some
> services to unmonitor themselves (after many restarts). Is there a
> less spammy way to set everything back to monitored status then
> "monitor all"?
>
> I thought something like "if 3 restarts within 5 cycles then timeout"
> only applied until monit restarts (like if a server reboots). Am I
> better off nuking monit.state in a shutdown init script to start from
> a clean slate at system boot?
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general