prometheus: Add mgmt_pgraph_start_time_seconds metric

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
Julien Pivotto
2017-02-20 22:38:30 +01:00
parent 46c6d6f656
commit 7d92ab335a
5 changed files with 38 additions and 1 deletions

View File

@@ -480,6 +480,12 @@ func (obj *Main) Run() error {
log.Printf("Graphviz: Successfully generated graph!")
}
}
// Call this here because at this point the graph does not
// know anything about the prometheus instance.
if err := prom.UpdatePgraphStartTime(); err != nil {
log.Printf("Main: Prometheus.UpdatePgraphStartTime() errored: %v", err)
}
// G.Start(...) needs to be synchronous or wait,
// because if half of the nodes are started and
// some are not ready yet and the EtcdWatch