mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-04 01:09:36 +02:00
zero/telemetry: internal envoy stats scraper and metrics producer (#5136)
This commit is contained in:
parent
c3534df885
commit
c1dec06afa
19 changed files with 667 additions and 301 deletions
|
@ -132,5 +132,19 @@ func (b *Builder) buildOutboundRoutes() []*envoy_config_route_v3.Route {
|
|||
})
|
||||
}
|
||||
}
|
||||
routes = append(routes, &envoy_config_route_v3.Route{
|
||||
Name: "envoy-metrics",
|
||||
Match: &envoy_config_route_v3.RouteMatch{
|
||||
PathSpecifier: &envoy_config_route_v3.RouteMatch_Prefix{Prefix: "/envoy/stats/prometheus"},
|
||||
},
|
||||
Action: &envoy_config_route_v3.Route_Route{
|
||||
Route: &envoy_config_route_v3.RouteAction{
|
||||
ClusterSpecifier: &envoy_config_route_v3.RouteAction_Cluster{
|
||||
Cluster: envoyAdminClusterName,
|
||||
},
|
||||
PrefixRewrite: "/stats/prometheus",
|
||||
},
|
||||
},
|
||||
})
|
||||
return routes
|
||||
}
|
||||
|
|
|
@ -61,6 +61,16 @@ func Test_buildOutboundRoutes(t *testing.T) {
|
|||
"idleTimeout": "0s",
|
||||
"timeout": "0s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": {
|
||||
"prefix": "/envoy/stats/prometheus"
|
||||
},
|
||||
"name": "envoy-metrics",
|
||||
"route": {
|
||||
"cluster": "pomerium-envoy-admin",
|
||||
"prefixRewrite": "/stats/prometheus"
|
||||
}
|
||||
}
|
||||
]`, routes)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue