[Top][All Lists]

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

Re: Question about grouping hosts and services together for easier manag

From: Horatiu Nimigean
Subject: Re: Question about grouping hosts and services together for easier management
Date: Wed, 12 Sep 2012 16:53:39 +0300
User-agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0

hello, thank you for the reply, however i'm not sure i follow
so i can do this, for example :
check host h1 with addr
    group db
check host h2 with addr
    group db
check host h3 with addr
    group db

and then for monitoring ssh i could
check group db
    if failed port 22  type ssh ...

what i'm aiming for is a configuration file that is easier to parse for humans :))

On 09/12/2012 04:34 PM, Martin Pala wrote:

you can group the service using the existing "group" statement, such as this:

check host my1 with address
   if failed ...
   group database

check host my2 with address
   if failed ...
   group database

You can then use the group to trigger some action on all services, which are member of that group. The service can be member of multiple groups by adding one option for each group.

The groups however cannot be used to share the configuration. For such purpose it'll be probably best to use some configuration template and generate the configuration dynamically.


On Sep 12, 2012, at 1:26 PM, Horatiu Nimigean <address@hidden> wrote:

I want to monitor several hosts using monit, nothing too fancy just icmp ping, ssh and smtp for now
i have set up monit on a centos 6.3 x86_64, installed from rpmforge,
address@hidden monit.d]# monit -V
This is Monit version 5.4
so, i want to monitor a couple (at present 8 hosts) using icmp ping
something like
    check host db1 with address x.x.x.x
        if failed icmp type echo count 3 with timeout 3 seconds then alert
but on some of them i also monitor ssh and smtp
    if failed port 22 protocol ssh with timeout 15 seconds then alert
        if failed port 25 protocol smtp with timeout 15 seconds then alert

the question is, (as i've come to realise the config file is getting harder to parse by human eye)
is there a way to group the hosts together and check the groups themselves ?
group databases
    host db1 with address x x
    host db2 with address x y
    host db3 [...]
group mailservers
    host mail1 with addr [...]
then do a
    check databases
        if failed port 3306 protocol mysql [...]

also, on the web interface, there are several -sections-
at the moment just System and Host
and under host i can see my hosts on the left and the prototocols checked on the right.
Host1.... online with all services.... [ICMP echo request] | [SSH] at port 22
is there a way to divide theese sections in the way of
ICMP monitored hosts:
Host1 .... Online with all services ..... [ICMP Echo request]
Host2 .... etc
SSH status on hosts
Host1 ..... Online with all services ..... [SSH] at port 22

thanks :)
To unsubscribe:

To unsubscribe:

reply via email to

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