source: alternc-munin/trunk/usr/share/munin/plugins/alternc_topsites @ 2635

Revision 2635, 1021 bytes checked in by azerttyu, 3 years ago (diff)

Integrons dans la gestion des suggestions tous les scripts de monitoring

  • Property svn:executable set to *
Line 
1#!/bin/sh
2#
3# Plugin to monitor the most active websites
4#
5# Parameters:
6#       
7#       config
8#       autoconf
9#
10#
11#%# family=auto
12#%# capabilities=autoconf
13
14# [ML] 2009-03-31 DEPRECATED, use apache_hits_per_domain instead
15
16if [ -x /usr/sbin/apache ]; then
17        LOGAPACHE=$LOGAPACHE
18fi
19
20if [ -x /usr/sbin/apache2 ]; then
21        LOGAPACHE=/var/log/apache2/access.log
22fi
23
24LOGFILE="tail -10000 $LOGAPACHE | /usr/lib/alternc/hits_per_domain"
25
26
27if [ "$1" = "autoconf" ]; then
28        echo yes
29        exit 0
30fi
31
32LOGCACHE=`tail -10000 $LOGAPACHE | /usr/lib/alternc/hits_per_domain  | tail -10`
33
34if [ "$1" = "config" ]; then
35        echo 'graph_title AlternC - most active (hits)'
36        echo 'graph_vlabel hits'
37        echo 'graph_category alternc'
38        # echo 'graph_scale no'
39        # echo 'graph_args --base 1024 -l 0'
40
41        tail -10000 $LOGAPACHE | /usr/lib/alternc/hits_per_domain  | tail -10 | sed 's/[-\.]/_/g' | awk '{print $2".label " $2}'
42        exit 0
43fi
44
45tail -10000 $LOGAPACHE | /usr/lib/alternc/hits_per_domain  | tail -10 | sed 's/[-\.]/_/g' | awk '{print $2".value " $1}'
Note: See TracBrowser for help on using the repository browser.