On Tuesday 05 March 2019 at 17:59:47, Ivo Kidze wrote:

> Hi Anthony,
> 
> Can you send a sample configuration?

My Icinga2 configuration for these machines is pretty complex, because I use a 
lot of templates and apply rules to define things once and use them multiple 
times.

However, the key to it all is that I have a Host definition such as:

object Host "Dev Cluster" {
  import "ClusterDefs"
  vars.cluster_nodes = [ "node1.cluster.tld", "node2.cluster.tld" ]
}

Those node1.cluster.tld and node2 are real machines with an IP address, and 
running services which get checked by Icinga.

The template ClusterDefs contains a dummy check command which looks at the 
host states of the two nodes in the cluster, to work out what state to report 
for the cluster itself.

Similarly I have a service template for cluster machines, which looks at the 
last service state of each node, and reports an appropriate result for the 
cluster as a whole (depending on what the check is, I might want the maximum 
value, the minimum value, the sum of the values, etc).

So, what I want to be able to do is to put the "Dev Cluster" machine into 
Downtime, and have this take effect on node1.cluster.tld and node2.cluster.tld 
as well, so that I get no notifications from any of them until I take the "Dev 
Cluster" machine out of Downtime again.

I'm wondering if I can manage this with Icinga Dependencies, but somehow I 
don't think so, because that seems to be more for defining "if this host is 
down, don't tell me about those other two hosts" (for network connectivity 
reasons etc), whereas I *do* want to get all the notifications which apply when 
problems occur, *except* when I've explicitly put something into Downtime.


Does that help explain the scenario?


Antony.

> -----Original Message-----
> From: icinga-users [mailto:icinga-users-boun...@lists.icinga.org] On Behalf
> Of Antony Stone Sent: Friday, March 1, 2019 12:21 PM
> To: Icinga User's Corner <icinga-users@lists.icinga.org>
> Subject: [icinga-users] Single-click downtime for multiple hosts (and all
> associated services)
> 
> Hi.
> 
> Background:
> 
> I have a high-availability setup which consists of three machines running
> corosync / pacemaker managing a floating IP address, and a second group of
> three machines similarly running another floating IP address.
> 
> Either of those addresses can be used to access various services running on
> the entire "cluster".
> 
> In Icinga(2.10.3) I've created host entries for:
> 
>  - each of the six "real" servers
>  - each of the two floating IPs at which services can be accessed
>  - one "cluster" entity which represents either of the floating addresses
> being available
> 
> Requirement:
> From time to time I run updates to the software on one or more of the real
> 
> servers, and of course this results in short-term unavailability of the
> services they are running, during the upgrade.
> 
> If I'm updating just one machine, I can put it into Downtime in Icingaweb2
> (along with all its services) and avoid getting alerts while the services
> (or indeed the host, if a reboot is involved) are unavailable.
> 
> I would like to be able to set Downtime on one of the floating IP "Hosts"
> and have it take effect on all three of the real servers which provide
> this single address, or to set Downtime on the single "cluster" Host, and
> have this take effect on all six servers together.
> 
> 
> Can anyone think of a way to do this?
> 
> I've tried using Group membership, and custom Host variables, but I can't
> find any way to have a setting I change on the "higher level" host ripple
> down to the component hosts which are members of it.
> 
> 
> Any ideas gratefully received :)
> 
> 
> Antony.

-- 
Pavlov is in the pub enjoying a pint.
The barman rings for last orders, and Pavlov jumps up exclaiming "Damn!  I 
forgot to feed the dog!"

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to