Ajout du nom de machine pour diffrencier les serveurs web

darcs-hash:20061116174111-f46e9-d392fa591611ed485dce18753f8ba347d0aed331.gz
This commit is contained in:
gdetrez 2006-11-16 18:41:11 +01:00
parent 2b626a5ae6
commit fcc48b3f28

View file

@ -10,6 +10,10 @@ from operator import add
# On prend l'argument pour définir la table à analyser
SITE = sys.argv[0].split('_')[1]
# nom de la machine
import socket
HOSTNAME = socket.gethostname()
# On traite le fichier de webalizer correspondant
FILE = "/var/www/webalizer/%s/webalizer.current" % SITE
@ -44,7 +48,7 @@ except :
arg = ''
if arg == "config" :
print 'host_name web'
print 'host_name web.%s' % HOSTNAME
print 'graph_category %s' % SITE
print 'graph_title http://%s.crans.org' % SITE
print 'graph_args --base 1000 -r --lower-limit 0 --upper-limit 100'