store and report git info

This commit is contained in:
sm
2018-03-08 16:17:11 -08:00
parent 56bd8445a4
commit bcbbe000f3
3 changed files with 5 additions and 0 deletions
+2
View File
@@ -20,6 +20,7 @@ var success *prometheus.CounterVec
type state struct {
Hostname string `json:"hostname"`
V string `json:"version"`
G string `json:"git"`
sync.RWMutex
Counts map[string]int `json:"counts"`
@@ -84,6 +85,7 @@ func main() {
fetcher := state{
Hostname: hn,
V: hw.Version,
G: hw.Git,
Counts: map[string]int{},
}
go fetcher.update(target)