#!/bin/sh # # Plugin to monitor the most active websites # # Parameters: # # config # autoconf # # #%# family=contrib #%# capabilities=autoconf # [ML] 2009-03-31 DEPRECATED, use apache_hits_per_domain instead LOGFILE="tail -10000 /var/log/apache/access.log | /root/bin/hits_per_domain" if [ "$1" = "autoconf" ]; then echo yes exit 0 fi LOGCACHE=`tail -10000 /var/log/apache/access.log | /root/bin/hits_per_domain | tail -10` if [ "$1" = "config" ]; then echo 'graph_title AlternC - most active (hits)' echo 'graph_vlabel hits' echo 'graph_category alternc' # echo 'graph_scale no' # echo 'graph_args --base 1024 -l 0' tail -10000 /var/log/apache/access.log | /root/bin/hits_per_domain | tail -10 | sed 's/[-\.]/_/g' | awk '{print $2".label " $2}' exit 0 fi tail -10000 /var/log/apache/access.log | /root/bin/hits_per_domain | tail -10 | sed 's/[-\.]/_/g' | awk '{print $2".value " $1}'