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

Johan Elmerfjord jelmerfj at adobe.com
Tue May 13 17:38:13 CEST 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20140513/dc1c46fb/attachment.htm 


More information about the rrd-users mailing list