Score:0

Monit: Editing in-built alert text

br flag

i have the monit tool setup on a linux box, and it's been monitoring apache and the overall system for a few months. The apache config file is:

check process apache with pidfile /var/run/httpd/httpd.pid
      start "/etc/init.d/httpd start"
      stop  "/etc/init.d/httpd stop"
      if memory usage > 70% for 2 cycles then alert
      if memory usage > 90% for 5 cycles then restart
      if cpu > 70% for 2 cycles then alert
      if failed port 80 protocol apache-status
         loglimit > 75%
then restart

this morning, i got an alert email sent by monit, but the message description looked like something i'd never seen before, and was wondering where i can find the default text that's used by monit when it sends out alerts like this. the alert text i got was:

Data access succeeded Service apache 

        Date:        Mon, 10 Oct 2022 12:54:20
        Action:      alert
        Host:        <hostname>
        Description: zombie check succeeded

any idea where i can find and modify the above "description" text?

Score:0
ug flag

A simple mail template is configured in the monitor configuration file (often called monitrc).

See the section "set mail-format". But the description or action text can not changed, you can rearrange some data used by the monitor.

Some additional information are available too, see https://mmonit.com/monit/documentation/monit.html#Message-format

And some of the used text fragments are listed also, see https://mmonit.com/monit/documentation/monit.html#Setting-an-event-filter

weetch avatar
br flag
Thank you for that. I wish they'd list out all used text fragments (since i don't see the `zombie check succeeded` listed , but the links you referenced are super helpful
lutzmad avatar
ug flag
Unfortunately no, sorry. Only some of the used text fragments listed, but the other text fragments are used include status information only, in general. But sometimes you get information based on the monitor internal handling too.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.