File tree Expand file tree Collapse file tree 4 files changed +46
-6
lines changed
docs/sources/installation Expand file tree Collapse file tree 4 files changed +46
-6
lines changed Original file line number Diff line number Diff line change @@ -341,11 +341,11 @@ global_session = -1
341
341
342
342
# ################################### Internal Grafana Metrics ##########################
343
343
[metrics]
344
- enabled = false
345
- interval_seconds = 10
344
+ enabled = true
345
+ interval_seconds = 60
346
346
347
- [metrics.graphite]
348
- address = localhost:2003
349
- prefix = prod.grafana.%(instance_name)s.
347
+ ; [metrics.graphite]
348
+ ; address = localhost:2003
349
+ ; prefix = prod.grafana.%(instance_name)s.
350
350
351
351
Original file line number Diff line number Diff line change @@ -272,5 +272,17 @@ check_for_updates = true
272
272
; enabled = false
273
273
; path = /var/lib/grafana/dashboards
274
274
275
+ # ################################### Internal Grafana Metrics ##########################
276
+ [metrics]
277
+ # Disable / Enable internal metrics
278
+ ; enabled = true
279
+
280
+ # Publish interval
281
+ ; interval_seconds = 10
282
+
283
+ # Send internal metrics to Graphite
284
+ ; [metrics.graphite]
285
+ ; address = localhost:2003
286
+ ; prefix = prod.grafana.%(instance_name)s.
275
287
276
288
Original file line number Diff line number Diff line change @@ -44,6 +44,12 @@ Then you can override them using:
44
44
45
45
<hr />
46
46
47
+ ## instance_name
48
+ Set the name of the grafana-server instance. Used in logging and internal metrics and in
49
+ clustering info. Defaults to: `${HOSTNAME}, which will be replaced with
50
+ environment variable ` HOSTNAME ` , if that is empty or does not exist Grafana will try to use
51
+ system calls to get the machine name.
52
+
47
53
## [ paths]
48
54
49
55
### data
@@ -439,3 +445,22 @@ Grafana backend index those json dashboards which will make them appear in regul
439
445
440
446
### path
441
447
The full path to a directory containing your json dashboards.
448
+
449
+ ## [ metrics]
450
+
451
+ ### enabled
452
+ Enable metrics reporting. defaults true. Available via HTTP API ` /api/metrics ` .
453
+
454
+ ### interval_seconds
455
+
456
+ Flush/Write interval when sending metrics to external TSDB. Defaults to 60s.
457
+
458
+ ## [ metrics.graphite]
459
+ Include this section if you want to send internal Grafana metrics to Graphite.
460
+
461
+ ### address
462
+ Format ` <Hostname or ip> ` : port
463
+
464
+ ### prefix
465
+ Graphite metric prefix. Defaults to ` prod.grafana.%(instance_name)s. `
466
+
Original file line number Diff line number Diff line change @@ -39,8 +39,11 @@ func instrumentationLoop(settings *MetricSettings) chan struct{} {
39
39
}
40
40
41
41
func sendMetrics (settings * MetricSettings ) {
42
- metrics := MetricStats .GetSnapshots ()
42
+ if len (settings .Publishers ) == 0 {
43
+ return
44
+ }
43
45
46
+ metrics := MetricStats .GetSnapshots ()
44
47
for _ , publisher := range settings .Publishers {
45
48
publisher .Publish (metrics )
46
49
}
You can’t perform that action at this time.
0 commit comments