Add RED metrics

- this PR adds metrics via Prometheus for instrumentation and
to move towards using HPAv2 / custom metrics in Kubernetes.

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis
2019-04-03 22:03:44 +01:00
parent 1b61954ad9
commit 634ec22c8d
125 changed files with 33018 additions and 9 deletions

View File

@ -91,6 +91,8 @@ func (ReadConfig) Read(hasEnv HasEnv) WatchdogConfig {
cfg.combineOutput = parseBoolValue(hasEnv.Getenv("combine_output"))
}
cfg.metricsPort = 8081
return cfg
}
@ -132,4 +134,7 @@ type WatchdogConfig struct {
// combineOutput combines stderr and stdout in response
combineOutput bool
// metricsPort is the HTTP port to serve metrics on
metricsPort int
}