GTKC Knowledgebase
A little bit of wisdom
Graphing disk temperatures with the Eluna Graph System
Posted by  Admin on


I have been using the Eluna Graph System for several years, as I like it's simplicity.

As per this post, I graph my ESXi disk temperatures so that I can keep an eye on them.

Content of create.sh:
#!/bin/bash

rrdtool create esxi_disks.rrd \
  --start `date +%s` \
  --step 300 \
  DS:disk1:GAUGE:600:0:U \
  DS:disk2:GAUGE:600:0:U \
  DS:disk3:GAUGE:600:0:U \
  DS:disk4:GAUGE:600:0:U \
  DS:disk5:GAUGE:600:0:U \
  DS:disk6:GAUGE:600:0:U \
  RRA:AVERAGE:0.5:1:2016 \
  RRA:AVERAGE:0.5:6:1344 \
  RRA:AVERAGE:0.5:24:732 \
  RRA:AVERAGE:0.5:144:1460


Content of graph.pm:
$GRAPH_TITLES{'esxi_disks'} = "ESXi disk temperatures";
$GRAPH_CMDS{'esxi_disks'} = <<"LOAD_GRAPH_CMD";
--title "ESXi disk temperatures"
--vertical-label="Temperature °C"
--lower-limit 0 --upper-limit 50
DEF:disk1={#path#}esxi_disks.rrd:disk1:AVERAGE
DEF:disk2={#path#}esxi_disks.rrd:disk2:AVERAGE
DEF:disk3={#path#}esxi_disks.rrd:disk3:AVERAGE
DEF:disk4={#path#}esxi_disks.rrd:disk4:AVERAGE
DEF:disk5={#path#}esxi_disks.rrd:disk5:AVERAGE
DEF:disk6={#path#}esxi_disks.rrd:disk6:AVERAGE
LINE:disk1{#dcolor1#}:" disk 1 "
GPRINT:disk1:LAST:"Current\\: %5.2lf °C"
GPRINT:disk1:AVERAGE:"Average\\: %5.2lf °C"
GPRINT:disk1:MAX:"Max\\: %5.2lf °C\\n"
LINE:disk2{#dcolor2#}:" disk 2 "
GPRINT:disk2:LAST:"Current\\: %5.2lf °C"
GPRINT:disk2:AVERAGE:"Average\\: %5.2lf °C"
GPRINT:disk2:MAX:"Max\\: %5.2lf °C\\n"
LINE:disk3{#dcolor3#}:" disk 3 "
GPRINT:disk3:LAST:"Current\\: %5.2lf °C"
GPRINT:disk3:AVERAGE:"Average\\: %5.2lf °C"
GPRINT:disk3:MAX:"Max\\: %5.2lf °C\\n"
LINE:disk4{#dcolor3#}:" disk 4 "
GPRINT:disk4:LAST:"Current\\: %5.2lf °C"
GPRINT:disk4:AVERAGE:"Average\\: %5.2lf °C"
GPRINT:disk4:MAX:"Max\\: %5.2lf °C\\n"
LINE:disk5{#dcolor3#}:" disk 5 "
GPRINT:disk5:LAST:"Current\\: %5.2lf °C"
GPRINT:disk5:AVERAGE:"Average\\: %5.2lf °C"
GPRINT:disk5:MAX:"Max\\: %5.2lf °C\\n"
LINE:disk6{#dcolor3#}:" disk 6 "
GPRINT:disk6:LAST:"Current\\: %5.2lf °C"
GPRINT:disk6:AVERAGE:"Average\\: %5.2lf °C"
GPRINT:disk6:MAX:"Max\\: %5.2lf °C\\n"
LINE1:disk6{#linecolor#}
LOAD_GRAPH_CMD
1; # Return true



Content of update.sh:
#!/bin/bash
dummy=$(tr , '\n' < /tmp/temps.txt)
arr=($dummy)
arg=$(printf "%s:" "${arr[@]}")
/usr/bin/rrdtool update esxi_disks.rrd -t disk1:disk2:disk3:disk4:disk5:disk6 N:$arg\0


/tmp/temps.txt is generated as described here




Tags: System monitoring , Linux

Return to home page: Home