Le labo

Bidouilles et prises de notes en vrac

Accueil > Docs > Munin Apache vhosts

Munin Apache vhosts

mardi 29 octobre 2013, par b_b

Plugin apache_vhosts

https://github.com/munin-monitoring/contrib/tree/master/plugins/apache/apache_vhosts

http://translate.google.fr/translate?hl=fr&sl=auto&tl=fr&u=http%3A%2F%2Fkalamazoo.pl%2Fmonitoring-hostow-apacha-przy-uzyciu-munina%2F

apt-get install libfile-tail-perl libipc-sharelite-perl

Lancer le parser de logs en arrière plan : perl /usr/share/munin/plugins/apache_logparser &

Tester le plugin avec : munin-run apache_vhosts

Le plugin fonctionne bien mais le script apache_logparser consomme bien trop de RAM (796M dans mon cas).

Plugin apache_byprojects

https://github.com/munin-monitoring/contrib/tree/master/plugins/apache/apache_byprojects

installer le paquet logtail

config du fichier apache_byprojects_access

my $statepath = '/tmp/plugin-state'; # where logtail will save the state
my $logtail = '/usr/sbin/logtail';

my %logs = (
        'alsace' => [{'path' => '/var/log/apache2/access-alsace.log'}],
        'aquitaine' => [{'path' => '/var/log/apache2/access-aquitaine.log'}],
        'bourgogne' => [{'path' => '/var/log/apache2/access-bourgogne.log'}],
        'bretagne' => [{'path' => '/var/log/apache2/access-bretagne.log'}],
        'centre' => [{'path' => '/var/log/apache2/access-centre.log'}],
        'champagne' => [{'path' => '/var/log/apache2/access-champagne.log'}],
        'corse' => [{'path' => '/var/log/apache2/access-corse.log'}],
        'explorateurs' => [{'path' => '/var/log/apache2/access-explorateurs.log'}],
        'fcomte' => [{'path' => '/var/log/apache2/access-fcomte.log'}],
        'grandest' => [{'path' => '/var/log/apache2/access-grandest.log'}],
        'idf' => [{'path' => '/var/log/apache2/access-idf.log'}],
        'labonneexperience' => [{'path' => '/var/log/apache2/access-labonneexperience.log'}],
        'languedoc' => [{'path' => '/var/log/apache2/access-languedoc.log'}],
        'loire' => [{'path' => '/var/log/apache2/access-loire.log'}],
        'lorraine' => [{'path' => '/var/log/apache2/access-lorraine.log'}],
        'midipy' => [{'path' => '/var/log/apache2/access-midipy.log'}],
        'nord' => [{'path' => '/var/log/apache2/access-nord.log'}],
        'normandie' => [{'path' => '/var/log/apache2/access-normandie.log'}],
        'paca' => [{'path' => '/var/log/apache2/access-paca.log'}],
        'st2sexplorateurs' => [{'path' => '/var/log/apache2/access-st2s.explorateurs.log'}],
);

Et hop ça fonctionne et ça ne consomme pas plein de RAM :)