Calculating value from OID data

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
samercer
Posts: 3
Joined: Thu Jan 11, 2007 1:27 pm

Calculating value from OID data

Post by samercer »

Hi all-- I just got a temperature monitoring device which supports SNMP queries. However, the OID returns an INTEGER that is 100x of the actual value. For example, if the temperature would be 98.6 F, the OID returns an integer of 9860. I need to divide the value returned by 100 to properly display the temperature in my graphs. I've created a custom CDEF called "Divide by 100" (I copied the syntax in the sample Divide by 10). How do I apply this CDEF to either (a) my data queries, or (b) the graph so that I don't see my server room being 7000 degrees? :D

Many thanks in advance for any assistance.

Scott
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

You won't apply a cdef to a data query or rrd file. It is applied only to a graph item. Write a new cdef=CURRENT_DATA_SOURCE,100,/ and apply it to your graph items (AREA, LINEx and GPRINT), that's all
Reinhard
samercer
Posts: 3
Joined: Thu Jan 11, 2007 1:27 pm

Post by samercer »

Reinhard,

Thank you for your reply. I guess I'm not sure how I go about doing what you've suggested.

What I've done is to create a "Generic SNMP Enabled Device" and a graph with it using the "SNMP - Generic OID Template". I don't see anywhere in the device or graph options where I can modify any of the parameters you mention. The Cacti manual is a little ambiguous on how to use CDEFs as well.

Thanks,

Scott
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sp please try using My Stuff
Reinhard
Post Reply

Who is online

Users browsing this forum: tembarek and 1 guest