Fix metrics retention size constraint (#252)
* Tweak logging + metrics retention * Fix broken retentionSize specification * Tweak to comment * Increase default log retention to 72h
This commit is contained in:
parent
be4a2f27ed
commit
b676959c7c
@ -57,10 +57,11 @@ stringData:
|
||||
serviceMonitorSelectorNilUsesHelmValues: false
|
||||
ruleSelectorNilUsesHelmValues: false
|
||||
{{- if $prometheusVolumeSize }}
|
||||
# Set the retention size to 95% of the given volume size
|
||||
# Set the retention size to max 85% of the given volume size, to leave space for the WAL
|
||||
# To get a valid storage request, we round down to the nearest whole number
|
||||
{{- $storageAmount := mustRegexFind "^([0-9]*[.])?[0-9]+" $prometheusVolumeSize | float64 }}
|
||||
{{- $storageUnits := mustRegexFind "(K|M|G|T|E|P)i?$" $prometheusVolumeSize }}
|
||||
retentionSize: {{ mulf 0.95 $storageAmount }}{{ $storageUnits }}B
|
||||
retentionSize: {{ mulf 0.85 $storageAmount | floor | int64 }}{{ trimSuffix "i" $storageUnits }}B
|
||||
{{- end }}
|
||||
grafana:
|
||||
sidecar:
|
||||
|
@ -223,7 +223,7 @@ monitoring:
|
||||
compactor:
|
||||
retention_enabled: true
|
||||
limits_config:
|
||||
retention_period: 744h
|
||||
retention_period: 72h
|
||||
# Enable persistence by default
|
||||
persistence:
|
||||
enabled: true
|
||||
|
Loading…
x
Reference in New Issue
Block a user