@@ -49,6 +49,10 @@ class Query(object):
49
49
"operation" , "protocol" , "waiters_time_threshold" , "export" ,
50
50
"nodegroup" , "account" , "filesystem" , "tct_csap" , "tct_operation" , "cloud_nodeclass" ])
51
51
52
+ DISK_CAP_METRICS = set (["gpfs_disk_disksize" , "gpfs_disk_free_fullkb" , "gpfs_disk_free_fragkb" ,
53
+ "gpfs_pool_disksize" , "gpfs_pool_free_fragkb" , "gpfs_pool_free_fullkb" ,
54
+ "gpfs_fs_inode_used" , "gpfs_fs_inode_free" , "gpfs_fs_inode_alloc" , "gpfs_fs_inode_max" ])
55
+
52
56
def __init__ (self , metrics = None , bucketsize = 1 , filters = None , groupby = None , includeDiskData = False ):
53
57
'''
54
58
Constructor, filters and groupby must be preformmated
@@ -184,7 +188,11 @@ def addMeasurement(self, meassure):
184
188
def __str__ (self ):
185
189
# dd = '-a' if self.includeDiskData else ''
186
190
# Workaround for RTC Defect 280368: Zimon capacity query does not return all results (seen on CNSA)
187
- if (self .metrics and any ('gpfs_disk_' in metric for metric in self .metrics )) or (self .sensor and self .sensor == "GPFSDiskCap" ):
191
+ if (self .metrics and
192
+ any (str (metric ) in self .DISK_CAP_METRICS for metric in self .metrics )
193
+ ) or (self .sensor and
194
+ self .sensor in ("GPFSDiskCap" ,"GPFSPoolCap" , "GPFSInodeCap" )
195
+ ):
188
196
dd = '-ar'
189
197
elif self .includeDiskData :
190
198
dd = '-a'
0 commit comments