[Top][All Lists]

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

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

From: Martin Pala
Subject: Re: [monit] mail format for resource succeeded messages...
Date: Sat, 28 Mar 2009 01:37:12 +0100
User-agent: Thunderbird (X11/20090318)

OK, thanks - the template seems to be used, since the first part of the email corresponds to the template, but the mail body is maybe not interpreted correctly.

There was bug in transfer-encoding header which was fixed in cvs already (will be fixed in monit-5.0 final release):

* Fix mail transfer encoding header - the message like:
    cpu wait usage check succeeded [current cpu wait usage=17.4%]
  was displayed in email as "...usage<SOMEGARBAGE>.4%". The problem was
  incorrect transfer encoding header (the body itself was OK).

Please can you view the message source in the email client to verify that the body is full?

You can also verify using cvs source (or wait for final release):

Or just fix beta7 source code:

Index: sendmail.c
RCS file: /sources/monit/monit/sendmail.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- sendmail.c  25 Feb 2009 00:25:57 -0000      1.66
+++ sendmail.c  24 Mar 2009 19:49:06 -0000      1.67
@@ -186,7 +186,7 @@
     do_send(&S, "X-Mailer: %s %s\r\n", prog, VERSION);
     do_send(&S, "Mime-Version: 1.0\r\n");
     do_send(&S, "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n");
-    do_send(&S, "Content-Transfer-Encoding: quoted-printable\r\n");
+    do_send(&S, "Content-Transfer-Encoding: 8bit\r\n");
do_send(&S, "Message-id: <address@hidden>\r\n", time(NULL), i, S.localhost);
     do_send(&S, "\r\n");
     do_send(&S, "%s\r\n", m->message);


Chris Charman wrote:

  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

Monit alert
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 <mailto: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:

    set mail-format
     { from: address@hidden
       subject: TESTSUBJ $SERVICE

    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?


    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
        Monit $ACTION
        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 <mailto:address@hidden>>>

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


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

           Please can you show your mail-format related configuration?


           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
            > 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:

    To unsubscribe:


To unsubscribe:

reply via email to

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