internal metrics: add grafana version

This commit is contained in:
bergquist
2017-09-26 15:25:44 +02:00
parent 0778f31828
commit 2ed753232f
2 changed files with 14 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ import (
"net/http"
_ "net/http/pprof"
"github.com/grafana/grafana/pkg/metrics"
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/services/sqlstore"
"github.com/grafana/grafana/pkg/setting"
@@ -29,7 +30,7 @@ import (
_ "github.com/grafana/grafana/pkg/tsdb/testdata"
)
var version = "4.1.0"
var version = "4.6.0"
var commit = "NA"
var buildstamp string
var build_date string
@@ -80,6 +81,8 @@ func main() {
setting.BuildCommit = commit
setting.BuildStamp = buildstampInt64
metrics.M_Grafana_Version.WithLabelValues(version).Set(1)
server := NewGrafanaServer()
server.Start()
}