Post by Werner FlammePost by Alan BunchPost by Werner FlammePost by c***@public.gmane.orgUsing the FQDN instead of the IP address can lead to false positives
in certain circumstances.
If you have a problem with DNS, it may appear that you have a problem
with various hosts when they are actually fine. Using the IP address
eliminates that problem.
That's why there always is a dnsmasq server running on my monitoring
host. The additional entries for the monitored hosts are scraped
together by a little awk routine, since the conf is in the file system.
Getting it from a database should not be more complicated.
Just my 2¢
Werner
This gets to the root of my concern. If I had hundreds or thousands of
hosts maintaining ip address in two places would seem to be unworkable.
Really maintaining two copies of anything at scale would seems to a bad
idea. I completely agree and understand that monitoring needs to work
in the face of a DNS failure or DDOS attack.
How are other addressing this issue. DNS with an LDAP backend. A
database backend. Use that to generate or drive DNS and Icinga configs
? How often do you generate new Icinga config ?
I understand there are not necessarily "right" or "wrong" answers, just
different ways to solve the problems at hand.
How are you handling that concern ?
Hi Alan,
we use 2 SOLID appliance boxes in a failover construction.
Unfortunately, they sometimes forget addresses of non-windows hosts - we
even had the case that the zone files werde emptied completely.
To make sure the main DNS works properly, I defined a service check that
check_dns -H $HOSTNAME$ -s $OUR_DNS_IP$ -a $HOSTADDRESS$
Now I can reach any host because of my own DNS, but get alarms for
non-working DNS.
The config is changed quite often, since there is always one change or
another in the monitored landscape. And when the config is replicated to
the failover monitoring host, the new hosts file (/etc/hosts.monitoring)
is created from the hosts.cfg file.
Using Icinga 2, you can easily define a global host-to-service and
service-to-service dependency like so. Say that "global-dns-health" is
your service on host "global-dns-server" targetting the dns resolving.
If it fails, you don't want to be alerted about anything.
Something like
object Host "global-dns-server" {
import "generic-host"
address = "131.130.1.11"
}
object Service "global-dns-health" {
import "generic-service"
host_name = "global-dns-server"
check_command = "dns"
vars.dns_lookup = "www.univie.ac.at"
vars.dns_expected_answer = "131.130.70.8"
}
apply Dependency "global-dns-failure-host" to Host {
//import "..."
parent_host_name = "global-dns-server"
parent_service_name = "global-dns-health"
states = [ Up ]
disable_checks = true
disable_notifications = true
assign where match("*", host.name)
}
apply Dependency "global-dns-failure-service" to Service {
//import "..."
parent_host_name = "global-dns-server"
parent_service_name = "global-dns-health"
states = [ OK ]
disable_checks = true
disable_notifications = true
assign where match("*", service.name)
}
kind regards,
Michael
--
Michael Friedrich, DI (FH)
Application Developer
NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | ***@netways.de
** Open Source Backup Conference 2014 - September - osbconf.org **
** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com **