Anton Shestakov <engored@ya.ru>, Thu, 21 Jan 2016 01:50:21 +0800
roles: common, interactive, memcached, nginx, email
. $MUNIN_LIBDIR/plugins/plugin.sh
echo "no (quick hacky plugin)"
echo "graph_title Nginx requests by vhost"
echo 'graph_args --base 1000'
echo 'graph_vlabel requests / ${graph_period}'
echo 'graph_category nginx'
name="$(clean_fieldname "$vhost")"
echo "${name}.label ${vhost}"
echo "${name}.type DERIVE"
echo "${name}.draw LINE1"
name="$(clean_fieldname "$vhost")"
echo "${name}.value $(wc -l /var/log/nginx/${vhost}.access.log | cut -d' ' -f1)"