Re: source patch to alterate log level of start stop restart event
Luca Cazzaniga <[email protected]> Sat, 5 Dec 2020 09:37:01 +0100
| Newsgroups | gmane.comp.monitoring.monit.general |
|---|---|
| Message-ID | <CAPz4CsynDP1EAta6vapjJe-i5UYOVSACFso9jAii+LZBWA1mQw@mail.gmail.com> |
hi Lutz, a good workaround, it gathers messages regarding the status, but my aim was collecting messages/status of the actual execution of start/stop program, although similar the flow could not be the same. On Fri, 4 Dec 2020 at 23:07, Lutz Mader <[email protected]> wrote: > > Hello Luca, > I use one script for all. > > > And you need to set up two check program if you want to start stop your> service using monit, maybe too machinary.. do you mean that? > But my scripts deal with start/stop/status and restart in general and I > get useful status codes. But you are right (sorry), monit collect the > output from the status check only. > > check program Manager with path "/usr/local/etc/monit/scripts/em.sh status" > start program "/usr/local/etc/monit/scripts/em.sh start" with timeout > 240 seconds > stop program "/usr/local/etc/monit/scripts/em.sh stop" with timeout > 300 seconds > if status > 1 for 3 times within 5 cycles then alert > > The output of the status check of my script looks similar to the > start/stop output. > > With regards, > Lutz > >