Re: RPN for max of list of nodes

Steve Shipway <[email protected]>
Newsgroups gmane.comp.db.rrdtool.user
Message-ID <5820DC553954E44FA1A36C78323AD1485A013E5A@uxcn10-tdc06.UoA.auckland.ac.nz>
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

[email protected]

(GNU Terry Pratchett)

 

From: rrd-users [mailto:[email protected]] 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

_______________________________________________
rrd-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
smime.p7s (application/pkcs7-signature, 10.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.