monit-general
[Top][All Lists]
Advanced

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

Re: [monit] mail format for resource succeeded messages...


From: Chris Charman
Subject: Re: [monit] mail format for resource succeeded messages...
Date: Fri, 27 Mar 2009 14:49:20 -0700

Resource limit reached emails/status changes messages are as expected from the config. Check succeeded emails, however, are as follows:

Subject: HOST: Resource limit succeeded at DATE

Body:
Monit alert
HOST
at DATE
on internal: 'HOST' cpu user usage check succeeded [current cpu user usage0.0%]


I am running Monit 5.0 beta 7.

On Fri, Mar 27, 2009 at 2:18 PM, Martin Pala <address@hidden> wrote:
The configuration is OK.

The mail-format is shared for both failure and success mails - the same function is used to deliver both events which expands the mail-format template the same way.

I have tested now using cvs bits (upcoming monit-5.0) and it works fine. I used following template:

--8<--
set mail-format
 { from: address@hidden
   subject: TESTSUBJ $SERVICE
   message:
TESTBODY
$ACTION
$SERVICE
$DESCRIPTION}
--8<--

Then i killed one monitored service so monit sent failure event, restarted the service and sent success event ... both emails came with correct template.


What problem exactly you see? How the failure emails differ from success emails when it comes to mail-format template and where it doesn't match the expaction? What is the monit version?

Thanks,
Martin



Chris Charman wrote:
My mail-format related config:

#
# Monit control file
#
set logfile syslog facility log_daemon
set alert address@hidden
set httpd port 2812 and use address PUBLIC_HOSTNAME
    allow user:password # Allow Basic Auth

set mail-format {
  from: address@hidden
  subject: $SERVICE: $EVENT at $DATE
  message:
Monit $ACTION
$SERVICE
at $DATE
on $HOST: $DESCRIPTION.
Public Hostname: PUBLIC_HOSTNAME
Public IP: PUBLIC_IPV4
Private Hostname: LOCAL_HOSTNAME
Private IP: LOCAL_IPV4
Security Groups: SECURITY_GROUPS
Instance ID: INSTANCE_ID
Instance Type: INSTANCE_TYPE
Monit: http://user:address@hidden:2812/

}

[...]
The rest of my config...
[...]
 
   Date: Thu, 26 Mar 2009 08:14:01 +0100
   From: Martin Pala <address@hidden
   <mailto:address@hidden>>

   Subject: Re: [monit] mail format for resource succeeded messages...
   To: This is the general mailing list for monit
          <address@hidden <mailto:address@hidden>>

   Message-ID: <address@hidden
   <mailto:address@hidden>>

   Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

   Please can you show your mail-format related configuration?

   Thanks,
   Martin


   On Mar 25, 2009, at 7:16 PM, Chris Charman wrote:

    > Hey monit folks...
    >
    > I'm trying out monit on a number of boxes. The set mail-format
    > directive works fine for failure alerts (resource limit reached),
    > but the resource succeeded email is still generic (and not using my
    > template).
    >
    > I'm running in a cloud environment, so the information I'm trying to
    > add to *all* emails is pretty important.
    >
    > Any suggestions? Do I need to add a "with mail-format" directive to
    > all of my alerts?



------------------------------------------------------------------------

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


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


reply via email to

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