root / plugins / apache / apache_byprojects / README.md @ 17f78427
Historique | Voir | Annoter | Télécharger (2,08 ko)
| 1 | 614c22df | Danny Fullerton | # The 'byprojects' family |
|---|---|---|---|
| 2 | 5271859f | Danny Fullerton | 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. |
| 3 | 614c22df | Danny Fullerton | |
| 4 | ## munin_byprojects_access |
||
| 5 | 17f78427 | Lars Kruse | Count the number of hits per projects/vhost. |
| 6 | 614c22df | Danny Fullerton |  |
| 7 | |||
| 8 | ## munin_byprojects_bandwidth |
||
| 9 | 17f78427 | Lars Kruse | Count the total bandwidth used by each projects/vhost. [Logtail] (https://www.fourmilab.ch/webtools/logtail/) is required. |
| 10 | 614c22df | Danny Fullerton |  |
| 11 | |||
| 12 | ## munin_byprojects_inout_bandwidth |
||
| 13 | 17f78427 | Lars Kruse | Counts the in/out bandwidth used by each projects/vhost. [Logtail] (https://www.fourmilab.ch/webtools/logtail/) is required. |
| 14 | 614c22df | Danny Fullerton |  |
| 15 | |||
| 16 | ## Installation |
||
| 17 | 5271859f | Danny Fullerton | The setup is pretty straight forward. First you need to configure the plugin: |
| 18 | 614c22df | Danny Fullerton | |
| 19 | 4b2fcbf8 | Lars Kruse | Define the path to logtail: |
| 20 | 614c22df | Danny Fullerton | |
| 21 | $logtail = '/usr/local/bin/logtail'; |
||
| 22 | |||
| 23 | Multiple logs can be used for the same project/vhost and a regular expression (regex) can be used as a filter: |
||
| 24 | |||
| 25 | 5271859f | Danny Fullerton | my %logs = ( |
| 26 | 'prod' => [ |
||
| 27 | {'path' => '/home/prod/log/access.log'}
|
||
| 28 | ], |
||
| 29 | 'dev' => [ |
||
| 30 | {'path' => '/var/log/httpd/ssl-dev-access.log'},
|
||
| 31 | {'path' => '/home/dev/log/access.log'}
|
||
| 32 | ], |
||
| 33 | 'test' => [ |
||
| 34 | {'path' => '/var/log/access.log', 'regex' => '"[A-Z]+ /test/'},
|
||
| 35 | {'path' => '/home/test/log/access.log'}
|
||
| 36 | ], |
||
| 37 | 614c22df | Danny Fullerton | ); |
| 38 | |||
| 39 | In the previous example the prod project graph will be using everything in /home/prod/log/access.log. The test project will be using eveything in /home/test/log/access.log and stuff that match '"[A-Z] /test/' in /var/log/httpd/access.log (e.g. "GET /test/). |
||
| 40 | |||
| 41 | Then link the file just as any other plugins. |
||
| 42 | 5271859f | Danny Fullerton | |
| 43 | ln -s /usr/local/sbin/<plugin> /usr/local/etc/munin/plugins/<plugin> |
