Skip to content

Basic setup with docker-compose of Grafana using Prometheus to publish metrics

Notifications You must be signed in to change notification settings

pasdam/docker-stack-grafana-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus-Grafana metrics stack

This repo contains a basic setup of a Grafana instance using Prometheus as data source.

Metrics are exposed to Prometheus using Telegraf.

There's also an alterative agent, statsD-exporter, to expose metrics.

Setup

Spin up the component with:

docker-compose up

Open Grafana, 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, 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. 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.

Releases

No releases published

Packages

No packages published