mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2026-02-02 09:41:46 +01:00
Schema now validates a map of metric names to objects with frequency (integer) and aggregation (string) fields. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
27 lines
724 B
Go
27 lines
724 B
Go
// Copyright (C) NHR@FAU, University Erlangen-Nuremberg.
|
|
// All rights reserved. This file is part of cc-metric-store.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package config
|
|
|
|
var metricConfigSchema = `
|
|
{
|
|
"type": "object",
|
|
"description": "Map of metric names to their configuration.",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"frequency": {
|
|
"description": "Sampling frequency in seconds.",
|
|
"type": "integer"
|
|
},
|
|
"aggregation": {
|
|
"description": "Aggregation strategy: 'sum', 'avg', or 'null'.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": ["frequency", "aggregation"]
|
|
}
|
|
}`
|