Module: check_mk
Branch: master
Commit: 08233164b405115f299b80f3c8e139ab1db153d9
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=08233164b40511…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Dec 16 12:03:14 2014 +0100
#1765 FIX Fixed bug when generating nagvis backends while having sites with livestatus
proxy configured
An exception occured everytime a site was saved when having at least one site configured
which uses a connection via livestatus proxy daemon.
---
.werks/1765 | 12 ++++++++++++
ChangeLog | 3 ++-
web/htdocs/wato.py | 8 +++++++-
3 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/.werks/1765 b/.werks/1765
new file mode 100644
index 0000000..66eb6c8
--- /dev/null
+++ b/.werks/1765
@@ -0,0 +1,12 @@
+Title: Fixed bug when generating nagvis backends while having sites with livestatus proxy
configured
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1418727715
+
+An exception occured everytime a site was saved when having at least one site configured
+which uses a connection via livestatus proxy daemon.
+
diff --git a/ChangeLog b/ChangeLog
index 2a5cb0b..b56eca8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,12 +20,13 @@
WATO:
* 1760 Added search form to manual checks page
* 1761 FIX: Ruleset search is now consistent for host & serviceparameters and
manual checks
+ * 1765 FIX: Fixed bug when generating nagvis backends while having sites with
livestatus proxy configured...
Notifications:
* 1662 notification plugin spectrum: finalized script. now able to handle host
notications
* 1661 FIX: mknotifyd: improved performance when receiving forwarded notifications
- * 1205 FIX: RBN: Fixed match contactgroup condition...
* 1664 FIX: mknotifyd: further performance improvements for notification forwarding
+ * 1205 FIX: RBN: Fixed match contactgroup condition...
1.2.6b1:
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 684a08f..0e9afb3 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -10607,11 +10607,17 @@ def create_nagvis_backends(sites):
if 'socket' not in site:
continue # skip sites without configured sockets
+ # Handle special data format of livestatus proxy config
+ if type(site['socket']) == tuple:
+ socket = 'tcp:%s:%d' % site['socket'][1]['socket']
+ else:
+ socket = site['socket']
+
cfg += [
'',
'[backend_%s]' % site_id,
'backendtype="mklivestatus"',
- 'socket="%s"' % site['socket'],
+ 'socket="%s"' % socket,
]
if 'status_host' in site: