-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
Description
We would like to add a line in a table like the average of CPU in the first row
We could do something like the following...just ideas!
| CPU | SORT by index (if not incresing by +1) | ADD LEAF() | INDEX | MATH (INDEX+1) % COUNT(CPU) +1 | CHAIN (MATH,ADD) | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.1.1.1 | 10 | x | 1 | x | 1 | x | 1 | 1 | 1 | 2 | 1 | AVG CPU | |||||
| 1.1.1.1 | 20 | y | 2 | z | 2 | y | 2 | 2 | 2 | 3 | 2 | x | |||||
| 1.1.1.1 | 30 | x | 3 | z | 3 | z | 3 | 3 | 3 | 4 | 3 | y | |||||
| 4 | AVG CPU | 4 | 4 | 4 | 1 | 4 | z |
A little bit complex....a simpler solution could be to have:
An ADD transform with at-pos(0.1)
And a SORT transform with numerical (only alpha now) sorting and precision 1, ...need also a padding (auto?) because of Xymon limitation
ADD Function
argument
- non-repeters at position default is end
- non-repeters other?
- Repetes
SORT Function
Sort by val
Sort by key is a function composition:
| OID | INDEX | SORT by val | CHAIN(SORT by val,OID) | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.1.1.1 | 10 | x | 10 | 10 | 1 | 10 | 1 | x | |||||||||
| 1.1.1.1 | 20 | y | 20 | 20 | 2 | 20 | 2 | y | |||||||||
| 1.1.1.1 | 30 | x | 30 | 30 | 3 | 30 | 3 | x |