Discussion:
custom graph definition direction needed
dpetzel
2011-11-29 00:00:07 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62852#62852

--------------------------------------------------------------
I'm not familiar with the exact devices and OID in question, but in general as long as your *datapoint* type is set to dervice or counter, RRD will take care of 1-3 (Calculating the rate over time) automatically. I think all you really need to do is on the datapoint, define an alias, say "_cacheCpuTimePercent" with an RPN of "*,100".

Again I could be wrong here, and someone else might have more direct experience with the devices in question, but I think the above *might* just get you started.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62852#62852]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
me2
2011-11-29 04:23:04 UTC
Permalink
me2 [http://community.zenoss.org/people/me2] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62874#62874

--------------------------------------------------------------
Is this what you meant? I know the image is small but I changed the type from gauge to derive.

Then created an alias "temp_something" and the next field over is *,100

I used derive because the number can go up or down and counter should be used only when it is increasing.
I don;t follow the logic on the alias with *,100

~still thinking~


Loading Image... Loading Image...
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62874#62874]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2011-11-29 12:22:37 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62876#62876

--------------------------------------------------------------
Yeap, that is pretty much what I had in mind. So the alias (as I understand them). Allows you to use RPN expressions on the data point to create normalized/altered data values.
So in this case your formula is (X2 - X1)/n * 100.

I belive that with the configuration you have the value of cacheCpuTime that is saved to the RRD equals this part of your equation: (X2 - X1)/n

That leaves us with the "* 100" piece. That is where the Alias comes into play. As written, it would read "temp_cacheCpuTime = cacheCpuTime * 100".

So if you update your graph definition to use temp_cacheCpuTime rather than cacheCpuTime, I'm thinking it might have the desired effect.

In the same way you could probably do away with the alias completly, and instead put the "*,100" RPN into the graph point definition
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62876#62876]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
me2
2011-11-29 15:18:53 UTC
Permalink
me2 [http://community.zenoss.org/people/me2] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62880#62880

--------------------------------------------------------------
Thanks for the reply.

The only issue I see is thats not exactly the equation I am being asked to use. Close though.

1) X1 = snmpget (cacheCpuTime)
2) Wait ‘n’ seconds
3) X2 = snmpget (cacheCpuTime)
4) Proxy CPU utilization percentage during the
‘n’ seconds = (X2 – X1)/n * 100

n= the amount of time in seconds between the snmp polls, I am not sure the zenoss default but though I read where is is 5 mins or would be 300 seconds.
So I'm assuning I could change the 2nd field...
from         *100

to             /30000

I got the 300 seconds = 5 mins = snmp polling cycle.
then times 100 = 30000

Sound right?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62880#62880]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2011-11-29 15:30:38 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62881#62881

--------------------------------------------------------------
Not exactly. RRD does the diff for you before it stores the value. If you look at the RRD data there is an epoch time stamp with the value. Just because the poller is scheduled is to run every 5 minutes doesnt mean it will (what if the device is unavailable, or the poller is down or busy). At the point the value is saved into the RRD, the calculation is done.
So (X2 – X1)/n is done automically if you have your data source type to derive. Or said another way that value that is saved into the RRD is the adjusted value of (X2 – X1)/n. Therefore the value that is saved already had #1-#3 done. The only thing that should be left is the multiplier in your example equation.

I'm not an RRD expert by any means, but that is my understanding of how the data is stored under the hood.
http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html
Data AcquisitionWhen monitoring the state of a system, it is convenient to have the data available at a constant time interval. Unfortunately, you may not always be able to fetch data at exactly the time you want to. Therefore *RRDtool* lets you update the log file at any time you want. It will automatically interpolate the value of the data-source (*DS*) at the latest official time-slot (interval) and write this interpolated value to the log. The original value you have supplied is stored as well and is also taken into account when interpolating the next log entry.
http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html
*COUNTER*is for continuous incrementing counters like the ifInOctets counter in a router. The *COUNTER* data source assumes that the counter never decreases, except when a counter overflows. The update function takes the overflow into account. +*The counter is stored as a per-second rate*+. When the counter overflows, RRDtool checks if the overflow happened at the 32bit or 64bit border and acts accordingly by adding an appropriate value to the result.
*DERIVE*will store the derivative of the line going from the last to the current value of the data source. This can be useful for gauges, for example, to measure the rate of people entering or leaving a room. +*Internally, derive works exactly like COUNTER but without overflow checks*+.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62881#62881]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
me2
2011-11-29 15:55:35 UTC
Permalink
me2 [http://community.zenoss.org/people/me2] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62856#62856

--------------------------------------------------------------
ok, I was not able to update my graph definition for cachcputime. Under manage graph ppints then add data point in the drop downs the "temp_cacheCpuTime" variable was not on in the list.

I then tried to remove the alias, and In the same way you could probably do away with the alias completly, and instead put the "*,100" RPN into the graph point definition. I tried this and the graph went goop...lol the horizontal and vertical axis went away etc...not blank but like an empty icon.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62856#62856]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2011-11-29 16:06:06 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62882#62882

--------------------------------------------------------------
To confirm you did *not* include the quotes in the RPN in the graph point def correct? Aside from that, I'm not sure why that RPN would break the graph, but if you review the logs (I think zenhub.log or zenrender.log might have it) it might provide additional information on why the graph failed to render.

One though, is perhaps the reverse the order of the RPN and try "100,*" Just looking through some of the examples I may have inverted them in my example above.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62882#62882]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
me2
2011-11-29 17:37:50 UTC
Permalink
me2 [http://community.zenoss.org/people/me2] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62884#62884

--------------------------------------------------------------
ok it took 100,*

I will let it run for a bit to see what it looks like. Thanks.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62884#62884]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
me2
2011-11-30 01:26:34 UTC
Permalink
me2 [http://community.zenoss.org/people/me2] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62909#62909

--------------------------------------------------------------
ok I was about to post it didnt work...and for some reason I decided to discover a few more devices and I looked at the graphs for these newly discovered devices and they look accurate...after a couple hrs all points are between 0 and 100 % on the vertical axis...fantastic!!

However the graphs that had already been created using an in accurate equation etc...have vertical axis number between 8mg anf higher....way higher....I am thinkign that this is because they were collecting data when the equation was wrong.

Will they eventually flatten out like the others? Or is there a way to clean out all the data for a graph and let it start a new?

All of the devices are using shared templates and if it'w working fir the new devices it should for the old?

make sense?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62909#62909]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
dpetzel
2011-11-30 02:25:19 UTC
Permalink
dpetzel [http://community.zenoss.org/people/dpetzel] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62911#62911

--------------------------------------------------------------
Makes sense. The 'broken' RRDs won't recover. You'll want to delete them and let Zenoss re-create them on the next polling interval. Via the CLI navigate to $ZENHOME/perf/Devices
cd into the folder that matches your device name
look for RRD files that match your datasource names and delete them.
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62911#62911]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
me2
2011-11-30 03:15:46 UTC
Permalink
me2 [http://community.zenoss.org/people/me2] created the discussion

"Re: custom graph definition direction needed"

To view the discussion, visit: http://community.zenoss.org/message/62912#62912

--------------------------------------------------------------
ok I did this and the graphs are looking good...you are the man!

thanks!
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62912#62912]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...