6:7cc6e8563947
Anton Shestakov <av6@dwimlabs.net>, Sat, 25 Jun 2016 12:27:42 +0800
use $host variable for the 301 redirect for flexibility

next change 17:6d75ac2150cc
previous change 2:7f4ad9be3e85

roles/nginx/files/etc/munin/plugins/nginx_requests_by_vhost

Permissions: -rw-r--r--

Other formats: Feeds:
#!/bin/bash
. $MUNIN_LIBDIR/plugins/plugin.sh
case $1 in
autoconf)
echo "no (quick hacky plugin)"
exit 0
;;
config)
echo "graph_title Nginx requests by vhost"
echo 'graph_args --base 1000'
echo 'graph_vlabel requests / ${graph_period}'
echo 'graph_category nginx'
for vhost in $vhosts; do
name="$(clean_fieldname "$vhost")"
echo "${name}.label ${vhost}"
echo "${name}.type DERIVE"
echo "${name}.draw LINE1"
echo "${name}.min 0"
done
exit 0
;;
esac
for vhost in $vhosts; do
name="$(clean_fieldname "$vhost")"
echo "${name}.value $(wc -l /var/log/nginx/${vhost}.access.log | cut -d' ' -f1)"
done