[munin] mise à jour vers la 1.4
darcs-hash:20100205121602-ffbb2-12d71a997e596f35b16c0309949577d4fb727d49.gz
This commit is contained in:
parent
524d0f8107
commit
947162db3a
2 changed files with 15 additions and 4 deletions
|
@ -29,6 +29,7 @@ IGNORE_PLUGINS = (
|
|||
'if_err_',
|
||||
'multips',
|
||||
'port_',
|
||||
'sensors_',
|
||||
'squid_icp',
|
||||
'vlan_',
|
||||
)
|
||||
|
@ -77,14 +78,17 @@ def get_munin_plugins():
|
|||
)
|
||||
munin_stdout, munin_stderr = munin.communicate()
|
||||
|
||||
if munin.returncode != 0:
|
||||
raise RuntimeError, "munin-node-configure... Stderr:\n%s" % munin_stderr
|
||||
# if munin.returncode != 0:
|
||||
# raise RuntimeError, "munin-node-configure... Stderr:\n%s" % munin_stderr
|
||||
|
||||
munin_output_lines = munin_stdout.splitlines()
|
||||
|
||||
for line in munin_output_lines:
|
||||
if line.startswith("ln -s"):
|
||||
dst, src = line.split()[-2:]
|
||||
if dst[0] == "'":
|
||||
dst = dst[1:-1]
|
||||
src = src[1:-1]
|
||||
src = os.path.basename(src)
|
||||
# filtrage
|
||||
if not os.path.basename(dst) in IGNORE_PLUGINS:
|
||||
|
@ -111,7 +115,10 @@ def get_all_plugins():
|
|||
custom_plugins = hosts_plugins.get(hostname, {})
|
||||
|
||||
for plugin, dest_file in custom_plugins.iteritems():
|
||||
result[plugin] = os.path.join('/usr/scripts/munin', dest_file)
|
||||
if dest_file.startswith('/'):
|
||||
result[plugin] = dest_file
|
||||
else:
|
||||
result[plugin] = os.path.join('/usr/scripts/munin', dest_file)
|
||||
|
||||
return result
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue