|
From: | Martin Pala |
Subject: | Re: [monit] Can mail-format include PID or USERID? |
Date: | Thu, 13 Mar 2008 20:55:38 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080129 Iceape/1.1.8 (Debian-1.1.8-2) |
http://www.tildeslash.com/monit/doc/manual.php#environmentYou can prepare wrapper for the kill script that will either use the environment variable or grab the information about the process to be killed itself and send the message.
Another option could be to add support for new macros to mail-format. Existing macros are described here:
http://www.tildeslash.com/monit/doc/manual.php#alert_message_layoutThe addition of new macros should be very easy. The implementation is in alert.c in the function substitute(). The event has reference to the source service, where you can read both PID, UID and another informations.
Patches are welcomed ;) Martin Bill Benedetto wrote:
Good day. I use monit kind of backwards from most users, I suspect. I use monit to kill runaway processes. Obviously, these are processes that are known to me to become runaway (so I know what to monitor). This actually works pretty well for me. However, my developers got wind of this and now would like to know WHOSE process it was that was killed. So, my question is this: is there some way that I can include in the alert email the PID that was killed and/or the USERID that owned the process that was killed? Thanks!
[Prev in Thread] | Current Thread | [Next in Thread] |