2015-09-09 19:43:51 +00:00
|
|
|
package monitor
|
|
|
|
|
2016-02-13 22:56:15 +00:00
|
|
|
import "github.com/influxdata/influxdb/monitor/diagnostics"
|
|
|
|
|
2015-09-09 19:43:51 +00:00
|
|
|
// system captures build diagnostics
|
|
|
|
type build struct {
|
|
|
|
Version string
|
|
|
|
Commit string
|
|
|
|
Branch string
|
2015-09-25 06:32:47 +00:00
|
|
|
Time string
|
2015-09-09 19:43:51 +00:00
|
|
|
}
|
|
|
|
|
2016-02-13 22:56:15 +00:00
|
|
|
func (b *build) Diagnostics() (*diagnostics.Diagnostics, error) {
|
2015-09-09 19:43:51 +00:00
|
|
|
diagnostics := map[string]interface{}{
|
2015-09-25 06:32:47 +00:00
|
|
|
"Version": b.Version,
|
|
|
|
"Commit": b.Commit,
|
|
|
|
"Branch": b.Branch,
|
|
|
|
"Build Time": b.Time,
|
2015-09-09 19:43:51 +00:00
|
|
|
}
|
|
|
|
|
2016-02-13 22:56:15 +00:00
|
|
|
return DiagnosticsFromMap(diagnostics), nil
|
2015-09-09 19:43:51 +00:00
|
|
|
}
|