-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Currently the Uptimer configuration only allows absolute numbers for failure thresholds. The time a CF upgrade deployment takes can however vary significantly. A new stemcell version takes very long as all VMs have to be recreated, whereas a single BOSH release update may only affect a few VMs. So absolute thresholds like "allow only 10 push failures" don't always make sense. Instead, we want to specify percentages which respect the number of total attempts.
Current example configuration:
APP_STATS_THRESHOLD: 5
Current example output:
[UPTIMER] 2024/05/22 08:18:28 FAILED (Stats availability): 6 failed attempts to retrieve stats for app exceeded the threshold of 5 allowed failures (Total attempts: 183, pass rate 96.72%)
Configuration with percentages:
APP_STATS_THRESHOLD_PERCENT: 95
New result:
[UPTIMER] 2024/05/22 08:18:28 SUCCESS (Stats availability): 6 failed attempts to retrieve stats for app did not fall below the threshold of 95% (Total attempts: 61, pass rate 96.72%)
Implementation idea:
- Enhance the
periodicstruct with a percentage threshold parameter:uptimer/measurement/periodic.go
Line 11 in 36ffbdf
type periodic struct { - In the
Summaryfunction, check the calculated percentage against the configured value:uptimer/measurement/periodic.go
Line 116 in 36ffbdf
func (p *periodic) Summary() string {