Apan Configurations

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Wed Oct 30 18:31:27 CET 2002


Although somewhat orthogonal to the charter of the list, I'd like to throw
my $0.02 in here.

<soapbox>

DNS is (to me, and to most of the Internet users out there) an essential
service.  To exclude Nagios' dependency on DNS, simply because, "DNS might
break" isn't a great argument.  To me, anyway.  You could say the same of
your disks, your CPU, your network connectivity....

If you actually mean, "hey, it's misbehaved in the past, it could misbehave
in the future" that tells me that your DNS infrastructure isn't as robust as
it needs to be.

For starters, I recommend replacing BIND with tinydns (http://cr.yp.to -
same author as Qmail).  You can dramatically simplify your DNS
administration.  And it's quite robust.

(Sidebar:  I once worked in an environment where they had a hodgepodge of 2
NIS domains, an incomplete administration of DNS (ie, missing/bad/incorrect
PTR records) running on *one single server*, /etc/hosts files in varying
states of correctness strewn across the various hosts, and inconsistencies
between all of those.  One of my tasks was to build out some new DNS
servers, merge the 2 NIS domains, simplify/merge the /etc/hosts files, and
essentially move the infrastructure's dependency of hostname resolution over
to DNS.  At the time, I was only familiar with BIND, so that's what I used.
In the end, I had 4 DNS servers, and was actively helping remote offices get
their DNS zones set up properly.  If I were to do that environment again
today, the only chage I'd make would be to use tinydns instead of BIND.)

Now that I know that the 'address' directive in the host definition isn't an
absolute requirement (contrary to the documentation :P), I plan to delete
all those directives.  I consider my DNS servers to robust, up-to-date, and
any other superlative descriptions you'd care to use.  The only exceptions
to this will be hosts which should be defined in another DNS zone, but
aren't.  (If I think of other reasonable exceptions, I'll do so.)  For those
exceptions, yes, defining them in /etc/hosts seems to be the best place.
For now.

Being a sysadmin, I've had to chant the DNS mantra for some time,
discouraging the one-offs in /etc/hosts on this host and that host, frowning
on the use of IP addresses by end-users, and generally taking the approach
of, "DNS is your friend".  Where it merits, I opt for CNAMES or hostname
aliases, just so that certain functionality isn't cast in stone with a
particular host till the end of time.  If I want to login to the CVS server,
I just type "ssh cvs" and I'm there.  The actual hostname is a properly
blessed one; 'cvs' is just a CNAME.  If we decide to move CVS to another
host, we can do so, make the change in DNS, and nobody should be the wiser.
Granted, within Nagios, I'll refer to the proper hostnames (and use the
'alias' directive to be more descriptive).

If you're one of those who don't have ownership of the DNS zones for the
hosts you need to watch over (and have had various problems as a result of
that lack of ownership) , then I can see wanting to use /etc/hosts.  If you
haven't got ownership, I urge you to make a case for having the zones
delegated to you, or get in tight with the admin who does have ownership.

Having said this, I will likely set up a dnscache server (the caching piece
of tinydns) on my Nagios host.  This should reduce even further the
possibility of a DNS hiccup.

</soapbox>

jc

