need help customizing the file system capacity rule from the infrastructure cartridge

I been requested to create a customized rule based on the file system capacity rule

currently this rule monitors all filesystem

We want to filter out all filesystems related to the OS like /var., /boot,/tmp or /opt for example

what should I add the this code that shows all filesystems

LogicalDisk : host.hostType != null and = 'Physical' and host.detail.topologyTypeName != 'HPVServer' and host.detail.topologyTypeName != 'VMWESXServer'

thank you


  • Hi Philippe,

    You can do something like the highlighted bit below. The rule is scoped to LogicalDisk and every object in Foglight has a property called "name".

    So you can add -    and name != '/filesystem1' and name != '/filesystem2'


    If it's Windows with a "\" in the object name (eg. C:\), you need to escape with the \ character so it would be   name != 'C:\\'

  • Hi Darren,

    Long time
    Thank you for the info
    I also found another way but very similar

    test = true;
    for (obj in scope.detail) {
      if (obj.topologyTypeName.equals("AccessInformation")) {
       test = obj.writable;
    if (test && ( scope.get("name").equals("/home") || scope.get("name").equals("/var") || scope.get("name").equals("/boot") || scope.get("name").contains("/opt/")|| scope.get("name").equals("/boot") || scope.get("name").contains("/usr/"))) {
    return "";
    return #capacityUsed# >= registry("INF_FileSystemCapacityFatal");
    return false;
    Thank you
  • That would work too by using it in the rule condition. That condition would get evaluated on all objects while using it in the scoping query limits the evaluation only to scoped objects.

  • hi Darren,

    I tried your solution but it stil returned all filesystem because the name is not just the filesystem is also contains the server name

    how can I do a contains instead of an equals  ?

    Thank you