mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: expose agent stats via Prometheus endpoint (#7115)
* WIP * WIP * WIP * Agents * fix * 1min * fix * WIP * Test * docs * fmt * Add timer to measure the metrics collection * Use CachedGaugeVec * Unit tests * WIP * WIP * db: GetWorkspaceAgentStatsAndLabels * fmt * WIP * gauges * feat: collect * fix * fmt * minor fixes * Prometheus flag * fix * WIP * fix tests * WIP * fix json * Rx Tx bytes * CloseFunc * fix * fix * Fixes * fix * fix: IgnoreErrors * Fix: Windows * fix * reflect.DeepEquals
This commit is contained in:
@ -225,8 +225,9 @@ type DERPConfig struct {
|
||||
}
|
||||
|
||||
type PrometheusConfig struct {
|
||||
Enable clibase.Bool `json:"enable" typescript:",notnull"`
|
||||
Address clibase.HostPort `json:"address" typescript:",notnull"`
|
||||
Enable clibase.Bool `json:"enable" typescript:",notnull"`
|
||||
Address clibase.HostPort `json:"address" typescript:",notnull"`
|
||||
CollectAgentStats clibase.Bool `json:"collect_agent_stats" typescript:",notnull"`
|
||||
}
|
||||
|
||||
type PprofConfig struct {
|
||||
@ -722,6 +723,15 @@ when required by your organization's security policy.`,
|
||||
Group: &deploymentGroupIntrospectionPrometheus,
|
||||
YAML: "address",
|
||||
},
|
||||
{
|
||||
Name: "Prometheus Collect Agent Stats",
|
||||
Description: "Collect agent stats (may increase charges for metrics storage).",
|
||||
Flag: "prometheus-collect-agent-stats",
|
||||
Env: "CODER_PROMETHEUS_COLLECT_AGENT_STATS",
|
||||
Value: &c.Prometheus.CollectAgentStats,
|
||||
Group: &deploymentGroupIntrospectionPrometheus,
|
||||
YAML: "collect_agent_stats",
|
||||
},
|
||||
// Pprof settings
|
||||
{
|
||||
Name: "pprof Enable",
|
||||
|
Reference in New Issue
Block a user