So I'm trying to create a template with a calculated item of all filesystems in /mnt
The file systems are /mnt/disk1 /mnt/disk2 etc but not all hosts have the same amount disks
So I cant use a simple sum of the disks because as a template it fails when one of the disk is not there.
The foreach function should be able to solve this but I have one issue with it. I can only do it for all the file systems not just the ones in /mnt
sum(last_foreach(//vfs.fs.size[*,total])) <- this works but for all file systems.
I want something like this sum(last_foreach(//vfs.fs.size[/mnt/*,total]))
Is there a way to achieve this?
The file systems are /mnt/disk1 /mnt/disk2 etc but not all hosts have the same amount disks
So I cant use a simple sum of the disks because as a template it fails when one of the disk is not there.
The foreach function should be able to solve this but I have one issue with it. I can only do it for all the file systems not just the ones in /mnt
sum(last_foreach(//vfs.fs.size[*,total])) <- this works but for all file systems.
I want something like this sum(last_foreach(//vfs.fs.size[/mnt/*,total]))
Is there a way to achieve this?