On 29/08/16 01:02, Warren Block wrote:
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.
There are examples for each config object type. So I don't see why you
can't find trivial usage examples there.
Variables are described for each object and are usually pretty clear.
Some more complex concepts have additional chapters explaining use in
more detail.
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
Well, first of all: fix the server. A internet host must reply to pings
(RFC 1122). Not replying only causes problems to users and admins...
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".
You don't write what you have configured thus it's hard to tell where
you did go wrong.
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.
Works for me just following basic examples from the docs:
you need a Host object
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/object-types#objecttype-host
and a Service object
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/object-types#objecttype-service
Parameters to the check_http are here:
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/plugin-check-commands#plugin-check-command-http
As the "hostalive" check in the Host object example won't work for your
broken web server, you could use the dummy check instead to force the
Host object to be OK at all times:
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/plugin-check-commands#plugin-check-command-dummy
Of course, as Thomas suggested you could use the http check in the Host
object as well if you want to use the http check as hostalive check...
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.
Templates are basically just like #includes or similar: you can define
some common settings in templates and include these elsewhere. Templates
per se don't really have anything to do with your problem...
-Gerald
_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users