prometheus-stack lets you run grafana and prometheus in docker container.
Clone the project and run the following:
cd prometheus-stackdocker-compose pulldocker-compose up -d
Go to the directory where docker-compose.yml is present and run the following:
docker-compose down
docker-compose.ymlfile contains the volumes and port related information. By default, prometheus runs on9090and grafana runs on3000.prometheus/prometheus.ymlfile contains scrape and target related information. By default, it scrapes itself in every 10s.
By default, grafana_data and prometheus_data are data stores for grafana and prometheus respectively. You can replace these directories in docker-compose.yml file.
Feel free to raise the PR, if you find any issue or want to improve the project.