I created simple docker-compose file which will help to run Grafana and Prometheus

Hi!

During my pool setup I spent almost full day writing up and creating docker-compose file to run Grafana+Prometheus on separate server in docker, so here I would like to share with you what I build, it is not much, but I hope it will help somebody.

I understand that there are tons of docker-compose files online, but most of them I didn’t find simple enough for my needs or just were not good enough.

So in my set-up we have Cardano nodes metrics on remote machine on port 12798 and node exporter on port 9100. All I wanted is just easy as possible and simple to bring up grafana with prometheus.

For this needs I decided to use official images of grafana and prometheus, first of due security and second I do not want to spent too much time to build my own docker image.

At the end all what needed is just to run 5 simple commands to bring up grafana + prometheus. And update prometheus config file in advance.

Here are commands:

apt-get update && apt-get upgrade -y && apt-get install docker-compose -y
mkdir /docker && cd /docker
git clone https://github.com/os11k/grafana-with-prometheus.git
cd ./grafana-with-prometheus/

Here we will need to update ./etc-prometheus/prometheus.yml, just update relay1, relay2 & producer hostnames or change them to IPs. If you need more relays, just add one more below if you need just one, remove that part of config file for relay 2. At the end to bring up everything, just run:

docker-compose up -d --build

I hope it will save some time to anybody. If you have questions or comments, please let me know.

1 Like