mirror of
https://github.com/cloudflare/cloudflared.git
synced 2025-07-27 19:29:57 +00:00
TUN-8731: Implement diag/system endpoint
## Summary This PR will add a new endpoint, "diag/system" to the metrics server that collects system information from different operating systems. Closes TUN-8731
This commit is contained in:
@@ -15,6 +15,8 @@ import (
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
"github.com/rs/zerolog"
|
||||
"golang.org/x/net/trace"
|
||||
|
||||
"github.com/cloudflare/cloudflared/diagnostic"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -52,6 +54,7 @@ func GetMetricsKnownAddresses(runtimeType string) [5]string {
|
||||
|
||||
type Config struct {
|
||||
ReadyServer *ReadyServer
|
||||
DiagnosticHandler *diagnostic.Handler
|
||||
QuickTunnelHostname string
|
||||
Orchestrator orchestrator
|
||||
|
||||
@@ -91,6 +94,8 @@ func newMetricsHandler(
|
||||
})
|
||||
}
|
||||
|
||||
router.HandleFunc("/diag/system", config.DiagnosticHandler.SystemHandler)
|
||||
|
||||
return router
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user