source: trunk/FACT++/munin/container_temp@ 17033

Last change on this file since 17033 was 16760, checked in by tbretz, 11 years ago
  • Property svn:executable set to *
File size: 674 bytes
Line 
1#!/bin/bash
2
3case $1 in
4 config)
5 cat <<'EOM'
6graph_title Container temperature
7graph_vlabel temperature
8graph_category environment
9container_temp.label temperature
10container_temp.warning 40
11container_temp.critical 45
12EOM
13 exit 0;;
14esac
15
16. /etc/munin/plugins/ticktick.sh
17
18DATA=`curl -s "http://10.0.100.234/statusjsn.js?components=18179&_=1365876572736"`
19
20RC=$?
21
22if [ "$RC" != "0" ] ; then
23 echo Could not fetch container temperature: curl returned $RC >&2
24 exit -1
25fi
26
27
28tickParse "$DATA"
29
30VAL=``sensor_values[0].values[0][0].v``
31MIN=``sensor_values[0].values[0][0].st[0]``
32MAX=``sensor_values[0].values[0][0].st[1]``
33
34echo container_temp.value $VAL
Note: See TracBrowser for help on using the repository browser.