Module: check_mk
Branch: master
Commit: a224010dab772e96e77146762d72d7002383f5e6
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a224010dab772e…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Tue Jul 15 21:56:01 2014 +0200
check_dns: It is now possible to use the local dns server in wato configuration
Befor this change, it was only possible to define the ip of a dns server or use the the ip
addres of the host as dns server. Now it's to omit this confiuration and the check is
done against the dns servers configured on the monitoring servers.
This is usefull if you e.g. want check web domain names.
---
.werks/179 | 10 ++++++++++
ChangeLog | 1 +
checks/check_dns | 3 ++-
web/plugins/wato/active_checks.py | 15 +++++++++++----
4 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/.werks/179 b/.werks/179
new file mode 100644
index 0000000..1abd06a
--- /dev/null
+++ b/.werks/179
@@ -0,0 +1,10 @@
+Title: check_dns: It is now possible to use the local dns server in wato configuration
+Level: 1
+Component: checks
+Version: 1.2.5i5
+Date: 1405453916
+Class: feature
+
+Befor this change, it was only possible to define the ip of a dns server or use the the
ip addres of the host as dns server. Now it's to omit this confiuration and the check
is done against the dns servers configured on the monitoring servers.
+
+This is usefull if you e.g. want check web domain names.
diff --git a/ChangeLog b/ChangeLog
index daaef7e..1bfbf2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -26,6 +26,7 @@
* 0178 mssql_tablespaces: It is now possible to define thresholds
* 0999 allnet_ip_sensoric.pressure: New Check for Pressure Sensors in ALLNET IP
Sensoric devices
* 1082 windows agent: now also available as msi installer...
+ * 0179 check_dns: It is now possible to use the local dns server in wato
configuration...
* 0994 FIX: agent plugin smart: fixed syntax error
* 0989 FIX: logwatch.ec: Fix forwarding multiple messages via syslog/TCP...
* 0943 FIX: if.include: fixed incorrect traffic percentage values in the check output
of if checks...
diff --git a/checks/check_dns b/checks/check_dns
index 4ac542c..049b7e4 100644
--- a/checks/check_dns
+++ b/checks/check_dns
@@ -29,7 +29,8 @@ def check_dns_arguments(params):
args = '-H %s' % quote_shell_string(description)
if "server" in settings:
- args += ' -s %s' % quote_shell_string(settings["server"])
+ if settings["server"] != "use local configuration":
+ args += ' -s %s' % quote_shell_string(settings["server"])
else:
args += " -s '$HOSTADDRESS$'"
diff --git a/web/plugins/wato/active_checks.py b/web/plugins/wato/active_checks.py
index 1ad90b7..400a260 100644
--- a/web/plugins/wato/active_checks.py
+++ b/web/plugins/wato/active_checks.py
@@ -177,10 +177,17 @@ register_rule(group,
title = _("Optional parameters"),
elements = [
( "server",
- TextAscii(
- title = _("DNS Server"),
- allow_empty = False,
- help = _("Optional DNS server you want to use for the
lookup"))),
+ Alternative(
+ title = _("DNS Server"),
+ elements = [
+ FixedValue( value="use local configuration",
+ title = _("Use local DNS configuration
of monitoring site")),
+ TextAscii(
+ title = _("Specify DNS Server"),
+ allow_empty = False,
+ help = _("Optional DNS server you want to use
for the lookup")),
+ ])
+ ),
( "expected_address",
Transform(
ListOfStrings(