# # ChangeLog for /src/noit_check_resolver.h # # Generated by Trac 0.10.3 # 05/24/13 18:29:05 # 01/08/11 17:51:19 Theo Schlossnagle <jesus@omniti.com> [b553f9a4d73487ee85e5cfedf2cd67352b4d5e6b] * src/Makefile.in (modified) * src/java/com/omniti/jezebel/JezebelDispatch.java (modified) * src/java/com/omniti/jezebel/check/JDBC.java (modified) * src/java/com/omniti/jezebel/check/jmx.java (modified) * src/modules-lua/noit/module/haproxy.lua (modified) * src/modules-lua/noit/module/http.lua (modified) * src/modules-lua/noit/module/jezebel.lua (modified) * src/modules-lua/noit/module/memcached.lua (modified) * src/modules-lua/noit/module/munin.lua (modified) * src/modules-lua/noit/module/ntp.lua (modified) * src/modules-lua/noit/module/resmon.lua (modified) * src/modules-lua/noit/module/smtp.lua (modified) * src/modules-lua/noit/module/tcp.lua (modified) * src/modules-lua/noit/module/varnish.lua (modified) * src/modules/dns.c (modified) * src/modules/dns.xml (modified) * src/modules/lua.c (modified) * src/modules/ping_icmp.c (modified) * src/modules/snmp.c (modified) * src/modules/ssh2.c (modified) * src/noit_check.c (modified) * src/noit_check.h (modified) * src/noit_check_resolver.c (added) * src/noit_check_resolver.h (added) * src/noit_check_rest.c (modified) * src/noit_check_tools.c (modified) * src/noit_check_tools_shared.c (modified) * src/noit_conf_checks.c (modified) refs #340 This is a rather major change. Targets can now be hostnames in addition to IP addresses so long as //checks/@resolve_targets is not false. If a target is entered that does not look like an IP (inet_pton fails) then the check is marked as needing resolution NP_RESOLVE. A passive look-aside dns cache has been implemented in noit_check_resolver.c that is used to power the whole system and some reasonably simply console command have been provided: show dns_cache [fqdn1 [fqdn2]] -- shows the state dns_cache <fqdn> [fqdn2 [fqdn3]] -- submits for lookup no dns_cache <fqdn> [fqdn2 [fqdn3]] -- purges from cache The big change is that modules that relied on check->target to be an IP address are going to explode when names are provided. Instead, modules should now use target for the provided target (possibly a FQDN) and use target_ip (check->target_ip or check.target_ip) for a resolved IP address and also check for the case of empty string: (check->target_ip[0] == '\0') for the case that resolution has failed. In lua, the target_ip will be presented as nil in the case of failed name resolution. I believe I've updated all necessary components of the system for this to "just work" but people that have implemented their own check should update them before they elect to use non-IP addresses as targets. The dns subsystem supports both IPv4 and IPv6, but currently prefers IPv4 addresses if any are present.