> -----Original Message-----
> From: Ralph Zimmermann [mailto:ralph.zimmermann at salt-ag.com]
> Sent: Wednesday, October 30, 2002 10:23 AM
> To: 'Fredrik Wänglund'
> Cc: Nagios Mailing List
> Subject: RE: [Nagios-users] Apan Configurations
> 
> 
> I can see your point Frederik and agree that ip addresses in 
> /etc/hosts are 
> easier to maintain
> than addresses through .../nagios/etc/hosts.cfg, because if 
> not using DNS 
> to resolve the hostnames
> (which I don't want, to remain operational in case of DNS 
> faults) it's at 
> least one single source.
> 
> But for fellow admins having nagios configured to monitor 
> 500+ hosts it's a 
> tough thing to convert...
> 
> I guess I'll go and write a little script to extract ip-addresses and 
> Nagios hostnames from
> hosts.cfg and paste them to /etc/hosts, afterwards replace 
> ip-addresses 
> with corresponding
> hostnames in hosts.cfg
> 
> Regards,
> Ralph.
> 
> -----Ursprüngliche Nachricht-----
> Von:	Fredrik Wänglund [SMTP:Fredrik.Wanglund at datavis.se]
> Gesendet am:	Mittwoch, 30. Oktober 2002 16:33
> An:	dbestetti at interop.com.br; Nagios Mailing List
> Betreff:	RE: [Nagios-users] Apan Configurations
> 
> Actually I don't use IP-numbers at all in Nagios, only 
> host-names. All 
> hosts I monitor in Nagios then lives in my hosts-file.
> It's safe to skip the adress-statement in the host-definition 
> and leave 
> IP-numbers to /etc/hosts. You also need to set up your 
> name-service switch 
> to always look in files first (I don't yse DNS on my Nagios-server).
> 
> The benefits with this is that you have one source where 
> IP-numbers and 
> host-names are stored. The problem begins when you have many 
> hosts, then 
> your hosts-file get quite big. But I still think its easier to manage 
> IP/name matching via /etc/hosts then the adress-statement in Nagios.
> 
> 
> 
> /FredrikW
> 
> 
> -----Original Message-----
> From:	Dario B. Bestetti [mailto:dbestetti at interop.com.br]
> Sent:	Wed 30-Oct-02 14:26
> To:	'Nagios Mailing List'
> Cc:	
> Subject:	RE: [Nagios-users] Apan Configurations
> 
> I would prefer to monitor by hostname since we monitor hosts with
> dynamic IP addresses.
> 
> []s
> Dario.
> 
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net
> > [mailto:nagios-users-admin at lists.sourceforge.net] On Behalf
> > Of Erkki Kukk
> > Sent: terça-feira, 29 de outubro de 2002 08:30
> > To: Fredrik Wänglund
> > Cc: Nagios Mailing List
> > Subject: RE: [Nagios-users] Apan Configurations
> >
> >
> >
> > Hi.
> >
> > Its great to see that someone is finally dealing with
> > graphing the perfdata. And for me Apan works fine. But I dont
> > like that it does all the checks by hostname :(  I think it
> > is much better to check by ip address, like nagios does.
> >
> > Brgds,
> > 	erkki
> >
> >
> > > I am currently working on an HOWTO section in the docs on Apans
> > > homepage.
> > >
> > > Here's the short one (assuming tou have installed the files and
> > > defined the command):
> > >
> > > 1) Define a sevice in Nagios with apan as check_command and the
> > > plugin-name as first argument; define service{
> > > host_name                      server
> > > service_description            Ping
> > > ...
> > > check_command                  apan!ping!100.0,20%!500.0,60%
> > > ...
> > > }
> > >
> > > 2) Create a RRD_file
> > > rrdtool create /usr/local/nagios/rrd/server_Ping.rrd -s 60
> > > DS:ping:GAUGE:300:0:U RRA:AVERAGE:0.5:1:50400
> > RRA:AVERAGE:0.5:60:43800
> > >
> > > 3) Define the serice in apan.cfg
> > >
> > server;Ping;/usr/local/nagios/rrd/server_ping.rrd;ping;ping:LI
> > NE2;Ping
> > > round-trip time;Secondsefine the serice in apan.cfg
> > >
> > > 4) Add a URL and icon to the service
> > > define serviceextinfo{
> > > host_name               server
> > > service_description     Ping
> > > notes_url
> > /nagios/cgi-bin/apan.cgi?host=server&service=Ping
> > > icon_image              graph.png
> > > ...
> > > }
> > >
> > >
> > > /FredrikW
> > >
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> >
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf




More information about the Users mailing list