[Xymon] how are hosts with 0.0.0.0 address looked up?

Japheth Cleaver cleaver at terabithia.org
Tue Nov 8 23:05:06 CET 2016


On 11/8/2016 1:43 PM, Richard Hamilton wrote:
> I had hoped it used gethostbyname() or better getipnodebyname() or 
> getnameinfo(), which if the host's lookup mechanism were configured 
> appropriately, might use a variety of services (including multicast 
> DNS/Bonjour).  But I'm guessing it bypasses all that and uses the 
> resolver directly, because it's not working on an entry like
>
> 0.0.0.0    lapple.local
>
> to pick up an mDNS resolution.  That would have taken care of me as I 
> moved around and connected remotely via a VPN, given that I set up a 
> script to register my transitory VPN address when I'm connected that 
> way, and when I'm at home, the automatic Bonjour registration with my 
> (DHCP but actually static) address would have happened instead.
>
> Is there an option to tell xymonnet to use one of the above calls 
> instead of the resolver?
>

Hi,

You'll probably want to use the "--no-ares" option to xymonnet. By 
default, xymonnet uses the c-ares library (either the system one or a 
compiled-in version) to do hosts.cfg lookups. With that option, it will 
revert to the gethostbyname() system call. Note that this will result in 
being susceptible to delays if your system resolver is timing out, 
unfortunately.


HTH,
-jc



More information about the Xymon mailing list