Projet

Général

Profil

Révision 2a776fa5

ID2a776fa560b2f1cac76578af47bc825869c22f72
Parent 22292022
Enfant 03aa3e1f

Ajouté par Raphaël Droz il y a environ 10 ans

Update apache_average_time_last_n_requests

Voir les différences:

plugins/apache/apache_average_time_last_n_requests
18 18
#
19 19
# Configurable variables
20 20
# 	fieldno      - Override the default field number
21
#   linecount    - How many last request to consider
21 22
#%# family=auto
22 23

  
23 24
use strict;
24 25

  
25
my $LAST_N_REQUESTS = 100000; # calculate based on this amount of requests
26
my $ACCESS_LOG_PATTERN = '/var/log/apache2/access.log.*'; # log pattern, if many it will take the last one.
26
my $LAST_N_REQUESTS = exists $ENV{'linecount'} ? $ENV{'linecount'} : 100000; # calculate based on this amount of requests
27 27
my $TIME_FIELD_INDEX =  exists $ENV{'fieldno'} ? $ENV{'fieldno'} : -2; # second last field
28
my $ACCESS_LOG_PATTERN = '/var/log/apache2/access.log.*'; # log pattern, if many it will take the last one.
28 29

  
29 30
my $config =<< "CONFIG"
30 31
graph_title Apache average seconds last $LAST_N_REQUESTS requests

Formats disponibles : Unified diff