A service collecting metrics for okctl
See specification.yaml for the API specification.
okctl
sends events to okctl-metrics-service
by using an HTTPs client. Requests get sent as a POST request on
/v1/metrics/events
and should look something like this:
{
"category": "my-category",
"action": "my-action"
"labels": {
"key": "value"
}
}
To be able to send requests, you need to use okctl
as the user agent. This to avoid the majority of false positive
requests from internet bots and what not.
A working curl
example would be:
curl <service URL>/v1/metrics/events \
-X POST \
-H "User-Agent: okctl" \
-H "Content-Type: application/json" \
-d '{"category": "cluster", "action": "scaffold"}'
okctl-metrics-service
exposes an endpoint on /z/prometheus
that is harvested by a Prometheus agent. Each metric is
prefixed with okctl_
.