mirror of
https://github.com/munin-monitoring/contrib.git
synced 2025-07-22 14:16:00 +00:00
Whitespace cleanup
* remove trailing whitespace * remove empty lines at the end of files
This commit is contained in:
parent
ef851f0c34
commit
17f784270a
604 changed files with 2927 additions and 2945 deletions
|
@ -2,21 +2,21 @@
|
|||
Those plugins are used to monitor different projects or vhost (i.e. either different log files or using regular expression as filters) on the same web server.
|
||||
|
||||
## munin_byprojects_access
|
||||
Count the number of hits per projects/vhost.
|
||||
Count the number of hits per projects/vhost.
|
||||

|
||||
|
||||
## munin_byprojects_bandwidth
|
||||
Count the total bandwidth used by each projects/vhost. [Logtail](https://www.fourmilab.ch/webtools/logtail/) is required.
|
||||
Count the total bandwidth used by each projects/vhost. [Logtail](https://www.fourmilab.ch/webtools/logtail/) is required.
|
||||

|
||||
|
||||
## munin_byprojects_inout_bandwidth
|
||||
Counts the in/out bandwidth used by each projects/vhost. [Logtail](https://www.fourmilab.ch/webtools/logtail/) is required.
|
||||
Counts the in/out bandwidth used by each projects/vhost. [Logtail](https://www.fourmilab.ch/webtools/logtail/) is required.
|
||||

|
||||
|
||||
## Installation
|
||||
The setup is pretty straight forward. First you need to configure the plugin:
|
||||
|
||||
In your munin plugin configuration file (for example, a new dedicated /etc/munin/plugin-conf.d/nginx_byprojects), configure the plugins :
|
||||
In your munin plugin configuration file (for example, a new dedicated /etc/munin/plugin-conf.d/nginx_byprojects), configure the plugins:
|
||||
|
||||
[byprojects_*]
|
||||
env.logtail /usr/local/bin/logtail
|
||||
|
@ -35,6 +35,6 @@ Then link the file just as any other plugins.
|
|||
ln -s /usr/local/sbin/<plugin> /usr/local/etc/munin/plugins/<plugin>
|
||||
|
||||
And restart the munin-node service.
|
||||
|
||||
|
||||
## License
|
||||
MIT
|
||||
|
|
|
@ -4,16 +4,16 @@ use JSON qw(decode_json);
|
|||
#
|
||||
# byprojects_access
|
||||
#
|
||||
# Perl script to monitor access *byprojects* (e.g. vhost) from multiple files
|
||||
# Perl script to monitor access *byprojects* (e.g. vhost) from multiple files
|
||||
# and/or regex.
|
||||
#
|
||||
# Danny Fullerton <northox@mantor.org>
|
||||
# Danny Fullerton <northox@mantor.org>
|
||||
# Mantor Organization <www.mantor.org>
|
||||
# This work is licensed under a MIT license.
|
||||
#
|
||||
# You need logtail (https://www.fourmilab.ch/webtools/logtail/)
|
||||
#
|
||||
# Log can be gathered from multiple sources by simply specifying multiple log
|
||||
# Log can be gathered from multiple sources by simply specifying multiple log
|
||||
# filename or using wildcards (glob). File content can be selected using regex.
|
||||
#
|
||||
# - 'prod' => [ {'path' => '/home/prod/log/access.log'} ],
|
||||
|
@ -73,7 +73,7 @@ foreach my $project ( keys %logs ) {
|
|||
my @paths = glob $log->{'path'};
|
||||
foreach my $path (@paths) {
|
||||
my $state = $statepath.'/'.$project.$x.'_access.state';
|
||||
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
||||
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
||||
die "Can't open $logtail: $!";
|
||||
while (<LT>) {
|
||||
my $buf = $_;
|
||||
|
|
|
@ -7,19 +7,19 @@ use JSON qw(decode_json);
|
|||
# Perl script to monitor total bandwidth *byprojects* (e.g. vhost) from multiple
|
||||
# files and/or regex.
|
||||
#
|
||||
# Danny Fullerton <northox@mantor.org>
|
||||
# Danny Fullerton <northox@mantor.org>
|
||||
# Mantor Organization <www.mantor.org>
|
||||
# This work is licensed under a MIT license.
|
||||
#
|
||||
# You need logtail (https://www.fourmilab.ch/webtools/logtail/)
|
||||
#
|
||||
# Your nginx configuration should look like this (i.e. $request_length
|
||||
# Your nginx configuration should look like this (i.e. $request_length
|
||||
# body_bytes_sent at the end):
|
||||
# log_format main '$remote_addr - $remote_user $time_local "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
# '"$http_user_agent" $request_length $body_bytes_sent';
|
||||
#
|
||||
# Log can be gathered from multiple sources by simply specifying multiple log
|
||||
# Log can be gathered from multiple sources by simply specifying multiple log
|
||||
# filename or using wildcards (glob). File content can be selected using regex.
|
||||
#
|
||||
# - 'prod' => [ {'path' => '/home/prod/log/access.log'} ],
|
||||
|
@ -80,7 +80,7 @@ foreach my $project ( keys %logs ) {
|
|||
my @paths = glob $log->{'path'};
|
||||
foreach my $path (@paths) {
|
||||
my $state = $statepath.'/'.$project.$x.'_totalbandwidth.state';
|
||||
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
||||
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
||||
die "Can't open $logtail : $!";
|
||||
while (<LT>) {
|
||||
my $buf = $_;
|
||||
|
|
|
@ -4,22 +4,22 @@ use JSON qw(decode_json);
|
|||
#
|
||||
# byprojects_inout_bandwidth
|
||||
#
|
||||
# Perl script to monitor in/out bandwidth *byprojects* (e.g. vhost) from
|
||||
# Perl script to monitor in/out bandwidth *byprojects* (e.g. vhost) from
|
||||
# multiple files and/or regex.
|
||||
#
|
||||
# Danny Fullerton <northox@mantor.org>
|
||||
# Danny Fullerton <northox@mantor.org>
|
||||
# Mantor Organization <www.mantor.org>
|
||||
# This work is licensed under a MIT license.
|
||||
#
|
||||
# You need logtail (https://www.fourmilab.ch/webtools/logtail/)
|
||||
#
|
||||
# Your nginx configuration should look like this (i.e. $request_length
|
||||
# Your nginx configuration should look like this (i.e. $request_length
|
||||
# body_bytes_sent at the end):
|
||||
# log_format main '$remote_addr - $remote_user $time_local "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
# '"$http_user_agent" $request_length $body_bytes_sent';
|
||||
#
|
||||
# Log can be gathered from multiple sources by simply specifying multiple log
|
||||
# Log can be gathered from multiple sources by simply specifying multiple log
|
||||
# filename or using wildcards (glob). File content can be selected using regex.
|
||||
#
|
||||
# - 'prod' => [ {'path' => '/home/prod/log/access.log'} ],
|
||||
|
@ -83,7 +83,7 @@ foreach my $project ( keys %logs ) {
|
|||
my @paths = glob $log->{'path'};
|
||||
foreach my $path (@paths) {
|
||||
my $state = $statepath.'/'.$project.$x.'_inoutbandwidth.state';
|
||||
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
||||
open(LT, "$logtail -f ".$log->{'path'}." -o $state |") or
|
||||
die "Can't open $logtail : $!";
|
||||
while (<LT>) {
|
||||
my $buf = $_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue