Skip to content

Instantly share code, notes, and snippets.

@mathew-hall
Created January 24, 2015 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathew-hall/a054291f3b0f89f4806e to your computer and use it in GitHub Desktop.
Save mathew-hall/a054291f3b0f89f4806e to your computer and use it in GitHub Desktop.
for host in 10.0.0.100 10.0.0.101 10.0.0.102 10.0.0.103; do
for sensor in DS18B20 DHT11; do
filename="$host-$sensor.rrd"
if [ ! -f $filename ]; then
rrdtool create $filename --step 15 \
--start 1415577600 \
DS:humidity:GAUGE:600:10:80 \
DS:temperature:GAUGE:600:5:40 \
RRA:AVERAGE:0.5:1:40320 \
RRA:AVERAGE:0.5:141:24 \
RRA:AVERAGE:0.5:3400:31 \
RRA:AVERAGE:0.5:23800:4 \
RRA:AVERAGE:0.5:95200:4
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment