Refactor metricstore. Initial stub for cluster/ subcluster specific retention times

This commit is contained in:
2026-01-13 09:52:00 +01:00
parent 2ebab1e2e2
commit 04a2e460ae
5 changed files with 203 additions and 27 deletions

View File

@@ -46,9 +46,45 @@ const configSchema = `{
}
},
"retention-in-memory": {
"description": "Keep the metrics within memory for given time interval. Retention for X hours, then the metrics would be freed.",
"description": "Global default: Keep the metrics within memory for given time interval. Retention for X hours, then the metrics would be freed.",
"type": "string"
},
"clusters": {
"description": "Optional per-cluster retention overrides",
"type": "array",
"items": {
"type": "object",
"required": ["cluster"],
"properties": {
"cluster": {
"description": "Cluster name",
"type": "string"
},
"retention-in-memory": {
"description": "Cluster-specific retention duration (overrides global default)",
"type": "string"
},
"subclusters": {
"description": "Optional per-subcluster retention overrides",
"type": "array",
"items": {
"type": "object",
"required": ["subcluster"],
"properties": {
"subcluster": {
"description": "Subcluster name",
"type": "string"
},
"retention-in-memory": {
"description": "Subcluster-specific retention duration (overrides cluster and global default)",
"type": "string"
}
}
}
}
}
}
},
"nats": {
"description": "Configuration for accepting published data through NATS.",
"type": "array",