Merge rest.go

This commit is contained in:
2025-04-24 10:40:03 +02:00
5 changed files with 81 additions and 203 deletions

View File

@@ -100,7 +100,7 @@ type ProgramConfig struct {
// Address where the http (or https) server will listen on (for example: 'localhost:80').
Addr string `json:"addr"`
// Addresses from which secured API endpoints can be reached
// Addresses from which secured admin API endpoints can be reached, can be wildcard "*"
ApiAllowedIPs []string `json:"apiAllowedIPs"`
// Drop root permissions once .env was read and the port was taken.

View File

@@ -25,10 +25,18 @@
},
"scope": {
"description": "Native measurement resolution",
"type": "string"
"type": "string",
"enum": [
"node",
"socket",
"memoryDomain",
"core",
"hwthread",
"accelerator"
]
},
"timestep": {
"description": "Frequency of timeseries points",
"description": "Frequency of timeseries points in seconds",
"type": "integer"
},
"aggregation": {
@@ -108,15 +116,19 @@
"type": "boolean"
},
"peak": {
"description": "The maximum possible metric value",
"type": "number"
},
"normal": {
"description": "A common metric value level",
"type": "number"
},
"caution": {
"description": "Metric value requires attention",
"type": "number"
},
"alert": {
"description": "Metric value requiring immediate attention",
"type": "number"
},
"remove": {

View File

@@ -17,6 +17,7 @@
"IPC",
"Hz",
"W",
"J",
"°C",
""
]