Révision 24ea5d29
nginx_error: improve documentation
| plugins/nginx/nginx_error | ||
|---|---|---|
| 7 | 7 |
|
| 8 | 8 |
nginx error - Munin plugin to monitor nginx error rates (http status codes per minute). |
| 9 | 9 |
|
| 10 |
|
|
| 10 | 11 |
=head1 APPLICABLE SYSTEMS |
| 11 | 12 |
|
| 12 |
Any Linux host, running nginx, with bash version > 4.0 |
|
| 13 |
Any host running nginx, with bash version > 4.0 |
|
| 14 |
|
|
| 13 | 15 |
|
| 14 | 16 |
=head1 CONFIGURATION |
| 15 | 17 |
|
| 16 | 18 |
This shows the default configuration of this plugin. You can override |
| 17 | 19 |
the log file path and the logpattern. |
| 20 |
Additionally you may want to adjust 'group' (or 'user') based on the |
|
| 21 |
permissions required for reading the log file. |
|
| 18 | 22 |
|
| 19 | 23 |
[nginx_error] |
| 24 |
group adm |
|
| 20 | 25 |
env.logpath /var/log/nginx |
| 21 | 26 |
env.logpattern a.*.log |
| 22 | 27 |
|
| 23 | 28 |
Nginx must also be configured to log accesses in "combined" log format (default) |
| 24 | 29 |
|
| 30 |
|
|
| 25 | 31 |
=head1 USAGE |
| 26 | 32 |
|
| 27 | 33 |
Link this plugin to /etc/munin/plugins/ and restart the munin-node. |
| ... | ... | |
| 33 | 39 |
|
| 34 | 40 |
You can change 'env.logpattern' using asterisk ('*') to match your logs filenames.
|
| 35 | 41 |
|
| 42 |
'env.logpattern' is ignored for a non-symlink configuration. |
|
| 43 |
|
|
| 44 |
|
|
| 36 | 45 |
=head1 INTERPRETATION |
| 37 | 46 |
|
| 38 | 47 |
The plugin shows nginx http "error" status rates by parsing access log. |
| 39 | 48 |
|
| 49 |
|
|
| 40 | 50 |
=head1 MAGIC MARKERS |
| 41 | 51 |
|
| 42 | 52 |
#%# family=auto |
| 43 | 53 |
#%# capabilities=autoconf |
| 44 | 54 |
|
| 55 |
|
|
| 45 | 56 |
=head1 BUGS |
| 46 | 57 |
|
| 47 | 58 |
None known. |
| 48 | 59 |
|
| 60 |
|
|
| 49 | 61 |
=head1 VERSION |
| 50 | 62 |
|
| 51 | 63 |
1.1 - 2018/01/20 |
| ... | ... | |
| 60 | 72 |
|
| 61 | 73 |
vovansystems@gmail.com, 2013 |
| 62 | 74 |
|
| 75 |
|
|
| 63 | 76 |
=head1 LICENSE |
| 64 | 77 |
|
| 65 | 78 |
GPLv3 |
| ... | ... | |
| 122 | 135 |
echo "graph_vlabel pages with http error codes / \${graph_period}"
|
| 123 | 136 |
echo "graph_category webserver" |
| 124 | 137 |
echo "graph_period minute" |
| 125 |
echo "graph_info This graph shows nginx error amount per minute"
|
|
| 138 |
echo "graph_info This graph shows nginx error rate per minute"
|
|
| 126 | 139 |
for status_code in "${!http_codes[@]}"; do
|
| 127 | 140 |
echo "error${status_code}.type DERIVE"
|
| 128 | 141 |
echo "error${status_code}.min 0"
|
Formats disponibles : Unified diff