[Top][All Lists]

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

Re: Q: Is there a way to include some text into monit's alert message?

From: SZÉPE Viktor
Subject: Re: Q: Is there a way to include some text into monit's alert message?
Date: Thu, 19 Apr 2018 14:45:51 +0200
User-agent: Horde Application Framework 5

Idézem/Quoting Bryan Harris <address@hidden>:

Unless I misunderstand your question, I do this by printing to standard
output. Like in the script here:

On Thu, Apr 19, 2018 at 2:26 AM, Storm <address@hidden> wrote:

Hi all! I have a simple question about using monit's program checks.

I plan to use program check, with it's exit code I can force monit to send
alert mail message, ok. But how to include into that message some output
produced by checking program?

I could modify program to write it's output in some file but how to tell
monit to use this file during message composing?

There is something description field in mail-format, is it suitable for
this purpose?

From monit's docs

The subject and body may contain $NAME variables, which are expanded by
Monit. Here is a list of variables that can be used when composing an alert


$DESCRIPTION The description of the error condition

Thanks in advance for your answers!

The very same program you use for exit status may produce output.
It is included in alert emails. It is "R: 2"

 Status failed Service network_resolv

        Date:        Wed, 18 Apr 2018 05:01:42
        Action:      alert
        Description: status failed (1) -- R: 2

Your faithful employee,

SZÉPE Viktor, honlap üzemeltetés / Running your application
ügyelet/hotline: +36-20-4242498  address@hidden  skype: szepe.viktor
Budapest, III. kerület

reply via email to

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