# How baseline values are calculated

Document ID : KB000077075
Show Technical Document Details
Introduction:
How baseline values are calculated

Question:
How baseline values are calculated
We calculate 1 baseline value per hour per day of the week, which is based on an average of 12 samples collected each hour. This means at the end of each day we have 24 calculated baseline values (7 days of the week baselines will be calculated). These values are stored in the database and then compared with the data gathered previously during the time in question, dynamic alarms will then be raised depending on your configuration.

Example: Week 3 on Monday between 1-2PM we calculate QoS every 5 minutes for the hour (12 samples), we then create 1 baseline value for this hour for Monday 1-2PM based on an average of these 12 samples. These values are then stored in the database. This baseline value will then be compared on week 4 to the baseline value created on Mondays between 1-2PM.

At the end of the 4th week we will have 12 x 4 = 48 samples collected between 1-2PM for Mondays, an average is then created out of these 48 samples. Now we have enough data to calculate that the average QoS for this hour, on this day of the week, has a specific value and then the alarms will be created accordingly.

Alarms will be generated on the 2nd week of calculating baseline values. However, we suggest a minimum of 4 weeks calculated baseline values before you start to configure dynamic alarms based on these values (to have a normalised / correct baseline value to alarm on).

See the following documentation for configuring Baselines, Alarm Thresholds etc - https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/how-to-articles/configuring-alarm-thresholds#ConfiguringAlarmThresholds-ConfiguringBaselines

If it's unrealistic to wait for 1-4 weeks of data to be collected before meaningful values are generated in dynamic alarms, the baseline_engine probe has a raw configuration setting called "useprevioushour".

Example of the behaviour when this setting is enabled: If 12 samples have been collected from 1-2pm, it will create a baseline value out of those samples which will then be used between 2-3pm to generate dynamic alarms.

After 1 week of baseline values being collected, you can then disable this setting. Please find the details here: useprevioushour Raw Configuration Setting - https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/alphabetical-probe-articles/baseline_engine/baseline_engine-raw-configuration#baseline_engineRawConfiguration-TheThresholdFolder

Baseline data retention period

4 weeks is the default retention period of baseline data, meaning once we move into the 5th week of baseline values being collected the 1st weeks baseline data will be removed from the database, so it is a rolling process.

You can configure this retention period from 3-12 weeks via the baseline_engine. Please find more details here: Change the Baseline Retention Period - https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/alphabetical-probe-articles/baseline_engine/baseline_engine-configuration#baseline_engineConfiguration-ChangetheBaselineRetentionPeriod