Module: check_mk
Branch: master
Commit: 96aa316f0984b2c412e7558b6fc07209c0ce4250
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=96aa316f0984b2…
Author: Bastian Kuhn <bk(a)mathias-kettner.de>
Date: Mon Mar 31 17:18:03 2014 +0200
fix in nagvis_icon.mk
---
doc/treasures/nagvis_icon/nagvis_icon.mk | 3 ++-
doc/treasures/nagvis_icon/nagvis_icon.py | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/doc/treasures/nagvis_icon/nagvis_icon.mk
b/doc/treasures/nagvis_icon/nagvis_icon.mk
index 9ac6056..3d3dddd 100644
--- a/doc/treasures/nagvis_icon/nagvis_icon.mk
+++ b/doc/treasures/nagvis_icon/nagvis_icon.mk
@@ -10,7 +10,8 @@ for _nm in glob.glob(_path):
for _nhost in [ _l for _l in file(_nm).readlines() if
_l.startswith('host_name')]:
_nhost = _nhost.split('=')[-1].strip()
_hosts.setdefault(_nhost, [])
- _hosts[_nhost].append(_mapname)
+ if _mapname not in _hosts[_nhost]:
+ _hosts[_nhost].append(_mapname)
extra_host_conf['_nagvismaps'] = []
for _nhost, _maps in _hosts.items():
diff --git a/doc/treasures/nagvis_icon/nagvis_icon.py
b/doc/treasures/nagvis_icon/nagvis_icon.py
index 2d7dff2..bcc6356 100644
--- a/doc/treasures/nagvis_icon/nagvis_icon.py
+++ b/doc/treasures/nagvis_icon/nagvis_icon.py
@@ -1,6 +1,8 @@
#!/usr/bin/python
# Please refer to nagvis_icon.mk to see a way how to add the nagvismaps custom macro
+# copy me to ~/local/share/check_mk/web/pluins/icon and restart the site apache
+
def paint_nagvis_image(what, row, tags, custom_vars):
if what != 'host' or not custom_vars.get('NAGVISMAPS'):
return