1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-22 14:16:00 +00:00

Add configuration option for logtail path

This commit is contained in:
Neraud 2017-07-08 09:16:07 +02:00
parent 92a8c9df17
commit 3a17b22edf
4 changed files with 18 additions and 5 deletions

View file

@ -16,9 +16,10 @@ Counts the in/out bandwidth used by each projects/vhost. [Logtail] (https://www.
## Installation ## Installation
The setup is pretty straight forward. First you need to configure the plugin: The setup is pretty straight forward. First you need to configure the plugin:
Define the path to logtail: In your munin plugin configuration file (for example, a new dedicated /etc/munin/plugin-conf.d/nginx_byprojects), configure the plugins :
$logtail = '/usr/local/bin/logtail'; [byprojects_*]
env.logtail /usr/local/bin/logtail
Multiple logs can be used for the same project/vhost and a regular expression (regex) can be used as a filter: Multiple logs can be used for the same project/vhost and a regular expression (regex) can be used as a filter:

View file

@ -23,11 +23,15 @@ use strict;
# Test graph will be using everything file matching /home/test/log/access*.log # Test graph will be using everything file matching /home/test/log/access*.log
# and stuff that match the expression '"[A-Z] /test/' in /var/log/access.log # and stuff that match the expression '"[A-Z] /test/' in /var/log/access.log
# such as '"GET /test/' # such as '"GET /test/'
#
# Configuration
# [byprojects_*]
# env.logtail_path /usr/local/bin/logtail
my $server = 'Nginx'; my $server = 'Nginx';
my $statepath = $ENV{MUNIN_PLUGSTATE}; my $statepath = $ENV{MUNIN_PLUGSTATE};
my $logtail = '/usr/local/bin/logtail'; my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
my %logs = ( my %logs = (
'prod' => [ 'prod' => [

View file

@ -29,11 +29,15 @@ use strict;
# Test graph will be using everything file matching /home/test/log/access*.log # Test graph will be using everything file matching /home/test/log/access*.log
# and stuff that match the expression '"[A-Z] /test/' in /var/log/access.log # and stuff that match the expression '"[A-Z] /test/' in /var/log/access.log
# such as '"GET /test/' # such as '"GET /test/'
#
# Configuration
# [byprojects_*]
# env.logtail_path /usr/local/bin/logtail
my $server = 'Nginx'; my $server = 'Nginx';
my $statepath = $ENV{MUNIN_PLUGSTATE}; my $statepath = $ENV{MUNIN_PLUGSTATE};
my $logtail = '/usr/local/bin/logtail'; my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
my %logs = ( my %logs = (
'prod' => [ 'prod' => [

View file

@ -29,11 +29,15 @@ use strict;
# Test graph will be using everything file matching /home/test/log/access*.log # Test graph will be using everything file matching /home/test/log/access*.log
# and stuff that match the expression '"[A-Z] /test/' in /var/log/access.log # and stuff that match the expression '"[A-Z] /test/' in /var/log/access.log
# such as '"GET /test/' # such as '"GET /test/'
#
# Configuration
# [byprojects_*]
# env.logtail_path /usr/local/bin/logtail
my $server = 'Nginx'; my $server = 'Nginx';
my $statepath = $ENV{MUNIN_PLUGSTATE}; my $statepath = $ENV{MUNIN_PLUGSTATE};
my $logtail = '/usr/local/bin/logtail'; my $logtail = $ENV{logtail_path} || '/usr/local/bin/logtail';
my %logs = ( my %logs = (
'prod' => [ 'prod' => [