Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
1059a35b
Commit
1059a35b
authored
Jun 03, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(instrumentation): documented instrumentation options, closes #4696
parent
064e474b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
6 deletions
+46
-6
conf/defaults.ini
+5
-5
conf/sample.ini
+12
-0
docs/sources/installation/configuration.md
+25
-0
pkg/metrics/publish.go
+4
-1
No files found.
conf/defaults.ini
View file @
1059a35b
...
@@ -341,11 +341,11 @@ global_session = -1
...
@@ -341,11 +341,11 @@ global_session = -1
#################################### Internal Grafana Metrics ##########################
#################################### Internal Grafana Metrics ##########################
[metrics]
[metrics]
enabled
=
fals
e
enabled
=
tru
e
interval_seconds
=
1
0
interval_seconds
=
6
0
[metrics.graphite]
;
[metrics.graphite]
address
=
localhost:2003
;
address = localhost:2003
prefix
=
prod.grafana.%(instance_name)s.
;
prefix = prod.grafana.%(instance_name)s.
conf/sample.ini
View file @
1059a35b
...
@@ -272,5 +272,17 @@ check_for_updates = true
...
@@ -272,5 +272,17 @@ check_for_updates = true
;enabled = false
;enabled = false
;path = /var/lib/grafana/dashboards
;path = /var/lib/grafana/dashboards
#################################### Internal Grafana Metrics ##########################
[metrics]
# Disable / Enable internal metrics
;enabled = true
# Publish interval
;interval_seconds = 10
# Send internal metrics to Graphite
; [metrics.graphite]
; address = localhost:2003
; prefix = prod.grafana.%(instance_name)s.
docs/sources/installation/configuration.md
View file @
1059a35b
...
@@ -44,6 +44,12 @@ Then you can override them using:
...
@@ -44,6 +44,12 @@ Then you can override them using:
<hr
/>
<hr
/>
## instance_name
Set the name of the grafana-server instance. Used in logging and internal metrics and in
clustering info. Defaults to:
`${HOSTNAME}, which will be replaced with
environment variable `
HOSTNAME
`, if that is empty or does not exist Grafana will try to use
system calls to get the machine name.
## [paths]
## [paths]
### data
### data
...
@@ -439,3 +445,22 @@ Grafana backend index those json dashboards which will make them appear in regul
...
@@ -439,3 +445,22 @@ Grafana backend index those json dashboards which will make them appear in regul
### path
### path
The full path to a directory containing your json dashboards.
The full path to a directory containing your json dashboards.
## [metrics]
### enabled
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.
## [metrics.graphite]
Include this section if you want to send internal Grafana metrics to Graphite.
### address
Format `
<Hostname
or
ip
>
`:port
### prefix
Graphite metric prefix. Defaults to `
prod.grafana.%(instance_name)s.
`
pkg/metrics/publish.go
View file @
1059a35b
...
@@ -39,8 +39,11 @@ func instrumentationLoop(settings *MetricSettings) chan struct{} {
...
@@ -39,8 +39,11 @@ func instrumentationLoop(settings *MetricSettings) chan struct{} {
}
}
func
sendMetrics
(
settings
*
MetricSettings
)
{
func
sendMetrics
(
settings
*
MetricSettings
)
{
metrics
:=
MetricStats
.
GetSnapshots
()
if
len
(
settings
.
Publishers
)
==
0
{
return
}
metrics
:=
MetricStats
.
GetSnapshots
()
for
_
,
publisher
:=
range
settings
.
Publishers
{
for
_
,
publisher
:=
range
settings
.
Publishers
{
publisher
.
Publish
(
metrics
)
publisher
.
Publish
(
metrics
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment