# # ChangeLog for /src/noit_check_resolver.c # # Generated by Trac 0.10.3 # 06/19/13 11:33:06 # 11/22/11 02:30:55 Theo Schlossnagle <jesus@omniti.com> [303e2b0c22be18290eb1265b3c602a66391fbe8b] * src/noit_check_resolver.c (modified) If a record was in place and the refresh fails, it will leave the TTL what it was and thus cache a wrong answer for the wrong length of time. Also, drop the default TTL for errors down to 60 seconds which is the default check interval. 06/02/11 15:29:23 Theo Schlossnagle <jesus@omniti.com> [db037b88b1a8392d998a758523e8d0bd66113c89] * src/noit_check_resolver.c (modified) if we get multiple TTLs in the response, we should fudge it to the lowest one 02/18/11 22:42:03 Theo Schlossnagle <jesus@omniti.com> [f8c63e9fdef637cbef40fa8f4535742dce17d609] * src/noit_check_resolver.c (modified) fix initialization order... default config ships with dns modules enabled -- it did initialization. if you don't load that module, you crash without this code 01/25/11 02:23:36 Theo Schlossnagle <jesus@omniti.com> [b9e1ddf4c523ca4eadbb9f38c6c3d8c647e51fd2] * src/noit_check_resolver.c (modified) this allows us to follow CNAMES 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.