Anton Shestakov <av6@dwimlabs.net>, Tue, 02 Jan 2018 17:57:18 +0800
replace always_run with check_mode
. $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)"