Use case 4: Create threshold rules for specific filesets

This section describes the threshold use case to create threshold rules for specific fileset.

Consider that the initial cluster file system and fileset have the following setting:
[root@gpfsgui-11 ~]# mmlsfileset nfs_shareFS
Filesets in file system 'nfs_shareFS':
Name                     Status    Path
root                     Linked    /gpfs/nfs_shareFS
nfs_shareFILESET         Linked    /gpfs/nfs_shareFS/nfs_shareFILESET
test_share               Linked    /gpfs/nfs_shareFS/test_share

Per default, the following rules are defined and enabled in the cluster:
[root@gpfsgui-11 ~]# mmhealth thresholds list
### Threshold Rules ###
rule_name             metric                error  warn    direction filterBy groupBy              sensitivity
---------------------------------------------------------------------------------------------------------------
InodeCapUtil_Rule     Fileset_inode         90     80      None                gpfs_cluster_name,
                                                                               gpfs_fs_name,
                                                                               gpfs_fset_name        300
DataCapUtil_Rule      DataPool_capUtil      90.0   80.0    high                gpfs_cluster_name,
                                                                               gpfs_fs_name,
                                                                               gpfs_diskpool_name    300
MemFree_Rule          mem_memfree           50000  100000  low                 node                  300
MetaDataCapUtil_Rule  MetaDataPool_capUtil  90.0   80.0    high                gpfs_cluster_name,
                                                                               gpfs_fs_name,
                                                                               gpfs_diskpool_name    300
  1. Create new inode capacity usage rules for the specific filesets.
    1. To create a threshold rule for all filesets in an individual file system, use the following command:
      
      [root@gpfsgui-11 ~]# mmhealth thresholds add Fileset_inode --errorlevel 85.0 
      --warnlevel 75.0 --direction high --filterby 'gpfs_fs_name=nfs_shareFS'
      --groupby gpfs_cluster_name,gpfs_fs_name,gpfs_diskpool_name
      --sensitivity 300 --hysteresis 5.0 --name rule_ForAllFsets_inFS
      
      New rule 'rule_ForAllFsets_inFS' is created. The monitor process is activated
    2. To create a threshold rule for individual fileset, use the following command:
      
      [root@gpfsgui-11 ~]# mmhealth thresholds add Fileset_inode --errorlevel 70.0 
      --warnlevel 60.0 --direction high --filterby 'gpfs_fs_name=nfs_shareFS,
      gpfs_fset_name=nfs_shareFILESET' 
      --groupby gpfs_cluster_name,gpfs_fs_name,gpfs_fset_name --sensitivity 300 
      --hysteresis 5.0 --name rule_SingleFset_inFS
      
      New rule 'rule_SingleFset_inFS' is created. The monitor process is activated
      Note: In this case, for the nfs_shareFILESET fileset, you have specified both, the file system name and the fileset name in the filter.
    The mmhealth thresholds add command gives an output similar to the following:
    
    # mmhealth thresholds list
    ### Threshold Rules ###
    rule_name              metric                error  warn    direction  filterBy          groupBy               sensitivity
    ----------------------------------------------------------------------------------------------------------------------------------
    InodeCapUtil_Rule      Fileset_inode         90     80      None                         gpfs_cluster_name,     300
                                                                                             gpfs_fs_name,          
                                                                                             gpfs_fset_name                                
    DataCapUtil_Rule       DataPool_capUtil      90.0   80.0    high                         gpfs_cluster_name,     300            
                                                                                             gpfs_fs_name,
                                                                                             gpfs_diskpool_name  
    MemFree_Rule           mem_memfree           50000  100000  low                          node                   300            
    rule_SingleFset_inFS   Fileset_inode         70.0   60.0    high       gpfs_fs_name
                                                                           =nfs_shareFS,      gpfs_cluster_name,    300
                                                                           gpfs_fset_name
                                                                           =nfs_shareFILESET  gpfs_fs_name,
                                                                                              gpfs_fset_name      
    rule_ForAllFsets_inFS  Fileset_inode         85.0   75.0    high       gpfs_fs_name
                                                                           =nfs_shareFS       gpfs_cluster_name,     300
                                                                                              gpfs_fs_name,
                                                                                              gpfs_fset_name      
    MetaDataCapUtil_Rule   MetaDataPool_capUtil  90.0   80.0    high                          gpfs_cluster_name,     300
                                                                                              gpfs_fs_name,
                                                                                              gpfs_diskpool_name    
  2. Run the mmhealth thresholds list command to list the individual rules' priorities. In this example, the rule_SingleFset_inFS rule has the highest priority for the nfs_shareFILESET fileset. The rule_ForAllFsets_inFS rule has the highest priority for the other filesets that belong to the nfs_shareFS file system, and the InodeCapUtil_Rule rule is valid for all the remaining filesets.
    
    [root@gpfsgui-11 ~]# mmhealth thresholds list -v -Y|grep priority
    mmsysmonc_thresholdslist::0:1::InodeCapUtil_Rule:priority:4:
    mmsysmonc_thresholdslist::0:1::DataCapUtil_Rule:priority:4:
    mmsysmonc_thresholdslist::0:1::MemFree_Rule:priority:2:
    mmsysmonc_thresholdslist::0:1::rule_SingleFset_inFS:priority:1:
    mmsysmonc_thresholdslist::0:1::rule_ForAllFsets_inFS:priority:2:
    mmsysmonc_thresholdslist::0:1::MetaDataCapUtil_Rule:priority:4:
    [root@gpfsgui-11 ~]#