2:7f4ad9be3e85
Anton Shestakov <engored@ya.ru>, Thu, 21 Jan 2016 01:50:21 +0800
roles: common, interactive, memcached, nginx, email

next change 17:6d75ac2150cc

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