You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wip: selectively applicable conditions and metrics
save a list of refrences to entries that a Condition object wont be evaulated against. using Condition.Match with these data will return inconclusive results
save a reference to the listdata entry that a Metric object was generated from. if such a reference is present, and the Condition object has it in its skip list, it wont be used when building the perf threshold string
add helper function that looks through a condition list, takes out Condition objects where specialized keywords are present, then filters to Condition objects that have a generallized keyword present. These generallized versions can have entries added to their evaluation skip list
improve .String() on Condition objects, add more log points, add helper function for slice subtraction
use check_drivesize as a testing ground for these changes. If '<drive> used_pct' keyword is present, it will be taken as a specialized keyword, and generallized 'used_pct' containing Conditions will have the drive entry added to their blacklist
// metrics are normally added if the operand is simply 'used' , 'used_pct' , 'used_bytes' etc. and do not have a drive prefix
306
+
// detect conditions where the operand is named '<drive> used %', this is the default way snclient names percent usage metrics.
307
+
// if there is a condition using that as an operand, add usage metrics for that drive as well. during the metrics condition checking, they will take effect.
308
+
// this helps to check usage metrics specific to drives.
309
+
driveUsagePctMetric:=fmt.Sprintf("%s used %%", driveName)
// metrics are normally added if the operand is simply 'used' , 'used_pct' , 'used_bytes' etc. and do not have a drive prefix
316
-
// detect conditions where the operand is named '<drive> used %', this is the default way snclient names percent usage metrics.
317
-
// if there is a condition using that as an operand, add usage metrics for that drive as well. during the metrics condition checking, they will take effect.
318
-
// this helps to check usage metrics specific to drives.
319
333
driveUsagePctMetric:=fmt.Sprintf("%s used %%", drive)
0 commit comments