DNS Scripting Methods

The collector includes dnsjava (dnsjava.org) to allow scripting of DNS based objects.

See https://dnsjava.org/dnsjava-current/doc/ for the full java documentation.

As a simple example, a datasource could use a script such as the below to ensure that the local DNS resolvers are working:

import org.xbill.DNS.*;

records = new Lookup("gmail.com", Type.MX).run()

records.each() {
println it

return (0);