Commit f642a691 authored by Jonathan Michalon's avatar Jonathan Michalon

Implement CheckDNSZone calling "check_dns_soa"

The CheckDNSZone implementation now calls the check available here:
https://github.com/bortzmeyer/check_dns_soa
parent 823dc3fd
......@@ -6,7 +6,7 @@ web = Host(ipv4='127.0.0.0', ipv6='::42')
alsace = Host(ipv4='127.0.0.1', ipv6='::1')
checks = Checks()
checks.add(CheckDNSZone, ["arn-fai.net", "netlib.re"])
checks.add(CheckDNSZone, ["arn-fai.net", "netlib.re"], ip_version=4)
checks.add(CheckPing4, [mail, web])
checks.add(CheckPing6, [mail, web])
# checks.add(CheckSMTP4, [mail, alsace])
......
......@@ -106,9 +106,9 @@ class CheckDNSZone(Check):
return '<%s on %s, options=%s>' % (self.__class__.__name__, self.zone, self._options)
def check(self):
self.errmsg = "Unimplemented"
return False
command = ['check_dns_soa', '-4', '-H', self.zone]
command = ['check_dns_soa', '-H', self.zone]
if self._options.get('ip_version', 0) in [4, 6]:
command.append('-' + str(self._options['ip_version']))
return self.exec_with_timeout(command)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment