[icinga-users] Non-trivial configuration examples (non-ICMP www host)

Thomas Gelf thomas.gelf at netways.de
Mon Aug 29 09:26:58 CEST 2016


Hi,

> Is there somewhere with a large collection of non-trivial configuration
> examples?  The docs tell what variables do but mostly do not demonstrate
> even trivial usage.

Not that I'm aware of. Well, there are usage examples, but quite
distributed over various places. There are attempts going on to add more
"Best practices"-like examples to the documentation, recently a lot of
effort has been invested in doing so for the HA/Clustering documentation.

However, if I didn't misunderstand what you're asking for, this should
be pretty easy to accomplish once reading the basic introduction:

http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics

(plus eventually the migration hint in case you have an Icinga 1.x or
Nagios background)

With that basic knowledge it should be fairly easy to interpret the
options provided by the "http" check command:

http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/plugin-check-commands#plugin-check-command-http

So, one solution to your example could be as simple as:

template Host "Hosts reachable only via HTTP" {
  check_command = "http"
}

object Host "www.example.com" {
  import "Hosts reachable only via HTTP"

  address = "172.31.31.170"
}

Cheers,
Thomas

Am 29.08.2016 um 01:02 schrieb Warren Block:
> Is there somewhere with a large collection of non-trivial configuration
> examples?  The docs tell what variables do but mostly do not demonstrate
> even trivial usage.
>
> In this case, I am trying to figure out how to define a host for a
> remote website that does not respond to pings.  This seems like a not
> too rare situation, and there are examples of setting it up for Nagios,
> but Icinga is different enough to make those useless.  Yet it can't be
> that hard.  Define a host template, use that host template... but my
> HTTP checks fail with "hostname nor servname provided, or not known".
> Sure, the hostname has to be passed through to the check somehow.  I can
> do it on the command line easily.  Figuring out how to define it for
> Icinga2 is not as clear.
>
> There is only one host template in the sample.  Having a big, real
> sample to examine would help.  Information like IP addresses and
> hostnames could be obscured, as long as it was done consistently.
> _______________________________________________
> icinga-users mailing list
> icinga-users at lists.icinga.org
> https://lists.icinga.org/mailman/listinfo/icinga-users

-- 
Thomas Gelf
Principal Consultant

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
CEO: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | thomas.gelf at netways.de

** OSBConf 2016 - September - osbconf.org **
** OSMC 2016 - November - netways.de/osmc **


More information about the icinga-users mailing list