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