Xymon Mailing List Archive search

Question about xymonnet --dns switch

2 messages in this thread

list Jon Eveland · Fri, 18 Nov 2011 11:19:36 -0600 ·
I'm trying to figure out the best way to have xymon use the IP address
in hosts.cfg when present, and use DNS resolution otherwise.  Ideally
I'd like to maintain IP addresses for things not in my DNS only in
hosts.cfg (i.e. not need to also maintain /etc/hosts).  For example,
two records from hosts.cfg

192.168.1.1  router  #
0.0.0.0      server1 # ftp ssh

What I'd like is for xymon to use the IP when listed (eg for the
router), but use the resolver when the IP is 0.0.0.0.

--dns=standard : fails to resolve "router", unless I tag with "testip"
--dns=only     : fails to resolve "router" no matter what
--dns=ip       : fails to resolve server1

Should --dns=ip be falling back to the resolver when the IP is 0.0.0.0?
Or, should there be a --dns=xymon, which uses hosts.cfg as its first 
step and then falls back to the resolver?  Or, am I missing something?

Thanks,
Jon
list Carl Inglis · Sat, 19 Nov 2011 09:32:01 +0000 ·
You could do something using nsswitch.conf: http://www.cyberciti.biz/faq/howto-change-dns-search-order-in-linux/

Hope that helps.

Carl


 Carl Inglis
Systems Administrator

Rakon UK Limited
Dowsett House, Sadler Road, Lincoln LN6 3RS, United Kingdom
Tel: +XX (X)XXXX XXXXXX | Fax:+XX (X) XXXX XXXXXX | Mob: +44 (0) 7786 552915
user-96685bdc864b@xymon.invalid | www.rakon.com
Winner of the 2010 Lincolnshire Business of the Year Award

This message together with any attachments contains confidential information and may be
subject to privilege. If you are not the intended recipient you may not distribute it in any
way, you must notify the sender immediately and delete any copies of the message along
with its attachments.
quoted from Jon Eveland
From: xymon-bounces at xymon.com [xymon-bounces at xymon.com] on behalf of Jon Eveland [user-78d72819d8e0@xymon.invalid]
Sent: 18 November 2011 17:19
To: xymon at xymon.com
Subject: [Xymon] Question about xymonnet --dns switch

I'm trying to figure out the best way to have xymon use the IP address
in hosts.cfg when present, and use DNS resolution otherwise.  Ideally
I'd like to maintain IP addresses for things not in my DNS only in
hosts.cfg (i.e. not need to also maintain /etc/hosts).  For example,
two records from hosts.cfg

192.168.1.1  router  #
0.0.0.0      server1 # ftp ssh

What I'd like is for xymon to use the IP when listed (eg for the
router), but use the resolver when the IP is 0.0.0.0.

--dns=standard : fails to resolve "router", unless I tag with "testip"
--dns=only     : fails to resolve "router" no matter what
--dns=ip       : fails to resolve server1

Should --dns=ip be falling back to the resolver when the IP is 0.0.0.0?
Or, should there be a --dns=xymon, which uses hosts.cfg as its first
step and then falls back to the resolver?  Or, am I missing something?

Thanks,
Jon


Rakon UK Ltd is a limited company registered in England and Wales.
Registered Office: Dowsett House, Sadler Road, Lincoln LN6 3RS
Company Registration Number: 5128090.

Please be aware that Rakon UK Limited may monitor email traffic data including the date, time, subject line, sender and recipients for the purposes of security and usage monitoring. Automated monitoring systems may also be applied to ascertain whether incoming/outgoing emails are likely to contain viruses, other destructive devices or inappropriate content.