I have the following graph: http://i45.tinypic.com/flar6f.jpg

I am graphing device memory usage via SNMP. It has an OID for used and free memory but not total. To graph total memory (as it is upgradable) I added the third item (total memory) with no data source and used the CDEF function "Total All Data Sources". As you can see, it hasn't worked.

Using snmpget both OIDs return Gauge32 values that are the used and free memory in bytes. Cacti seems to be automatically convertering them into Megabytes and Gigbytes so my CDEF item isn't working as expected (it says 1.06GBs of total memory).

How can I correct this, so that the total is 1.08GBs + 607.61MBs?

  • Just stack the graphs? :) – nickgrim Apr 25 '12 at 10:46
  • What do you mean by stack them? – jwbensley Apr 25 '12 at 12:20

Add another CDEF that converts one of the values to the other value's unit ( * 1024 ).

  • But then if used memory drops to <1GB I would need to change the CDEF again. I plan to graph many more devices like this so I need a method of cacti doing it on it's own. This is a static solution if you catch my drift. – jwbensley Apr 25 '12 at 11:50
  • I agree; but then, you didn't mention the need to generalize this :) – adaptr Apr 25 '12 at 12:38

In the end the problem was with the data source associations, on the "Graph Item Inputs" section, on my graph template. The correct data sources need to be supplying them selves to the correct graph items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.