monit-general
[Top][All Lists]
Advanced

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

Re: Plans for the next release


From: Martin Pala
Subject: Re: Plans for the next release
Date: Tue, 02 Jul 2002 14:38:08 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607

Jan-Henrik Haukeland wrote:
Jani Mikkonen <address@hidden> writes:


At the moment, only way to get alerts is to mail them. How about
making user defined alerts. I would like to see a feature that monit
runs a certain userdefinet program and possibly pass information to
it for example, what monitored program made this alert.

In this way, i could get alerts via sms if something bad occurs or even
send in snmp or mon trap to centralized location..


Interesting. A possible solution could maybe be something like this in
the control file (keywords in capital):

  NOTIFY program on {RESTART, TIMEOUT, CHECKSUM} with ARGUMENTS {
                                   arg1= "Apache restarted"
                                   arg2= $DATE
                                   arg3= $DATE
                                   ..
                                   argN="this is the last argument"
                                }
In other words the NOTIFY statement will work like the alert statement
except that monit will start the mentioned notify "program" with
arguments given in the ARGUMENT block and where the standard alert
variables will be available:

       $EVENT A string describing the event that occured. The
       values are fixed and are, "restarted", "timed out" and
       "checksum error"

       $PROGRAM The program entry name in monitrc

       $DATE The current time and date (C time style).

       $HOST The name of the host monit is running on


How does this sound?

I think that it is general enough to allow users get the alerts where needed.

Maybe monit could have native support for SNMP (mentioned in the past) or logging to DB, such as:

NOTIFY SNMP-TRAP on {RESTART, TIMEOUT, CHECKSUM} to TARGET snmp.manager.com with COMMUNITY abcd1234


or (only for illustration):

NOTIFY MYSQL on {RESTART, TIMEOUT, CHECKSUM} with USERNAME ... PASSWORD ... to TARGET mysql.server.com

Maybe the target for PROGRAM, SNMP, DB, etc. can be set on global level with its specific options and in the rule then can be used only target name, such as:

...
SET TARGET mysnmp
  COMMUNITY abcd1234
  HOST 127.0.0.1

SET TARGET myprogram
  PROGRAM logger
  ARGUMENTS {...}

SET NOTIFY myprogram on {RESTART, TIMEOUT, CHECKSUM}
SET NOTIFY msnmp on {RESTART, TIMEOUT, CHECKSUM}
...

NOTIFY directive can be used on global level (for example with SET NOTIFY ...) or can be overriden on per-process level (NOTIFY ... )

With your syntax (NOTIFY program ...) isn't above needed - user can have external program, that does similar thing - its on discussion. Maybe SNMP will be useful and DB logging is to proprietary.


What about it?

Martin





reply via email to

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