[rrd-users] [GRAYMAIL] Block GPRINT when values not defined?

rseiwert rob at vca.com
Tue May 13 18:14:06 CEST 2014


Bump. I have the same issue. In my humble opinion "Unknown" values should not print zero and that's what strftime currently does. It seems to me that you should be able to test with an RPN expression but I had no luck. Should be easy enough to patch but I personally don't know github yet but this really bothers me so it's probably only a matter of time. 

Also something I discovered, if you open you graph time range to see the future you are also increasing your step size and watering down (averaging up?) your data. This is why I've started pre-calculating the slope and base in code from the rrd_data to get a "higher resolution" of the trend before generating the graph.  Once you know the max size (or target y) you can solve for the number of steps (x) in y=ax+b then calculate your "crossing  date" from x *step size. All this, the trends (slope, base, and correlation) and calculated crossing dates are passed into rrd_graph as literals. This method also allows your code to trigger to your NMS based of trends instead of having to look at the graph to see the date. 

From: Johan Elmerfjord [via RRD Mailinglists] [mailto:ml-node+s937164n7582060h11 at n2.nabble.com] 
Sent: Tuesday, May 13, 2014 11:39 AM
To: Robert C. Seiwert
Subject: [GRAYMAIL] Block GPRINT when values not defined?

Hi,

I'm working with some linear predictions and want to print out when some limits are about to be reached.

Today I'm using LIMIT to filter out when we are between the 2 thresholds (say 90-100%).
Then I'm taking the FIRST and LAST value for this sequence - that gives me the 90-time and 100-time.
Then I print these out using a line like:  'GPRINT:minpred:Reaching 90 on \: %c\n:strftime'

The problem is that if the minpred-time is undefined due to that we don't have a "growing enough" trend, and therefor can't estimate when we will hit the 90-% limit,
we end up sending undef or 0 to strftime - which will then print  Jan 1 01:00:00 1970.

Is there a way that I can check these values - and only do GPRINT if I have a valid timestamps?
Is it possible with RPN to do this?
I do want to use the strftime as that allows me to format the unix timestamp before printing it.

Are there other ways?
I could probably export the prediction data first - in a pre-graphing processing - and only add the values if they are good.
But if it can be done in one single step , that would be great.

/Johan 
_______________________________________________ 
rrd-users mailing list 
[hidden email] 
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
________________________________________
If you reply to this email, your message will be added to the discussion below:
http://rrd-mailinglists.937164.n2.nabble.com/Block-GPRINT-when-values-not-defined-tp7582060.html 
To start a new topic under RRDtool Users Mailinglist, email ml-node+s937164n937053h94 at n2.nabble.com 
To unsubscribe from RRD Mailinglists, click here.
NAML 




--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/Block-GPRINT-when-values-not-defined-tp7582060p7582062.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list