What do I have?
I have temperature sensors that I can query via SNMP and they give me an integer of the current temperature. Snmpwalk clearly shows that this is indeed an integer: To query this in my Cacti version 1.2.22, I used the "SNMP - Generic OID Template" via the Create --> New Graph feature. Since I wanted also a MIN value, which is not part of the default graph, I also added the Min in the same way Max exists in the default template, but of course changing the Consolidation function to Min. However, since both (Min and Max) show values I do not expect, I do not think adding the Min function messed all up... but who knows
What I get in the graph is this: As you can see, the Min and Max values show Decimal values. They make no sense to me, since the Temperature sensor only delivers an Integer. So I suspect it has something to do with how the .rrd file is set up and it averages out the values over time.
I then had a look at the Graph --> Graph Details --> Graph Source/properties and I was able to spot these lines:
Code: Select all
DEF:a='/usr/share/cacti/site/rra/messbox_snmp_oid_8.rrd':'snmp_oid':AVERAGE \
AREA:a#C04000FF:'Temperatur in °C' \
GPRINT:a:LAST:'Current\:%8.2lf %s' \
GPRINT:a:MIN:'Minimum\:%8.2lf %s' \
GPRINT:a:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:a:MAX:'Maximum\:%8.2lf %s\n'
My specific questions if this is right:
- How is it possible for me to advise Cacti to create the rrd file with MIN or MAX instead? I suppose I can not change it afterwards with rrdtool, but it has to be re-created, right?
- If I want graphs that keep the min and max temperatures over time, I would need to create separate RRD Files, one with Min, one with Max, right?
P.S. This will be an unmonitored system in a remote location and we want to make sure to see the Min and Max temperature values when we come back after a few months.