monit-general
[Top][All Lists]
Advanced

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

RE: Nagios Integration


From: krc
Subject: RE: Nagios Integration
Date: Thu, 20 Feb 2003 10:05:20 -0500

i'm very new to the list, but i might have a suggestion.  it is possible, if
not convoluted, to do this if you're running sendmail.  [i think postfix has
this capability, too.]

1. setup monit to send alerts to "artemis"
2. setup a sendmail alias "artemis" to pipe mail to "|/path/to/myscript"
3. create the script "/path/to/myscript" to parse the e-mail from monit and
invoke '/usr/bin/snpp -m "Monit: $EVENT for $PROGRAM on $HOST"'

some things to note:
1. really hardened compilations of sendmail don't allow piping
2. semi-hardened compilations require any script to be located in a special
directory (e.g. /etc/smrsh)
3. the script must be executable by the mail daemon

debugging isn't too easy.  with perl scripts, compilation and run-time
errors are sent back via an e-mail reply.  until you have it working, just
keep forwarding your old monit alerts.  if you're having a logic error, it's
very helpful to create an output log filled with traces.

i've used this method in the past to do things like add pictures to a
website.  just attach them to an e-mail to address@hidden, and almost
instantly the pics are visible on somewhere.com.  it's great for people who
aren't at all tech-savvy, but still want to be able to maintain their own
sites.  (a quick primer in digital signatures might be good for every
client.)

just make sure that you make the appropriate checks about where the mail is
coming from and the authenticity of the e-mail.  i won't be responsible for
anything i've just suggested.

kevin

-----Original Message-----
From: Christian Hopp
To: This is the general mailing list for monit
Sent: 2/20/2003 3:43 AM
Subject: Re: Nagios Integration

On Wed, 19 Feb 2003, Jan-Henrik Haukeland wrote:

> Russell Adams <address@hidden> writes:


(...)

> > That being said, all I'd like to do is allow more flexible alerts,
> > based on running an artibrary command instead of using just
> > email. That one feature alone would be simply awesome.
> >
> > This way I could use paging directly like so:
> >
> > alert `/usr/bin/snpp -m "Monit: $EVENT for $PROGRAM on $HOST"
rladams`
> >
> > or I would have the option of using any other program to pass on the
> > data as needed. Spawn, exec, launch or whatever the program
specified,
> > and terminal the child process if it fails to exit in less than 90
seconds.
>
> Actually we have discussed this idea before also, it's not a bad idea
> and I'm not sure why we didn't implement it. Anyone remember?

The problem of this might be that we reduce the reliability of monit
by depending on "other programs". ==> What should monit do if this
mechanism fails?

On the other hand I would say right now...  why not having this facility
and we don't need snmp integration... because external programs could
send the traps, too.

Christian

-- 
Christian Hopp                                email:
address@hidden
Institut für Elektrische Informationstechnik             fon:
+49-5323-72-2113
TU Clausthal, Leibnizstr. 28, 38678 Clausthal-Zellerf.   fax:
+49-5323-72-3197
                             pgpkey:
https://www.iei.tu-clausthal.de/pgp-keys/



--
To unsubscribe:
http://mail.nongnu.org/mailman/listinfo/monit-general




reply via email to

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