DerivedMetric
POST /api/v1/config/derived-metrics
Request
- Base URLhttps://tenant.chronosphere.io
- AuthAPI key in header API-Token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"derived_metric": {
"metric_name": "cpu_usage:instance",
"queries": [
{
"query": {
"prometheus_expr": "cpu_usage{$service, $instance} / sum(cpu_usage{$service})",
"variables": [
{
"default_prometheus_selector": "service=~\".*\"",
"name": "service"
}
]
}
}
]
}
}Response
A successful response containing the created DerivedMetric.
Example response
{
"derived_metric": {
"metric_name": "cpu_usage:instance",
"queries": [
{
"query": {
"prometheus_expr": "cpu_usage{$service, $instance} / sum(cpu_usage{$service})",
"variables": [
{
"default_prometheus_selector": "service=~\".*\"",
"name": "service"
}
]
}
}
]
}
}Changes
No recorded changes to this operation across all 1 revision of this API.