prometheus: Implement basic Prometheus support

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto
2017-02-08 08:26:52 +01:00
parent ed268ad683
commit 1af67e72d4
6 changed files with 194 additions and 0 deletions

View File

@@ -115,6 +115,9 @@ func run(c *cli.Context) error {
return err
}
obj.Prometheus = c.Bool("prometheus")
obj.PrometheusListen = c.String("prometheus-listen")
// install the exit signal handler
exit := make(chan struct{})
defer close(exit)
@@ -320,6 +323,15 @@ func CLI(program, version string, flags Flags) error {
Value: "",
Usage: "default identity used for generation",
},
cli.BoolFlag{
Name: "prometheus",
Usage: "start a prometheus instance",
},
cli.StringFlag{
Name: "prometheus-listen",
Value: "",
Usage: "specify prometheus instance binding",
},
},
},
}