Skip to content

Commit 8499d32

Browse files
committed
Merge branch 'master' of github.com:grafana/grafana
2 parents d894c13 + a530df8 commit 8499d32

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

conf/defaults.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ interval_seconds = 60
358358
# Send internal Grafana metrics to graphite
359359
; [metrics.graphite]
360360
; address = localhost:2003
361-
; prefix = service.grafana.%(instance_name)s
361+
; prefix = service.grafana.%(instance_name)s.
362362

363363
[grafana_net]
364364
url = https://grafana.net

conf/sample.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ enabled = true
306306
# Send internal metrics to Graphite
307307
; [metrics.graphite]
308308
; address = localhost:2003
309-
; prefix = service.grafana.%(instance_name)s
309+
; prefix = service.grafana.%(instance_name)s.
310310

311311
#################################### Internal Grafana Metrics ##########################
312312
# Url used to to import dashboards directly from Grafana.net

docs/sources/plugins/development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ will be expected to export different things. You can find what's expected for [d
3232
and [apps](./apps.md) plugins in the documentation.
3333

3434
## Start developing your plugin
35-
There are two ways that you can start developing a Grafana plugin.
35+
There are three ways that you can start developing a Grafana plugin.
3636

3737
1. Setup a Grafana development environment. [(described here)](http://docs.grafana.org/project/building_from_source/) and place your plugin in the ```data/plugins``` folder.
3838
2. Install Grafana and place your plugin in the plugins directory which is set in your [config file](../installation/configuration.md). By default this is `/var/lib/grafana/plugins` on Linux systems.

pkg/metrics/graphite.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type GraphitePublisher struct {
2121
func CreateGraphitePublisher() (*GraphitePublisher, error) {
2222
graphiteSection, err := setting.Cfg.GetSection("metrics.graphite")
2323
if err != nil {
24-
return nil, err
24+
return nil, nil
2525
}
2626

2727
publisher := &GraphitePublisher{}
@@ -33,7 +33,7 @@ func CreateGraphitePublisher() (*GraphitePublisher, error) {
3333
prefix := graphiteSection.Key("prefix").Value()
3434

3535
if prefix == "" {
36-
prefix = "service.grafana.%(instance_name)s"
36+
prefix = "service.grafana.%(instance_name)s."
3737
}
3838

3939
publisher.prefix = strings.Replace(prefix, "%(instance_name)s", safeInstanceName, -1)

pkg/metrics/graphite_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ func TestGraphitePublisher(t *testing.T) {
1919
So(err, ShouldBeNil)
2020

2121
sec, err := setting.Cfg.NewSection("metrics.graphite")
22-
sec.NewKey("prefix", "service.grafana.%(instance_name)s")
23-
sec.NewKey("address", "localhost:2003")
22+
sec.NewKey("prefix", "service.grafana.%(instance_name)s.")
23+
sec.NewKey("address", "localhost:2001")
2424

2525
So(err, ShouldBeNil)
2626

@@ -30,7 +30,8 @@ func TestGraphitePublisher(t *testing.T) {
3030
So(err, ShouldBeNil)
3131
So(publisher, ShouldNotBeNil)
3232

33-
So(publisher.prefix, ShouldEqual, "service.grafana.hostname_with_dots_com")
33+
So(publisher.prefix, ShouldEqual, "service.grafana.hostname_with_dots_com.")
34+
So(publisher.address, ShouldEqual, "localhost:2001")
3435
})
3536

3637
Convey("Test graphite publisher default values", t, func() {
@@ -49,7 +50,7 @@ func TestGraphitePublisher(t *testing.T) {
4950
So(err, ShouldBeNil)
5051
So(publisher, ShouldNotBeNil)
5152

52-
So(publisher.prefix, ShouldEqual, "service.grafana.hostname_with_dots_com")
53+
So(publisher.prefix, ShouldEqual, "service.grafana.hostname_with_dots_com.")
5354
So(publisher.address, ShouldEqual, "localhost:2003")
5455
})
5556
}

0 commit comments

Comments
 (0)