https://github.com/pasdam/docker-stack-grafana-prometheus
Basic setup with docker-compose of Grafana using Prometheus to publish metrics
https://github.com/pasdam/docker-stack-grafana-prometheus
docker docker-compose grafana metrics prometheus prometheus-client statsd statsd-client telegraf
Last synced: 29 days ago
JSON representation
Basic setup with docker-compose of Grafana using Prometheus to publish metrics
- Host: GitHub
- URL: https://github.com/pasdam/docker-stack-grafana-prometheus
- Owner: pasdam
- Created: 2020-04-17T10:53:14.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-18T12:47:49.000Z (about 6 years ago)
- Last Synced: 2025-03-27T00:15:36.241Z (about 1 year ago)
- Topics: docker, docker-compose, grafana, metrics, prometheus, prometheus-client, statsd, statsd-client, telegraf
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prometheus-Grafana metrics stack
This repo contains a basic setup of a [Grafana](https://grafana.com/) instance
using [Prometheus](https://prometheus.io/) as data source.
Metrics are exposed to Prometheus using
[Telegraf](https://www.influxdata.com/time-series-platform/telegraf/).
There's also an alterative agent,
[statsD-exporter](https://github.com/prometheus/statsd_exporter), to expose
metrics.
## Setup
Spin up the component with:
```sh
docker-compose up
```
Open [Grafana](http://localhost:3000), and login (the default credentials are
`admin`/`admin`), you will be asked to change the password at the first access,
but for local/test setup is possible to skip that step.
Next step it to add a data source to pull metrics from. Go to
`Settings > Data sources`, and add a new Prometheus one. The only thing to
specify is the url, [http://prometheus:9090](http://prometheus:9090), leave the
rest as default and click on `Save and test`.
At this point it's possible to import Prometheus default dashboards, opening the
newly created data source, and click on the import button on each row in the
`Dashboards` tab.
Last thing to do is to import our example dashboard: for this just import
[dashboard.json](grafana/dashboard.json). Note: if you used a custom name for
the data source, you have to edit the file to update the `datasource` property
of each panel.
## Persistence
Both Grafana and Prometheus data are persisted on the local filesystem, as the
`volumes/data` subfolder of each component is mounted as volume in the compose
file.