Understanding "...for at least 1 month..." Metrics Policies
search cancel

Understanding "...for at least 1 month..." Metrics Policies

book

Article ID: 283662

calendar_today

Updated On: 08-09-2023

Products

CloudHealth

Issue/Introduction

 

Metrics policy blocks that have a rule "... for at least 1 month" work by evaluating the current month-to-date (M.T.D.) metric value and the values for the preceding number of months selected - ... at least 1 month here.  If either the current MTD value or the preceding month's value meet the logic condition then the policy will violate.  

Detail:

Metrics summary data (Max, Min, Total, Avg) is computed on a daily basis for the current month.  If a policy is run early in the month then only data for those days that have passed in that month will be included. 

We do not recommend running metrics polices before 14:00 UTC in order to allow time for daily calculations to be completed. 

A Policy that evaluates "... for at least n months ..."  does not look at daily values for the past 30 day sliding window.  It looks at computed data for the current month to date and "n" number of complete prior months.    

 

Example:

A policy "for at least 1 month" that is run in June will look at metric values for the May and June months.  If the condition is logically true for at least one of these months then a violation will occur. 

If a period of two months is selected then the current month and the two prior months are evaluated.   The condition must be met for at least two (or more if a greater number of months was selected) consecutive months for a violation.  

 

Return values:
We support only a single return value in the Violation report so we select the metric value of the last violation found.  In the case of AND conditions the violation reports the last value of the first condition in the AND clause.  

Options:

  • Run monthly metric policies near the end of the month.
  • Schedule Metric policies after 14:00 UTC to allow time for collection and calculation to be fully updated.
  • Consider if a daily policy meets your reporting needs remembering that the logic condition must be met each consecutive day for at least the number of days selected.