Projet

Général

Profil

Révision 5f5b6570

ID5f5b657065122b43599f0908f403301dbc05f5c4
Parent 907c7471
Enfant c9bc1c1d

Ajouté par Cristian Ditoiu il y a presque 14 ans

Initial version

Voir les différences:

plugins/other/trafic_ro_24h
1
#!/bin/sh
2
RID=${0##*trafic_ro_}
3

  
4
if [ "$1" = "config" ]; then
5
        echo graph_title $V 24h visitors for $RID
6
        echo 'graph_args --base 1000'
7
        echo 'graph_vlabel vizitatori_ultimele_24_ore'
8
        echo 'graph_category Trafic_ro'
9
        echo 'graph_info 24h visitors.'
10
        echo "24h_visitors.label $RID"
11
        echo "24h_visitors.info 24H visitors for $RID"
12
        echo '24h_visitors.draw LINE2'
13
        exit 0
14
fi
15

  
16
VISITORS="$(echo '<doc><item>munin</item></doc>' | curl curl --silent -X POST -H 'Content-type: text/xml' -d @- http://api.trafic.ro/rest/0.01/sumar-site/$RID |  xmlstarlet sel -t -m "/sumar-site/vizitatori_ultimele_24_ore" -v ".")"
17
echo  "24h_visitors.value" $VISITORS;

Formats disponibles : Unified diff