Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / nginx / nginx_byprojects @ 17f78427

Nom Taille Révision Âge Auteur Commentaire
LICENSE.txt 1,06 ko cf03f9b0 presque 12 ans Danny Fullerton Add file expansion (glob) and switch to MIT lic...
README.md 2,17 ko 17f78427 plus de 7 ans Lars Kruse Whitespace cleanup * remove trailing whitespac...
byprojects_access 2,87 ko 17f78427 plus de 7 ans Lars Kruse Whitespace cleanup * remove trailing whitespac...
byprojects_bandwidth 3,29 ko 17f78427 plus de 7 ans Lars Kruse Whitespace cleanup * remove trailing whitespac...
byprojects_inout_bandwidth 3,52 ko 17f78427 plus de 7 ans Lars Kruse Whitespace cleanup * remove trailing whitespac...

Dernières révisions

# Date Auteur Commentaire
17f78427 2018-08-01 20:33 Lars Kruse

Whitespace cleanup

  • remove trailing whitespace
  • remove empty lines at the end of files
15d05f30 2018-07-22 20:35 Lars Kruse

Revert "nginx_byprojects: use more compatible perl expression"

This reverts commit a836f07d56e35d230cdd9586bd35aae6343e9771.

Closes: #922

a836f07d 2018-03-08 17:17 Lars Kruse

nginx_byprojects: use more compatible perl expression

"%ENV{foo}" does not work with older perl versions (e.g. v5.14).

69896717 2017-07-13 06:59 Neraud

Fix comment format : use spaces instead of tabs

331e3da9 2017-07-08 05:14 Neraud

Add executable bit

9ce70486 2017-07-08 04:59 Neraud

Minor documentation update

Fix the markdown format for Logtail links.
Add the restart munin-node step.

a1f7808b 2017-07-08 04:57 Neraud

Add configuration option for the logs setup

3a17b22e 2017-07-08 04:54 Neraud

Add configuration option for logtail path

4b2fcbf8 2017-04-18 17:32 Lars Kruse

replace hard-coded paths (e.g. '/var/lib/munin/plugin-state') with '$MUNIN_PLUGSTATE'

see http://guide.munin-monitoring.org/en/latest/plugin/env.html

62560fae 2017-02-21 09:09 dipohl

Category Tree: Reduce number of categories

Voir les révisions

README


The 'byprojects' family

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.

muninbyprojectsaccess

Count the number of hits per projects/vhost. byproject_access

muninbyprojectsbandwidth

Count the total bandwidth used by each projects/vhost. Logtail is required. byproject_bandwidth

muninbyprojectsinout_bandwidth

Counts the in/out bandwidth used by each projects/vhost. Logtail is required. byproject_inout_bandwidth

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:

  [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. Each log is defined in a dedicated environment variable, named env.site.[siteName]. The value is JSON formatted.

  env.site.prod     [{"path":"/home/prod/log/access.log"}]
  env.site.dev      [{"path":"/var/log/httpd/ssl-dev-access.log"}, {"path":"/home/dev/log/access*.log"}]
  env.site.test     [{"path":"/var/log/access.log","regex":"\"[A-Z]+ /test/"}, {"path":"/home/test/log/access.log"}]

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/).

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

Formats disponibles : Atom