Changeset 17603 for trunk


Ignore:
Timestamp:
03/08/14 18:56:11 (11 years ago)
Author:
tbretz
Message:
Added magic ambient temperature
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/munin/container_temp

    r16760 r17603  
    44   config)
    55        cat <<'EOM'
    6 graph_title Container temperature
     6graph_title Temperature
    77graph_vlabel temperature
    88graph_category environment
    9 container_temp.label temperature
     9container_temp.label container
     10magic_temp.label MAGIC
    1011container_temp.warning 40
    1112container_temp.critical 45
     13container_temp.min 0
     14magic_temp.min 0
    1215EOM
    1316        exit 0;;
    1417esac
    1518
    16 . /etc/munin/plugins/ticktick.sh
    1719
    1820DATA=`curl -s "http://10.0.100.234/statusjsn.js?components=18179&_=1365876572736"`
     
    2022RC=$?
    2123
    22 if [ "$RC" != "0" ] ; then
    23      echo Could not fetch container temperature: curl returned $RC >&2
    24      exit -1
     24if [ "$RC" == "0" ] ; then
     25
     26     . /etc/munin/plugins/ticktick.sh
     27
     28     tickParse "$DATA"
     29
     30     VAL1=``sensor_values[0].values[0][0].v``
     31     MIN1=``sensor_values[0].values[0][0].st[0]``
     32     MAX1=``sensor_values[0].values[0][0].st[1]``
     33
     34     echo container_temp.value $VAL1
     35
    2536fi
    2637
    2738
    28 tickParse "$DATA"
     39VAL2=`wget -q -O- http://www.magic.iac.es/site/weather/weather_data.txt | grep TE | cut -c3-`
    2940
    30 VAL=``sensor_values[0].values[0][0].v``
    31 MIN=``sensor_values[0].values[0][0].st[0]``
    32 MAX=``sensor_values[0].values[0][0].st[1]``
     41RC=$?
    3342
    34 echo container_temp.value $VAL
     43if [ "$RC" == "0" ] ; then
     44
     45    echo magic_temp.value $VAL2
     46
     47fi
Note: See TracChangeset for help on using the changeset viewer.