[rrd-users] RPN for max of list of nodes

Steve Shipway s.shipway at auckland.ac.nz
Thu Jun 25 23:17:00 CEST 2015


The short answer is no, you cannot do this in RPN.

 

The longer answer is that, if you want to do this, you’ll need to do some pre-processing in separate code, and then just use a COMMENT definition to insert the nodename.

 

This is because of two things –

1.       RRD variables are numeric only, not text.  So you cannot have a variable holding the node name, though you could in theory just hold the NN numerical index.

2.       There does not currently exist an RPN function for ‘MAXINDEX’ or similar; IE, give the *index* of the max value in the list rather than the max value itself.  This would possibly be a nice enhancement to create though.

 

Steve

 

Steve Shipway

s.shipway at auckland.ac.nz

(GNU Terry Pratchett)

 

From: rrd-users [mailto:rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] On Behalf Of Aaron Thomas Holt
Sent: Friday, 26 June 2015 9:05 a.m.
To: rrd-users
Subject: [rrd-users] RPN for max of list of nodes

 

Hi all,

 

I currently have a legend formatted like a table like the one below:

 

               min    max    average

node01   123    123         123

...

nodeNN  123    999         123 

 

I would like a line that displays the maximum for all nodes that looks something like what follows:

 

overall max: 999, node NN

 

              min    max    average

node01  123    123         123

...

nodeNN  123   999         123 

 

Looking at the RPN documentation it looks possible to find the max value with a CDEF, but is there a way to find the associated node as well?

 

Thanks,

Aaron

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20150625/8fbbdd81/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 10311 bytes
Desc: not available
URL: <http://lists.oetiker.ch/pipermail/rrd-users/attachments/20150625/8fbbdd81/attachment-0001.bin>


More information about the rrd-users mailing list