From 093563ac37665cef722aeb7032d45f223429a4de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 17 Aug 2016 10:01:55 +0200 Subject: [PATCH] fix(metrics): restored prefix default to prod.grafana.. --- conf/defaults.ini | 4 ++-- conf/sample.ini | 10 +++++----- docs/sources/installation/configuration.md | 2 +- pkg/metrics/graphite_test.go | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/conf/defaults.ini b/conf/defaults.ini index 5e7f138690c..896689857ea 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -350,13 +350,13 @@ global_session = -1 # Metrics available at HTTP API Url /api/metrics [metrics] enabled = true -interval_seconds = 60 +interval_seconds = 10 # Send internal Grafana metrics to graphite [metrics.graphite] # Enable by setting the address setting (ex localhost:2003) address = -prefix = service.grafana.%(instance_name)s. +prefix = prod.grafana.%(instance_name)s. [grafana_net] url = https://grafana.net diff --git a/conf/sample.ini b/conf/sample.ini index 4ebf2d46fef..96d2bb92a1c 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -297,18 +297,18 @@ check_for_updates = true # Metrics available at HTTP API Url /api/metrics [metrics] # Disable / Enable internal metrics -enabled = true +;enabled = true # Publish interval -interval_seconds = 10 +;interval_seconds = 10 # Send internal metrics to Graphite [metrics.graphite] # Enable by setting the address setting (ex localhost:2003) -address = -prefix = service.grafana.%(instance_name)s. +;address = +;prefix = prod.grafana.%(instance_name)s. #################################### Internal Grafana Metrics ########################## # Url used to to import dashboards directly from Grafana.net [grafana_net] -url = https://grafana.net +;url = https://grafana.net diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md index 931d123c68b..af3bb796e2d 100644 --- a/docs/sources/installation/configuration.md +++ b/docs/sources/installation/configuration.md @@ -466,7 +466,7 @@ Enable metrics reporting. defaults true. Available via HTTP API `/api/metrics`. ### interval_seconds -Flush/Write interval when sending metrics to external TSDB. Defaults to 60s. +Flush/Write interval when sending metrics to external TSDB. Defaults to 10s. ## [metrics.graphite] Include this section if you want to send internal Grafana metrics to Graphite. diff --git a/pkg/metrics/graphite_test.go b/pkg/metrics/graphite_test.go index 320aa3be82b..2f866ddd7b6 100644 --- a/pkg/metrics/graphite_test.go +++ b/pkg/metrics/graphite_test.go @@ -19,7 +19,7 @@ func TestGraphitePublisher(t *testing.T) { So(err, ShouldBeNil) sec, err := setting.Cfg.NewSection("metrics.graphite") - sec.NewKey("prefix", "service.grafana.%(instance_name)s.") + sec.NewKey("prefix", "prod.grafana.%(instance_name)s.") sec.NewKey("address", "localhost:2001") So(err, ShouldBeNil) @@ -30,7 +30,7 @@ func TestGraphitePublisher(t *testing.T) { So(err, ShouldBeNil) So(publisher, ShouldNotBeNil) - So(publisher.prefix, ShouldEqual, "service.grafana.hostname_with_dots_com.") + So(publisher.prefix, ShouldEqual, "prod.grafana.hostname_with_dots_com.") So(publisher.address, ShouldEqual, "localhost:2001") }) @@ -53,7 +53,7 @@ func TestGraphitePublisher(t *testing.T) { So(err, ShouldBeNil) So(publisher, ShouldNotBeNil) - So(publisher.prefix, ShouldEqual, "service.grafana.hostname_with_dots_com.") + So(publisher.prefix, ShouldEqual, "prod.grafana.hostname_with_dots_com.") So(publisher.address, ShouldEqual, "localhost:2001") })