[munin/scripts/hosts_plugins] Import initial
Ignore-this: c69e7ebd67961d51935dc48578d6fc72 darcs-hash:20090317062901-ffbb2-932aa39c0f36d02b7adcdca4fdbe5bb39b80c7ea.gz
This commit is contained in:
parent
47477886c6
commit
cd658c00d1
1 changed files with 99 additions and 0 deletions
99
munin/scripts/hosts_plugins.py
Executable file
99
munin/scripts/hosts_plugins.py
Executable file
|
@ -0,0 +1,99 @@
|
|||
#!/usr/bin/env python
|
||||
# -!- encoding: utf-8 -!-
|
||||
# Correspondance hôte <-> plugin munin custom
|
||||
#
|
||||
# Copyright © 2009 Nicolas Dandrimont <Nicolas.Dandrimont@crans.org>
|
||||
#
|
||||
# Licence: Domaine public (qui voudrait de ça de toute façon...)
|
||||
|
||||
import sys as _sys
|
||||
_sys.path.append("/usr/scripts/gestion")
|
||||
del _sys
|
||||
|
||||
import annuaires
|
||||
import config
|
||||
|
||||
__all__ = ["hosts_plugins"]
|
||||
|
||||
hosts_plugins = {
|
||||
"zamok": {
|
||||
"iptables_filter": "iptables_",
|
||||
"iptables_mangle": "iptables_",
|
||||
"iptables_nat": "iptables_",
|
||||
"laserjet_car": "laserjet_",
|
||||
"laserjet_car-p": "laserjet_",
|
||||
"laserjet__etat": "laserjet__etat",
|
||||
"laserjet_kit": "laserjet_",
|
||||
"laserjet__pages": "laserjet__pages",
|
||||
"laserjet_stock-papier": "laserjet_",
|
||||
"laserjet_stock-papier-p": "laserjet_",
|
||||
"laserjet_tam": "laserjet_",
|
||||
"laserjet_tam-p": "laserjet_",
|
||||
"webalizer_intranet": "webalizer_",
|
||||
"webalizer_perso": "webalizer_",
|
||||
"who": "who",
|
||||
},
|
||||
"vert": {
|
||||
"slapd_bdb_cache_pages": "slapd_bdb_cache_",
|
||||
"slapd_bdb_cache_percent": "slapd_bdb_cache_",
|
||||
},
|
||||
"rouge": {
|
||||
"amavis": "amavis",
|
||||
"iptables_filter": "iptables_",
|
||||
"iptables_mangle": "iptables_",
|
||||
"iptables_nat": "iptables_",
|
||||
"machines": "machines",
|
||||
"webalizer_dixans": "webalizer_",
|
||||
"webalizer_install-party": "webalizer_",
|
||||
"webalizer_news": "webalizer_",
|
||||
"webalizer_trophee": "webalizer_",
|
||||
"webalizer_webmail": "webalizer_",
|
||||
"webalizer_wiki": "webalizer_",
|
||||
"webalizer_www": "webalizer_",
|
||||
"wiki_pages": "wiki_pages",
|
||||
"wiki_themes": "wiki_themes",
|
||||
"wiki_users": "wiki_users",
|
||||
},
|
||||
"komaz": {
|
||||
"iptables_filter": "iptables_",
|
||||
"iptables_mangle": "iptables_",
|
||||
"iptables_nat": "iptales_",
|
||||
"machines": "machines",
|
||||
},
|
||||
"sable": {
|
||||
"blacklist": "blacklist",
|
||||
"iptables_filter": "iptables_",
|
||||
"iptables_mangle": "iptables_",
|
||||
"iptables_nat": "iptales_",
|
||||
},
|
||||
"munin": {
|
||||
"audimat": "audimat",
|
||||
"batiments": "batiments",
|
||||
"munin": "munin",
|
||||
"ping_multiprise.adm": "ping_",
|
||||
"stats-ip": "stats-ip",
|
||||
# La suite plus bas...
|
||||
},
|
||||
}
|
||||
|
||||
####
|
||||
# Trucs spécifiques à munin.crans.org
|
||||
# Onduleur
|
||||
for mge_truc in ["batt", "hygro", "intensite", "temp", "temps", "tension"]:
|
||||
hosts_plugins["munin"]["mge_%s" % mge_truc] = "mge_%s" % mge_truc
|
||||
|
||||
# Stats d'utilisation des réseaux
|
||||
for net in config.NETs:
|
||||
hosts_plugins["munin"]["stats-ip_%s" % net] = "stats-ip_"
|
||||
|
||||
# Stats de peuplement des bâtiments
|
||||
for bat in annuaires.chbre_prises:
|
||||
if bat not in ('v',):
|
||||
hosts_plugins["munin"]["stats-batiment_%s" % bat] = "stats-batiment_"
|
||||
|
||||
# Ping de tous les switches de bâtiments
|
||||
for switch in annuaires.all_switchs():
|
||||
# Suppression du .adm.crans.org
|
||||
switch = switch[:switch.index('.')]
|
||||
switch = switch.replace('-', '_')
|
||||
hosts_plugins["munin"]["ping_%s.adm" % switch] = "ping_bat_"
|
Loading…
Add table
Add a link
Reference in a new issue