[cron.d/munin-node] On passe le fichier dans Python parce qu'on veut rajouter le workaround sous wheezy
Ignore-this: ffe8af671fe4e06a286cdbdde2b96831 darcs-hash:20130123021030-2c9c1-f4024516f5ef16d63bdd27ea9552fb0eb3328bec.gz
This commit is contained in:
parent
404d368e88
commit
f3830adb72
4 changed files with 35 additions and 22 deletions
|
@ -8,5 +8,5 @@
|
||||||
<Path name="/etc/munin/plugin-conf.d/00-sanitize-env"/>
|
<Path name="/etc/munin/plugin-conf.d/00-sanitize-env"/>
|
||||||
<Path name="/etc/munin/plugin-conf.d/crans"/>
|
<Path name="/etc/munin/plugin-conf.d/crans"/>
|
||||||
<Python name="/etc/cron.d/munin-crans"/>
|
<Python name="/etc/cron.d/munin-crans"/>
|
||||||
<Path name="/etc/cron.d/munin-node"/>
|
<Python name="/etc/cron.d/munin-node"/>
|
||||||
</Bundle>
|
</Bundle>
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
<FileInfo>
|
|
||||||
<Info owner='root' group='root' perms='0644'/>
|
|
||||||
</FileInfo>
|
|
|
@ -1,18 +0,0 @@
|
||||||
# Fichier modifie par bcfg2
|
|
||||||
# Il risque potentiellement de se faire ecraser par les maj de munin-node
|
|
||||||
#
|
|
||||||
# cron-jobs for munin-node
|
|
||||||
#
|
|
||||||
|
|
||||||
MAILTO=root
|
|
||||||
|
|
||||||
# If the APT plugin is enabled, update packages databases approx. once
|
|
||||||
# an hour (12 invokations an hour, 1 in 12 chance that the update will
|
|
||||||
# happen), but ensure that there will never be more than two hour (7200
|
|
||||||
# seconds) interval between updates..
|
|
||||||
|
|
||||||
# Quand on le fait trop vite, parfois la tache precedente n'a pas eu le temps
|
|
||||||
# de finir et donc la suivante crashe parce qu'elle n'arrive pas a prendre
|
|
||||||
# le lock
|
|
||||||
*/10 * * * * root if [ -x /etc/munin/plugins/apt_all ]; then /etc/munin/plugins/apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugins/apt ]; then /etc/munin/plugins/apt update 7200 12 >/dev/null; fi
|
|
||||||
|
|
34
Python/etc/cron.d/munin-node
Normal file
34
Python/etc/cron.d/munin-node
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# -*- coding: utf-8; mode: python -*-
|
||||||
|
|
||||||
|
info["owner"] = "root"
|
||||||
|
info["group"] = "root"
|
||||||
|
info["perms"] = 0644
|
||||||
|
|
||||||
|
header("Cronjob munin-node")
|
||||||
|
print """
|
||||||
|
MAILTO=root
|
||||||
|
|
||||||
|
# If the APT plugin is enabled, update packages databases approx. once
|
||||||
|
# an hour (12 invokations an hour, 1 in 12 chance that the update will
|
||||||
|
# happen), but ensure that there will never be more than two hour (7200
|
||||||
|
# seconds) interval between updates..
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
if has("wheezy"):
|
||||||
|
print """# J'ai trouve ce workaround sur :
|
||||||
|
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=687912
|
||||||
|
# le bugreport pretend que la derniere version de munin fix le probleme, mais non
|
||||||
|
# --
|
||||||
|
# 20-100, le 20/01/2013
|
||||||
|
MUNIN_PLUGSTATE=/var/lib/munin/plugin-state/
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
print """
|
||||||
|
# Quand on le fait trop vite, parfois la tache precedente n'a pas eu le temps
|
||||||
|
# de finir et donc la suivante crashe parce qu'elle n'arrive pas a prendre
|
||||||
|
# le lock
|
||||||
|
*/10 * * * * root if [ -x /etc/munin/plugins/apt_all ]; then /etc/munin/plugins/apt_all update 7200 12 >/dev/null; elif [ -x /etc/munin/plugins/apt ]; then /etc/munin/plugins/apt update 7200 12 >/dev/null; fi
|
||||||
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue