Open soellman opened 9 years ago
This looks easy to do. I'm planning to implement this using a dns library, rather than a call to nslookup
or some such. An example application that does exactly what this check needs is available here.
Awesome. I'd be happy do this to too if you like.
@soellman Already working on it :) I could use a little help on the template functions, as I'm less sure where to start with those. I'll push my branch on this once I have an intial setup, and maybe you could do the same with templating functions, if you have the time?
Sure, no problem. I'll work on it tomorrow. -o
@soellman This check is now in the branch check/dns-arecord
. It currently only supports A records. I'll let you give it a whirl before merging, in case it doesn't fit your use case or doesn't work as you might expect.
"aRecord"
I'd vote for splitting this up a bit. Maybe instead of aRecord, you could have:
resolveDNS which takes name, nameserver (optional?), type (default A?) - like the "host" check but with args resolveDNSMatches which takes name, value, nameserver (optional?), type (default A?)
For my case, I don't actually want to know what the result was, just that I got one. This might be used for testing a forwarding dns server with a well known name (like google.com).
And to make it simple for now, most people will only use the A record anyways so support for more record types could get filled out if/when people request them.
I tested the branch and the simple matching case works great :) -o
The use case here is to check and see if the nameserver is resolving what we'd expect instead of whether a name can be resolved on the host.