monit-general
[Top][All Lists]
Advanced

[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 1.2.3.4
    group db
check host h2 with addr 1.2.3.5
    group db
check host h3 with addr 1.2.3.6
    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:
Hello,

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

--8<--
check host my1 with address 1.2.3.4
   if failed ...
   group database

check host my2 with address 1.2.3.5
   if failed ...
   group database
--8<--

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.

Regards,
Martin



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

Hello.
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 ?
like
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 [...]
etc.

   
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.
Host:
Host1.... online with all services.... [ICMP echo request] | [SSH] at port 22
etc
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
then
SSH status on hosts
Host1 ..... Online with all services ..... [SSH] at port 22
etc.

thanks :)
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general


reply via email to

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