Ad Widget

Collapse

How can I get the largest of a number of different keys?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • linuxgurugamer
    Member
    • Oct 2010
    • 66

    #1

    How can I get the largest of a number of different keys?

    I'm trying to do one of the following two things, both have the same issue:

    I have defined in a template a number of file systems, many of which are common across systems, but not all are on all systems.

    I'm trying to get the largest of all the values for each system and save it as a calculated value so I can use this in a graph later on.

    First, I can't find any way to get a max of a number of values.

    Second, I decided that for my purposes, I could simply add all the values together and save that. For this graph it's ok, since on all the systems we have one very large filesystem and the others are small.

    It's not working, and the message I get is that it's unsupported. I guess this is because when I add them all together, it fails due to one or more being unsupported on that particular system.

    Is there a way to have it ignore the unsupported values in a calculation, or just use 0?

    Here is the formula I have in the template:

    last("vfs.fs.size[/mnt/raid10,total]")+
    last("vfs.fs.size[/tmp,total]")+
    last("vfs.fs.size[/home,total]")+
    last("vfs.fs.size[/usr,total]")+
    last("vfs.fs.size[/mnt/mysql-lvm,total]")+
    last("vfs.fs.size[/var/opt,total]")+
    last("vfs.fs.size[/var,total]")+
    last("vfs.fs.size[/,total]")


    Thanks in advance


    JBB
Working...