Add InfluxDB support for traefik metrics
This commit is contained in:
parent
e3131481e9
commit
00d7c5972f
35 changed files with 4693 additions and 28 deletions
|
@ -1244,6 +1244,10 @@ func (server *Server) registerMetricClients(metricsConfig *types.Metrics) {
|
|||
registries = append(registries, metrics.RegisterStatsd(metricsConfig.StatsD))
|
||||
log.Debugf("Configured StatsD metrics pushing to %s once every %s", metricsConfig.StatsD.Address, metricsConfig.StatsD.PushInterval)
|
||||
}
|
||||
if metricsConfig.InfluxDB != nil {
|
||||
registries = append(registries, metrics.RegisterInfluxDB(metricsConfig.InfluxDB))
|
||||
log.Debugf("Configured InfluxDB metrics pushing to %s once every %s", metricsConfig.InfluxDB.Address, metricsConfig.InfluxDB.PushInterval)
|
||||
}
|
||||
|
||||
if len(registries) > 0 {
|
||||
server.metricsRegistry = metrics.NewMultiRegistry(registries)
|
||||
|
@ -1253,6 +1257,7 @@ func (server *Server) registerMetricClients(metricsConfig *types.Metrics) {
|
|||
func stopMetricsClients() {
|
||||
metrics.StopDatadog()
|
||||
metrics.StopStatsd()
|
||||
metrics.StopInfluxDB()
|
||||
}
|
||||
|
||||
func (server *Server) buildRateLimiter(handler http.Handler, rlConfig *types.RateLimit) (http.Handler, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue