[checkmk-commits] Check_MK Git: check_mk: option --update-dns-cache: continue on errors

Mathias Kettner mk at mathias-kettner.de
Thu Sep 26 09:30:09 CEST 2013


Module: check_mk
Branch: master
Commit: 04bf0fe8cea98a3cff550b078c2db623b537189a
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=04bf0fe8cea98a3cff550b078c2db623b537189a

Author: Mathias Kettner <mk at mathias-kettner.de>
Date:   Thu Sep 26 09:30:03 2013 +0200

option --update-dns-cache: continue on errors

---

 .bugs/954           |    9 +++++++++
 .bugs/955           |   13 +++++++++++++
 .bugs/config        |    2 +-
 modules/.f12        |    2 ++
 modules/check_mk.py |   10 ++++++++--
 web/.f12            |    1 +
 6 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/.bugs/954 b/.bugs/954
new file mode 100644
index 0000000..f6d460d
--- /dev/null
+++ b/.bugs/954
@@ -0,0 +1,9 @@
+Title: During config generation show all errors, not just one
+Component: core
+State: open
+Date: 2013-09-26 09:22:17
+Targetversion: future
+Class: feature
+
+When there are more than one errors during config generation,
+we could display all of them, not just one.
diff --git a/.bugs/955 b/.bugs/955
new file mode 100644
index 0000000..0595fb7
--- /dev/null
+++ b/.bugs/955
@@ -0,0 +1,13 @@
+Title: Automatically remove duplicate checks
+Component: core
+State: open
+Date: 2013-09-26 09:23:02
+Targetversion: 1.2.3i3
+Class: nastiness
+
+When you check a host with TCP and SNMP, you most times have
+duplicate checks. This is nasty because you manually have
+to ignore the duplicate.
+
+We simply could silently disable the SNMP based variants
+if a TCP based variant already exist.
diff --git a/.bugs/config b/.bugs/config
index fb82208..fb57ae1 100644
--- a/.bugs/config
+++ b/.bugs/config
@@ -31,8 +31,8 @@ classes = [
 
 targetversions = [
   "1.2.2",
-  "1.2.3",
   "1.2.3i2",
+  "1.2.3i3",
   "1.4.0",
   "future",
 ]
diff --git a/modules/.f12 b/modules/.f12
index ab5e57d..f106c3a 100644
--- a/modules/.f12
+++ b/modules/.f12
@@ -1,3 +1,5 @@
+#!/bin/bash
+SITE=${SITE:-$(cat ../.site)}
 SITE=${SITE:-$(omd sites --bare | head -n 1)}
 sudo cp -v *.py /omd/sites/$SITE/share/check_mk/modules/
 sudo su - $SITE -c "cmk --debug -U"
diff --git a/modules/check_mk.py b/modules/check_mk.py
index b2faee7..f518e88 100755
--- a/modules/check_mk.py
+++ b/modules/check_mk.py
@@ -1213,8 +1213,14 @@ def do_update_dns_cache():
     for hostname in all_active_hosts() + all_active_clusters():
         # Use intelligent logic. This prevents DNS lookups for hosts
         # with statically configured addresses, etc.
-        lookup_ipaddress(hostname)
-
+        try:
+            lookup_ipaddress(hostname)
+        except Exception, e:
+            if opt_verbose:
+                print "Failed to lookup IP address of %s: %s" % (hostname, e)
+            if opt_debug:
+                raise
+            continue
 
 
 def agent_port_of(hostname):
diff --git a/web/.f12 b/web/.f12
index fccf129..aaee97d 100644
--- a/web/.f12
+++ b/web/.f12
@@ -1,4 +1,5 @@
 #!/bin/bash
+SITE=${SITE:-$(cat ../.site)}
 SITE=${SITE:-$(omd sites --bare | head -n 1)}
 sudo rsync --exclude=defaults.py --exclude "*mkevent*" --delete -varx htdocs plugins /omd/sites/$SITE/share/check_mk/web/
 echo "$C files copied"



More information about the checkmk-commits mailing list