[Top][All Lists]

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

[Patch] Support of UNIX socket checks

From: Christian Hopp
Subject: [Patch] Support of UNIX socket checks
Date: Thu, 25 Jul 2002 14:06:21 +0200 (CEST)


Monit works very well for me with several networked services.  But
unfortunately another (running) process halted my mail system for some
hours, which does not use inet sockets but unix sockets.  In order to
make this not to happen again the attached patch [against 2.5] enables
the use of unix sockets additionally to inet sockets.

Config example:

check foo with pidfile /var/run/
    start program = "/bin/true"
    stop program = "/bin/true"
    group foo
    unix /var/run/foosocket
    alert address@hidden

Full syntax of the unix statement:

unix <socket filename> [type {udp|tcp}] [protocol <protocol name>]

I don't know if datagram unix sockets could anyhow exist, but the type
statement reflects whether its DGRAM or STREAM.  But standard is of
course tcp with means STREAM (maybe the TYPE syntax should be broadened
to {udp|tcp|dgram|stream} thus it does not look so odd).

The standard protocol is of course DEFAULT. I don't know if any other
makes sense right now, but it is necessary to be integrated smoothly
in to the socket checking code.  And it gives space to any other
protocol plugin later on.

The feature is tested on Solaris 2.7 and the patch has to be applied
against monit 2.5.

I hope it's anyhow useful and this time it's not just makeup like the
services patch. (-:



Christian Hopp                                email: address@hidden
Institut für Elektrische Informationstechnik             fon: +49-5323-72-2113
Technische Universität Clausthal                         fax: +49-5323-72-3197
  pgpkey:  (2001-11-22)

Attachment: monit_unix_socket.patch
Description: Text document

reply via email to

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