File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 9
9
"github.com/grafana/grafana/pkg/api/dtos"
10
10
"github.com/grafana/grafana/pkg/metrics"
11
11
"github.com/grafana/grafana/pkg/middleware"
12
+ "github.com/grafana/grafana/pkg/util"
12
13
)
13
14
14
15
func GetTestMetrics (c * middleware.Context ) {
@@ -40,6 +41,10 @@ func GetTestMetrics(c *middleware.Context) {
40
41
}
41
42
42
43
func GetInternalMetrics (c * middleware.Context ) Response {
44
+ if metrics .UseNilMetrics {
45
+ return Json (200 , util.DynMap {"message" : "Metrics disabled" })
46
+ }
47
+
43
48
snapshots := metrics .MetricStats .GetSnapshots ()
44
49
45
50
resp := make (map [string ]interface {})
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ func readSettings() *MetricSettings {
38
38
if graphitePublisher , err := CreateGraphitePublisher (); err != nil {
39
39
log .Error (3 , "Metrics: Failed to init Graphite metric publisher" , err )
40
40
} else if graphitePublisher != nil {
41
- log .Info ("Metrics: Internal metrics publisher Graphite initialized" )
41
+ log .Info ("Metrics: Graphite publisher initialized" )
42
42
settings .Publishers = append (settings .Publishers , graphitePublisher )
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments