Skip to main content

diagrid metrics cluster

Show a cluster's control plane and agent metrics

Description​

Show a cluster's control plane and agent metrics. Without --metric it shows the control plane's health and resource use, the scheduler's etcd, the agent, and advisories firing.

Metric shortcodes for --metric: Control plane c0 uptime, c1 CPU, c2 memory, c3 Sentry root cert expiry, c4 active components Status c16 operator, c17 sentry, c18 placement, c19 injector, c24 scheduler Per service c5/c6 sentry, c7/c8 injector, c9/c10 placement, c11/c12 operator, c22/c23 scheduler (CPU/memory) Scheduler etcd sched1 database size, sched2 size in use, sched3 quota used, sched4 WAL fsync latency, sched5 has leader Agent c25 uptime, c26 CPU, c27 memory Metrics flow c20 remote writes succeeded, c21 remote writes throttled Advisories c13 high, c14 medium, c15 low impact firing Actors even codes a0 to a34, and a35

Some metrics need a minimum Dapr version and are skipped on older clusters.

diagrid metrics cluster <cluster-id> [flags]

Examples​


# Control plane health, resource use and agent metrics over the last hour
diagrid metrics cluster <cluster-id>

# Just the Sentry root certificate expiry and scheduler etcd quota, over a day
diagrid metrics cluster <cluster-id> --metric c3,sched3 --since 24h

# Every metric, with every sample
diagrid metrics cluster <cluster-id> --all --raw

Options​

--all Show every metric the server has for this target
--api-key string Diagrid Cloud API key
-h, --help help for cluster
-m, --metric strings Metric shortcodes to show, comma separated (see the list above)
-o, --output string Output format, supported [table, yaml, json] (default "table")
--raw Print the API response with every sample, as JSON unless -o yaml is set
--since duration How far back to look, up to 720h (30 days) (default 1h0m0s)
--step duration Resolution of each series, between 5s and 2h (default: chosen from --since)

SEE ALSO​