vers l'utf-8 ...
darcs-hash:20080909193432-b8e4c-8b567852009655f931b00023ebaca090853719dd.gz
This commit is contained in:
parent
82a0a15f52
commit
7438105c0a
28 changed files with 75 additions and 75 deletions
|
@ -35,9 +35,9 @@ fi
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
echo 'graph_title Amavis filter statistics'
|
echo 'graph_title Amavis filter statistics'
|
||||||
echo 'graph_vlabel nb'
|
echo 'graph_vlabel nb'
|
||||||
echo 'total.label Mails scannés'
|
echo 'total.label Mails scannés'
|
||||||
echo "total.draw AREA"
|
echo "total.draw AREA"
|
||||||
echo 'virus.label Mails vérollés'
|
echo 'virus.label Mails vérolés'
|
||||||
echo "virus.draw AREA"
|
echo "virus.draw AREA"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# $Log: apt-proxy,v $
|
# $Log: apt-proxy,v $
|
||||||
# Revision 1.2 2006/05/01 06:17:22 salles
|
# Revision 1.2 2006/05/01 06:17:22 salles
|
||||||
# Réécriture du script directement en shell, on éviter les timeouts de munin
|
# Réécriture du script directement en shell, on éviter les timeouts de munin
|
||||||
# comme ça.
|
# comme ça.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# Must run on aptproxy user or root
|
# Must run on aptproxy user or root
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Système de monitoring des abonnés au différents flux multicast
|
Système de monitoring des abonnés au différents flux multicast
|
||||||
|
|
||||||
Frédéric Pauget, Nicolas Salles, Etienne Chové
|
Frédéric Pauget, Nicolas Salles, Etienne Chové
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
|
@ -13,14 +13,14 @@ from hptools import hpswitch
|
||||||
from annuaires import all_switchs, uplink_prises
|
from annuaires import all_switchs, uplink_prises
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
## Définition des chaines à audimater
|
## Définition des chaines à audimater
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
# On construit un dictionnaire au format "ip" : "nom_de_la_chaine"
|
# On construit un dictionnaire au format "ip" : "nom_de_la_chaine"
|
||||||
|
|
||||||
|
|
||||||
# On log les chaines qui font des annonces sap
|
# On log les chaines qui font des annonces sap
|
||||||
# on essaie de télécharger le fichier sap.txt
|
# on essaie de télécharger le fichier sap.txt
|
||||||
# si on y arrive pas on continue avec l'ancien
|
# si on y arrive pas on continue avec l'ancien
|
||||||
|
|
||||||
chaines = {}
|
chaines = {}
|
||||||
|
@ -64,14 +64,14 @@ if 'config' in sys.argv :
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
####################################################################
|
####################################################################
|
||||||
## Mesure de l'audimat, lancé par cron à cause du timeout de munin
|
## Mesure de l'audimat, lancé par cron à cause du timeout de munin
|
||||||
####################################################################
|
####################################################################
|
||||||
|
|
||||||
if 'generate' in sys.argv :
|
if 'generate' in sys.argv :
|
||||||
stats = {} # { IP : [ prises ] }
|
stats = {} # { IP : [ prises ] }
|
||||||
|
|
||||||
for switch in all_switchs() :
|
for switch in all_switchs() :
|
||||||
# on vérifie que le switch est pingable
|
# on vérifie que le switch est pingable
|
||||||
if os.system('ping -c 3 %s > /dev/null 2> /dev/null' % switch ) :
|
if os.system('ping -c 3 %s > /dev/null 2> /dev/null' % switch ) :
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_title Blacklist'
|
echo 'graph_title Blacklist'
|
||||||
echo "graph_args --base 1000 --lower-limit 0"
|
echo "graph_args --base 1000 --lower-limit 0"
|
||||||
echo "graph_vlabel nb de machines"
|
echo "graph_vlabel nb de machines"
|
||||||
echo 'carte_et.label Certif. études'
|
echo 'carte_et.label Certif. études'
|
||||||
echo 'carte_et.draw AREA'
|
echo 'carte_et.draw AREA'
|
||||||
echo 'chbre.label Chambre invalide'
|
echo 'chbre.label Chambre invalide'
|
||||||
echo 'chbre.draw STACK'
|
echo 'chbre.draw STACK'
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Compteur des règles iptables
|
# Compteur des règles iptables
|
||||||
|
|
||||||
import sys,commands,string
|
import sys,commands,string
|
||||||
|
|
||||||
# On prend l'argument pour définir la table à analyser
|
# On prend l'argument pour définir la table à analyser
|
||||||
TABLE = sys.argv[0].split('_')[1]
|
TABLE = sys.argv[0].split('_')[1]
|
||||||
|
|
||||||
if TABLE :
|
if TABLE :
|
||||||
|
|
|
@ -9,7 +9,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_vlabel nb'
|
echo 'graph_vlabel nb'
|
||||||
echo 'crans.label Nombre de comptes'
|
echo 'crans.label Nombre de comptes'
|
||||||
echo "crans.draw AREA"
|
echo "crans.draw AREA"
|
||||||
echo 'user.label Utilisateurs connectés'
|
echo 'user.label Utilisateurs connectés'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*
|
# -*- coding: utf-8 -*
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
sys.path.append("/usr/scripts/gestion")
|
sys.path.append("/usr/scripts/gestion")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*
|
# -*- coding: utf-8 -*
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
sys.path.append("/usr/scripts/gestion")
|
sys.path.append("/usr/scripts/gestion")
|
||||||
|
@ -8,15 +8,15 @@ import hptools
|
||||||
|
|
||||||
dico = {
|
dico = {
|
||||||
"READY": 1,
|
"READY": 1,
|
||||||
"PrÁt": 1,
|
"PrÁt": 1,
|
||||||
"Pr menus, appuy \x1e": 0,
|
"Pr menus, appuy \x1e": 0,
|
||||||
"Powersave activÅ": 3,
|
"Powersave activÅ": 3,
|
||||||
"Verification": 2,
|
"Verification": 2,
|
||||||
"imprimante": 0,
|
"imprimante": 0,
|
||||||
"PrÅchauffage": 1,
|
"PrÅchauffage": 1,
|
||||||
"Traitement de la": 0,
|
"Traitement de la": 0,
|
||||||
"tÀche du bac 4": 0,
|
"tÀche du bac 4": 0,
|
||||||
"tÀche du bac 3": 0,
|
"tÀche du bac 3": 0,
|
||||||
"COMMANDER CARTOUCHE": 0,
|
"COMMANDER CARTOUCHE": 0,
|
||||||
"COMMANDER KIT NETTOY": 0,
|
"COMMANDER KIT NETTOY": 0,
|
||||||
"COMMANDER FOURNIT.": 0,
|
"COMMANDER FOURNIT.": 0,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*
|
# -*- coding: utf-8 -*
|
||||||
|
|
||||||
import sys, os
|
import sys, os
|
||||||
sys.path.append("/usr/scripts/gestion")
|
sys.path.append("/usr/scripts/gestion")
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
|
|
||||||
# echo 'host_name adherents'
|
# echo 'host_name adherents'
|
||||||
echo 'graph_title Machines connectées'
|
echo 'graph_title Machines connectées'
|
||||||
echo "graph_args --base 1000 --lower-limit 0"
|
echo "graph_args --base 1000 --lower-limit 0"
|
||||||
echo "graph_vlabel nombre de machines"
|
echo "graph_vlabel nombre de machines"
|
||||||
echo 'ens.label ENS'
|
echo 'ens.label ENS'
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
echo 'host_name pulsar.crans.org'
|
echo 'host_name pulsar.crans.org'
|
||||||
echo 'graph_category Environnement'
|
echo 'graph_category Environnement'
|
||||||
echo 'graph_title Hygrométrie 0B'
|
echo 'graph_title Hygrométrie 0B'
|
||||||
echo 'graph_vlabel Humitidé (%)'
|
echo 'graph_vlabel Humitidé (%)'
|
||||||
echo 'hygro.label Humidité 0B'
|
echo 'hygro.label Humidité 0B'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -6,9 +6,9 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'host_name pulsar.crans.org'
|
echo 'host_name pulsar.crans.org'
|
||||||
echo 'graph_category B4'
|
echo 'graph_category B4'
|
||||||
echo 'graph_args --lower-limit 0'
|
echo 'graph_args --lower-limit 0'
|
||||||
echo 'graph_title Intensité'
|
echo 'graph_title Intensité'
|
||||||
echo 'graph_vlabel I (A)'
|
echo 'graph_vlabel I (A)'
|
||||||
echo 'input.label Entrée'
|
echo 'input.label Entrée'
|
||||||
echo 'input.min 0'
|
echo 'input.min 0'
|
||||||
echo 'output.label Sortie'
|
echo 'output.label Sortie'
|
||||||
echo 'output.min 0'
|
echo 'output.min 0'
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
echo 'host_name pulsar.crans.org'
|
echo 'host_name pulsar.crans.org'
|
||||||
echo 'graph_category Environnement'
|
echo 'graph_category Environnement'
|
||||||
echo 'graph_title Température 0B'
|
echo 'graph_title Température 0B'
|
||||||
echo 'graph_vlabel Température en (°C)'
|
echo 'graph_vlabel Température en (°C)'
|
||||||
echo 'temp.label Température 0B'
|
echo 'temp.label Température 0B'
|
||||||
echo 'temp.warning 22'
|
echo 'temp.warning 22'
|
||||||
echo 'temp.critical 24'
|
echo 'temp.critical 24'
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -15,7 +15,7 @@ fi
|
||||||
cmd="snmpget -O vq -v1 -c public pulsar.adm.crans.org SNMPv2-SMI::enterprises.705.1."
|
cmd="snmpget -O vq -v1 -c public pulsar.adm.crans.org SNMPv2-SMI::enterprises.705.1."
|
||||||
|
|
||||||
remain=$(${cmd}5.1.0) # autonomie restante
|
remain=$(${cmd}5.1.0) # autonomie restante
|
||||||
charg=$(${cmd}5.8.0) # temps avant charge complère des batteries
|
charg=$(${cmd}5.8.0) # temps avant charge complère des batteries
|
||||||
echo "remain.value $(($remain/60)).$(($remain%60*10/6))"
|
echo "remain.value $(($remain/60)).$(($remain%60*10/6))"
|
||||||
echo "charg.value $(($charg/60)).$(($charg%60*10/6))"
|
echo "charg.value $(($charg/60)).$(($charg%60*10/6))"
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_category B4'
|
echo 'graph_category B4'
|
||||||
echo 'graph_title Tensions'
|
echo 'graph_title Tensions'
|
||||||
echo 'graph_vlabel U (V)'
|
echo 'graph_vlabel U (V)'
|
||||||
echo 'input.label Entrée'
|
echo 'input.label Entrée'
|
||||||
echo 'input.min 0'
|
echo 'input.min 0'
|
||||||
echo 'output.label Sortie'
|
echo 'output.label Sortie'
|
||||||
echo 'output.min 0'
|
echo 'output.min 0'
|
||||||
|
|
|
@ -38,5 +38,5 @@ done
|
||||||
|
|
||||||
echo "total.value "$total
|
echo "total.value "$total
|
||||||
|
|
||||||
# Le temps de rafraîchissement de munin est de 5 minutes
|
# Le temps de rafraîchissement de munin est de 5 minutes
|
||||||
echo "max.value 300"
|
echo "max.value 300"
|
||||||
|
|
|
@ -8,7 +8,7 @@ fi
|
||||||
if [ "$1" = "config" ]; then
|
if [ "$1" = "config" ]; then
|
||||||
echo "graph_title NTP servers offset"
|
echo "graph_title NTP servers offset"
|
||||||
echo 'graph_args --base 1000 -l 0 '
|
echo 'graph_args --base 1000 -l 0 '
|
||||||
echo 'graph_vlabel offset in µsec'
|
echo 'graph_vlabel offset in µsec'
|
||||||
ntpq -p | grep -i '^[*+-]' | awk '{gsub("^.","",$1) ; gsub("[.-]", "_", $1); print $1 ".label " $1}'
|
ntpq -p | grep -i '^[*+-]' | awk '{gsub("^.","",$1) ; gsub("[.-]", "_", $1); print $1 ".label " $1}'
|
||||||
exit 0
|
exit 0
|
||||||
fi;
|
fi;
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
###############
|
###############
|
||||||
# CRANS
|
# CRANS
|
||||||
###############
|
###############
|
||||||
# La version de ce plugin dans debian Etch (<= 4.0r1) est bugguée.
|
# La version de ce plugin dans debian Etch (<= 4.0r1) est bugguée.
|
||||||
# En attendant on utilise donc cette version
|
# En attendant on utilise donc cette version
|
||||||
# À la mise à jour de munin, il est souhaitable de tester le fichier
|
# À la mise à jour de munin, il est souhaitable de tester le fichier
|
||||||
# original (/usr/share/munin/plugins/postfix_mailstats).
|
# original (/usr/share/munin/plugins/postfix_mailstats).
|
||||||
############### 20/09/2007 - Nicolas Salles
|
############### 20/09/2007 - Nicolas Salles
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@
|
||||||
# Un petit warning pour laisser une trace
|
# Un petit warning pour laisser une trace
|
||||||
#
|
#
|
||||||
# Revision 1.1 2007-09-20 06:45:03 salles
|
# Revision 1.1 2007-09-20 06:45:03 salles
|
||||||
# Ce plugin est buggué dans etch.
|
# Ce plugin est buggué dans etch.
|
||||||
# En attendant une mise à jour, on utilise cette version modifiée.
|
# En attendant une mise à jour, on utilise cette version modifiée.
|
||||||
#
|
#
|
||||||
# Revision 1.6.2.3 2005/01/25 20:39:16 jimmyo
|
# Revision 1.6.2.3 2005/01/25 20:39:16 jimmyo
|
||||||
# Make generic/postfix_mailstats catch more formats (Deb#292110).
|
# Make generic/postfix_mailstats catch more formats (Deb#292110).
|
||||||
|
|
|
@ -2,25 +2,25 @@
|
||||||
#
|
#
|
||||||
# $Log: snmp__if__,v $
|
# $Log: snmp__if__,v $
|
||||||
# Revision 1.1 2006/04/20 13:01:21 salles
|
# Revision 1.1 2006/04/20 13:01:21 salles
|
||||||
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/11/14 10:36:39 salles
|
# Revision 1.1 2004/11/14 10:36:39 salles
|
||||||
# Ajout des plugins personnalisés
|
# Ajout des plugins personnalisés
|
||||||
#
|
#
|
||||||
# Revision 1.2 2004/07/27 14:32:46 salles
|
# Revision 1.2 2004/07/27 14:32:46 salles
|
||||||
# nom en premier pour qu'on les ait dans l'ordre alphabétique. mo²
|
# nom en premier pour qu'on les ait dans l'ordre alphabétique. mo²
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/07/27 12:17:28 bernat
|
# Revision 1.1 2004/07/27 12:17:28 bernat
|
||||||
# Et tournez manège !
|
# Et tournez manège !
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/07/27 11:37:16 bernat
|
# Revision 1.1 2004/07/27 11:37:16 bernat
|
||||||
# Deplacement (encore !)
|
# Deplacement (encore !)
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/07/27 11:27:43 bernat
|
# Revision 1.1 2004/07/27 11:27:43 bernat
|
||||||
# Deplacement (pour pas qu'il soit executé)
|
# Deplacement (pour pas qu'il soit executé)
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/07/27 11:19:26 bernat
|
# Revision 1.1 2004/07/27 11:19:26 bernat
|
||||||
# SNMP un peu modifié pour avoir le nom des bats en "clair"
|
# SNMP un peu modifié pour avoir le nom des bats en "clair"
|
||||||
#
|
#
|
||||||
# Revision 1.4 2004/04/30 16:58:14 jimmyo
|
# Revision 1.4 2004/04/30 16:58:14 jimmyo
|
||||||
# Added max.
|
# Added max.
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#
|
#
|
||||||
# $Log: snmp__if_err_,v $
|
# $Log: snmp__if_err_,v $
|
||||||
# Revision 1.1 2006/04/20 13:01:21 salles
|
# Revision 1.1 2006/04/20 13:01:21 salles
|
||||||
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
||||||
#
|
#
|
||||||
# Revision 1.16 2004/12/10 18:51:43 jimmyo
|
# Revision 1.16 2004/12/10 18:51:43 jimmyo
|
||||||
# linux/apt* has been forced to LANG=C, to get predictable output.
|
# linux/apt* has been forced to LANG=C, to get predictable output.
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
#
|
#
|
||||||
# $Log: snmp__load,v $
|
# $Log: snmp__load,v $
|
||||||
# Revision 1.1 2006/04/20 13:01:21 salles
|
# Revision 1.1 2006/04/20 13:01:21 salles
|
||||||
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/11/14 10:36:39 salles
|
# Revision 1.1 2004/11/14 10:36:39 salles
|
||||||
# Ajout des plugins personnalisés
|
# Ajout des plugins personnalisés
|
||||||
#
|
#
|
||||||
# Revision 1.2 2004/08/03 14:46:38 bernat
|
# Revision 1.2 2004/08/03 14:46:38 bernat
|
||||||
# Rattache les graphes a l'hote qu'on interroge
|
# Rattache les graphes a l'hote qu'on interroge
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/08/03 14:45:26 bernat
|
# Revision 1.1 2004/08/03 14:45:26 bernat
|
||||||
# Import initial
|
# Import initial
|
||||||
# Commit oublié de momo
|
# Commit oublié de momo
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/05/01 10:50:53 jimmyo
|
# Revision 1.1 2004/05/01 10:50:53 jimmyo
|
||||||
# New SNMP plugins users and load.
|
# New SNMP plugins users and load.
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
#
|
#
|
||||||
# $Log: snmp__processes,v $
|
# $Log: snmp__processes,v $
|
||||||
# Revision 1.1 2006/04/20 13:01:21 salles
|
# Revision 1.1 2006/04/20 13:01:21 salles
|
||||||
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
# On regroupe les plugins munin dans un répertoire commun à toutes les machines
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/11/14 10:36:39 salles
|
# Revision 1.1 2004/11/14 10:36:39 salles
|
||||||
# Ajout des plugins personnalisés
|
# Ajout des plugins personnalisés
|
||||||
#
|
#
|
||||||
# Revision 1.2 2004/08/03 14:46:38 bernat
|
# Revision 1.2 2004/08/03 14:46:38 bernat
|
||||||
# Rattache les graphes a l'hote qu'on interroge
|
# Rattache les graphes a l'hote qu'on interroge
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/08/03 14:45:26 bernat
|
# Revision 1.1 2004/08/03 14:45:26 bernat
|
||||||
# Import initial
|
# Import initial
|
||||||
# Commit oublié de momo
|
# Commit oublié de momo
|
||||||
#
|
#
|
||||||
# Revision 1.1 2004/04/30 20:13:53 jimmyo
|
# Revision 1.1 2004/04/30 20:13:53 jimmyo
|
||||||
# New SNMP plugin for number of procs.
|
# New SNMP plugin for number of procs.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Gestion des prises dans les batiments
|
# Gestion des prises dans les batiments
|
||||||
# Pour le moment on ne compte pas les prises CRANS
|
# Pour le moment on ne compte pas les prises CRANS
|
||||||
|
@ -11,7 +11,7 @@ from annuaires import reverse, chbre_prises, bat_switchs, all_switchs, uplink_pr
|
||||||
from hptools import hpswitch
|
from hptools import hpswitch
|
||||||
from ldap_crans import crans_ldap
|
from ldap_crans import crans_ldap
|
||||||
|
|
||||||
# Le fichier de nombre d'adhérent par batiments
|
# Le fichier de nombre d'adhérent par batiments
|
||||||
stats_batiments = "/var/lib/munin/tmp/batiments"
|
stats_batiments = "/var/lib/munin/tmp/batiments"
|
||||||
|
|
||||||
BAT = sys.argv[0].split('_')[1]
|
BAT = sys.argv[0].split('_')[1]
|
||||||
|
@ -20,7 +20,7 @@ BAT = sys.argv[0].split('_')[1]
|
||||||
BAT_CHBRES = {'g' : 312}
|
BAT_CHBRES = {'g' : 312}
|
||||||
|
|
||||||
def switch_prise(bat, prise) :
|
def switch_prise(bat, prise) :
|
||||||
''' Renvoie le switch et la prise associé au numéro de la prise '''
|
''' Renvoie le switch et la prise associé au numéro de la prise '''
|
||||||
switch = "bat%s-%i" % (bat, prise/100)
|
switch = "bat%s-%i" % (bat, prise/100)
|
||||||
prise = prise % 100
|
prise = prise % 100
|
||||||
return (switch, prise)
|
return (switch, prise)
|
||||||
|
@ -40,16 +40,16 @@ if arg == "config" :
|
||||||
print 'graph_args --base 1000 --lower-limit 0'
|
print 'graph_args --base 1000 --lower-limit 0'
|
||||||
# print 'graph_order activ enabled fixes reste prises chbres'
|
# print 'graph_order activ enabled fixes reste prises chbres'
|
||||||
print "graph_vlabel nb de chambres"
|
print "graph_vlabel nb de chambres"
|
||||||
print 'enabled.label Prises activées'
|
print 'enabled.label Prises activées'
|
||||||
print 'enabled.draw AREA'
|
print 'enabled.draw AREA'
|
||||||
print 'fixes.label Prises fixes'
|
print 'fixes.label Prises fixes'
|
||||||
print 'fixes.draw STACK'
|
print 'fixes.draw STACK'
|
||||||
print 'reste.label Prises inutilisées'
|
print 'reste.label Prises inutilisées'
|
||||||
print 'reste.draw STACK'
|
print 'reste.draw STACK'
|
||||||
print 'crans.label Prises crans'
|
print 'crans.label Prises crans'
|
||||||
print 'crans.draw STACK'
|
print 'crans.draw STACK'
|
||||||
print 'activ.label Prises actives'
|
print 'activ.label Prises actives'
|
||||||
print 'adherent.label Nb adhérents'
|
print 'adherent.label Nb adhérents'
|
||||||
print 'prises.label Nb de prises'
|
print 'prises.label Nb de prises'
|
||||||
print 'chbres.label Nb de chambres'
|
print 'chbres.label Nb de chambres'
|
||||||
if BAT in BAT_CHBRES :
|
if BAT in BAT_CHBRES :
|
||||||
|
@ -64,7 +64,7 @@ else :
|
||||||
PRISES_ENABLE += hpswitch(switch).is_enable('all')
|
PRISES_ENABLE += hpswitch(switch).is_enable('all')
|
||||||
except:
|
except:
|
||||||
PRISES_ENABLE += 0
|
PRISES_ENABLE += 0
|
||||||
# On élimine les prises "CRANS" stockés dans uplink_prises
|
# On élimine les prises "CRANS" stockés dans uplink_prises
|
||||||
for prise in uplink_prises[BAT].keys() :
|
for prise in uplink_prises[BAT].keys() :
|
||||||
switch, prise = switch_prise(BAT, prise)
|
switch, prise = switch_prise(BAT, prise)
|
||||||
try:
|
try:
|
||||||
|
@ -80,7 +80,7 @@ else :
|
||||||
PRISES_ACTIVES += hpswitch(switch).is_up('all')
|
PRISES_ACTIVES += hpswitch(switch).is_up('all')
|
||||||
except:
|
except:
|
||||||
PRISES_ACTIVES += 0
|
PRISES_ACTIVES += 0
|
||||||
# On élimine les prises "CRANS" stockés dans uplink_prises
|
# On élimine les prises "CRANS" stockés dans uplink_prises
|
||||||
for prise in uplink_prises[BAT].keys() :
|
for prise in uplink_prises[BAT].keys() :
|
||||||
switch, prise = switch_prise(BAT, prise)
|
switch, prise = switch_prise(BAT, prise)
|
||||||
try:
|
try:
|
||||||
|
@ -119,7 +119,7 @@ else :
|
||||||
print "reste.value %d" % int(NB_PRISES - PRISES_ENABLE - PRISES_FIXES - PRISES_CRANS)
|
print "reste.value %d" % int(NB_PRISES - PRISES_ENABLE - PRISES_FIXES - PRISES_CRANS)
|
||||||
|
|
||||||
fichier = open(stats_batiments, 'r')
|
fichier = open(stats_batiments, 'r')
|
||||||
#NB_ADHERENT = 0 # Plus génant qu'autre chose
|
#NB_ADHERENT = 0 # Plus génant qu'autre chose
|
||||||
for line in fichier.readlines():
|
for line in fichier.readlines():
|
||||||
if line[3:4] == BAT and line[:3] == "bat" :
|
if line[3:4] == BAT and line[:3] == "bat" :
|
||||||
NB_ADHERENT = line[11:].strip()
|
NB_ADHERENT = line[11:].strip()
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Plugin pour visualiser l'utilisation des plages ip
|
# Plugin pour visualiser l'utilisation des plages ip
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Plugin pour visualiser l'utilisation des plages ip
|
# Plugin pour visualiser l'utilisation des plages ip
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ from ldap_crans import crans_ldap
|
||||||
from config import NETs
|
from config import NETs
|
||||||
from iptools import AddrInNet
|
from iptools import AddrInNet
|
||||||
|
|
||||||
# On prend l'argument pour définir la plage d'ip à analyser
|
# On prend l'argument pour définir la plage d'ip à analyser
|
||||||
SUBNET = sys.argv[0].split('_')[1]
|
SUBNET = sys.argv[0].split('_')[1]
|
||||||
|
|
||||||
try :
|
try :
|
||||||
|
@ -21,7 +21,7 @@ except :
|
||||||
arg = ''
|
arg = ''
|
||||||
|
|
||||||
if arg == "config" :
|
if arg == "config" :
|
||||||
if len(SUBNET) == 1 : NOM = "Bâtiment %s" % string.upper(SUBNET)
|
if len(SUBNET) == 1 : NOM = "Bâtiment %s" % string.upper(SUBNET)
|
||||||
else: NOM = SUBNET
|
else: NOM = SUBNET
|
||||||
|
|
||||||
print 'host_name adresses-ip'
|
print 'host_name adresses-ip'
|
||||||
|
@ -29,7 +29,7 @@ if arg == "config" :
|
||||||
print 'graph_args --base 1000 --lower-limit 0'
|
print 'graph_args --base 1000 --lower-limit 0'
|
||||||
print 'graph_category network'
|
print 'graph_category network'
|
||||||
print "graph_vlabel nb d'ips"
|
print "graph_vlabel nb d'ips"
|
||||||
print "utilisees.label IP utilisées"
|
print "utilisees.label IP utilisées"
|
||||||
print "utilisees.draw AREA"
|
print "utilisees.draw AREA"
|
||||||
print "total.label Total disponibles"
|
print "total.label Total disponibles"
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Représentation des navigateurs utilisés
|
# Représentation des navigateurs utilisés
|
||||||
|
|
||||||
import sys, commands, string, re
|
import sys, commands, string, re
|
||||||
from time import strftime
|
from time import strftime
|
||||||
from operator import add
|
from operator import add
|
||||||
|
|
||||||
# On prend l'argument pour définir la table à analyser
|
# On prend l'argument pour définir la table à analyser
|
||||||
SITE = sys.argv[0].split('_')[1]
|
SITE = sys.argv[0].split('_')[1]
|
||||||
|
|
||||||
# nom de la machine
|
# nom de la machine
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: iso-8859-15 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Thèmes wiki utilisés
|
# Thèmes wiki utilisés
|
||||||
|
|
||||||
import sys, commands
|
import sys, commands
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ except :
|
||||||
if arg == "config" :
|
if arg == "config" :
|
||||||
print 'host_name web.rouge'
|
print 'host_name web.rouge'
|
||||||
print 'graph_category wiki'
|
print 'graph_category wiki'
|
||||||
print 'graph_title Thèmes wiki utilisés'
|
print 'graph_title Thèmes wiki utilisés'
|
||||||
print 'graph_scale no'
|
print 'graph_scale no'
|
||||||
print "graph_vlabel nb d'utilisateurs"
|
print "graph_vlabel nb d'utilisateurs"
|
||||||
for theme in THEMES :
|
for theme in THEMES :
|
||||||
|
|
|
@ -7,7 +7,7 @@ if [ "$1" = "config" ]; then
|
||||||
echo 'graph_title Utilisateurs wiki'
|
echo 'graph_title Utilisateurs wiki'
|
||||||
echo 'graph_args --base 1000 --lower-limit 0'
|
echo 'graph_args --base 1000 --lower-limit 0'
|
||||||
echo "graph_vlabel nombre d'utilisateurs"
|
echo "graph_vlabel nombre d'utilisateurs"
|
||||||
echo 'enregistres.label Nb enregistrés'
|
echo 'enregistres.label Nb enregistrés'
|
||||||
echo 'enregistres.draw AREA'
|
echo 'enregistres.draw AREA'
|
||||||
echo 'favoris.label Nb avec favoris'
|
echo 'favoris.label Nb avec favoris'
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue