Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
b82ec43a
Commit
b82ec43a
authored
Apr 29, 2015
by
Julius Volz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document Grafana integration.
parent
8cab0f54
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
0 deletions
+73
-0
grafana.md
content/docs/visualization/grafana.md
+73
-0
grafana_configuring_datasource.png
static/grafana_configuring_datasource.png
+0
-0
grafana_prometheus.png
static/grafana_prometheus.png
+0
-0
grafana_qps_graph.png
static/grafana_qps_graph.png
+0
-0
No files found.
content/docs/visualization/grafana.md
0 → 100644
View file @
b82ec43a
---
title
:
Grafana
sort_rank
:
7
---
# Grafana support for Prometheus
There is early support for querying Prometheus servers from
[
Grafana
](
http://grafana.org/
)
.
The Grafana data source for Prometheus currently lives in the
[
grafana-plugins
](
https://github.com/grafana/grafana-plugins
)
repository.
The following shows an example Grafana dashboard which queries Prometheus for data:
[

](/assets/grafana_prometheus.png)
## Installing
For general Grafana installation instructions, see the
[
official Grafana
documentation](http://docs.grafana.org/installation/).
To use the Prometheus data source with Grafana, copy the
`datasources/prometheus`
directory from the
`grafana-plugins`
repository to
the
`public/app/plugins/datasource`
directory of your Grafana server.
For example, on Linux, installing Grafana and the Prometheus data source could
look like this:
```
bash-lang
# Download and unpack Grafana from binary tar (adjust version as appropriate).
curl -L -O https://grafanarel.s3.amazonaws.com/builds/grafana-2.0.2.linux-x64.tar.gz
tar zxf grafana-2.0.2.linux-x64.tar.gz
# Copy the Prometheus datasource from 'grafana-plugins' into Grafana.
git clone https://github.com/grafana/grafana-plugins.git
cp -a grafana-plugins/datasources/prometheus grafana-2.0.2/public/app/plugins/datasource/
# Start Grafana.
cd grafana-2.0.2/
./bin/grafana-server web
```
## Using
By default, Grafana will be listening on
[
http://localhost:3000
](
http://localhost:3000
)
. The default login is "admin" /
"admin".
### Creating a Prometheus data source
To create a Prometheus data source:
1.
Click on the Grafana logo to open the sidebar menu.
2.
Click on "Data Sources" in the sidebar.
3.
Click on "Add New".
4.
Select "Prometheus" as the type.
5.
Set the appropriate Prometheus server URL (for example,
`http://localhost:9090/`
)
6.
Adjust other data source settings as desired (for example, turning the proxy access off).
7.
Click "Add" to save the new data source.
The following shows an example data source configuration:
[

](/assets/grafana_configuring_datasource.png)
### Creating a Prometheus graph
Follow the standard way of adding a new Grafana graph. Then:
1.
Click the graph title, then click "Edit".
2.
Under the "Metrics" tab, select your Prometheus data source (bottom right).
3.
Enter any Prometheus expression into the "Query" field, while using the "Metric" field to lookup metrics via autocompletion.
4.
To format the legend names of time series, use the "Legend format" input in a
similar way to PromDash. For example, to show only the
`method`
and
`status`
labels of a returned query result, separated by a dash, you could use the
legend format string
`{{method}} - {{status}}`
.
5.
Tune other graph settings until you have a working graph.
The following shows an example Prometheus graph configuration:
[

](/assets/grafana_qps_graph.png)
static/grafana_configuring_datasource.png
0 → 100644
View file @
b82ec43a
44.3 KB
static/grafana_prometheus.png
0 → 100644
View file @
b82ec43a
118 KB
static/grafana_qps_graph.png
0 → 100644
View file @
b82ec43a
111 KB
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