Projet

Général

Profil

Révision 5cbdd737

ID5cbdd737f00769f3b21de24d126d73b42040175a
Parent 29be1c00
Enfant 5cfe8f9a

Ajouté par Thomas VIAL il y a plus de 12 ans

fping_ => Improved display

Voir les différences:

plugins/network/fping_
2 2
#
3 3
# Description  : Plugin to monitor a server/network availability.
4 4
# Author       : Thomas VIAL
5
# Author URL   : http://tvi.al
5 6
# Usage        : ln -s /path/to/fping_ /etc/munin/fping_www.google.com
6 7
# Explaination : Will graph connection to www.google.com  
7 8
# Requirements :
......
17 18

  
18 19
if [ "$1" = "config" ]; then
19 20
  echo "graph_title ${target} availability"
20
  echo "graph_args -l 0 -u 100"
21
  echo "graph_vlabel Availability"
21
  echo "graph_args --base 1000 -r -l 0 -u 100"
22
  echo "graph_vlabel Availability in %"
22 23
  echo "graph_category network"
23 24
  echo "graph_info Displays Network Availability"
24
  # Success
25
  echo "fping_${item}_success.label Reachable"
26
  #echo "fping_${item}_success.type GAUGE"
27
  echo "fping_${item}_success.colour 00CC00CC"
28 25
  # Failure
29
  echo "fping_${item}_failure.label Unreachable"
30
  echo "fping_${item}_failure.type AREA"
31
  echo "fping_${item}_failure.colour ff0000"
26
  echo "failure.label Unreachable"
27
  echo "failure.draw AREA"
28
  echo "failure.colour ff0000"
29
  # Success
30
  echo "success.label Reachable"
31
  echo "success.draw STACK"
32
  echo "success.colour 00CC00CC"
32 33
  exit 0
33 34
fi
34 35

  
......
41 42

  
42 43
if [ $status -eq 0 ]; then
43 44
    # Success
44
    echo "fping_${item}_success.value 100"
45
    echo "fping_${item}_failure.value 0"
45
    echo "success.value 100"
46
    echo "failure.value 0"
46 47
else
47 48
    # Failure
48
    echo "fping_${item}_success.value 0"
49
    echo "fping_${item}_failure.value 100" 
49
    echo "success.value 0"
50
    echo "failure.value 100" 
50 51
fi

Formats disponibles : Unified diff