Since it's nice to monitor your setup, follow the Grafana/Prometheus installation step bellow:
The cardano_monitor
image contain both NodeExporter and Prometheus to run along your node.
To help you understand how all pieces are bound together, here's a small diagram:
-
Set the architecture variable to your requirement (Only amd64 and arm64 supported):
ARCHITECTURE=<PROCESSOR_ARCHITECTURE(amd64 or arm64)>
-
Build the cardano_monitor image:
docker build \ --build-arg ARCHITECTURE=${ARCHITECTURE} \ -t cardano_monitor:latest \ ./Dockerfiles/monitor
-
Build the grafana image:
docker build \ -t grafana:latest \ ./Dockerfiles/grafana
Now you've created yours monitoring images, it's time to create your config
folder.
Your cardano_monitor
container will bind to this folder, so you can access your configuration from within.
mkdir config
cd config
Your user living inside your container need to have access to your configuration file. Add public read permission to all your files under /config
:
chmod 644 config/*
You can now copy the following config file in this folder:
If your not using docker-compose, create the container as follows:
docker run -dit \
--network host \
--name cardano_monitor cardano_monitor:latest
Since you don't need to run a Grafana web server on every cardano-node host, it's container creation isn't included
in the docker-compose.yml
file. Use the following command to create its container in a location of your choosing.
Go in the same folder where you've created your config
folder and run the following command:
docker run -dit \
--network host \
--mount source=grafana-data,target=/cardano/grafana/data \
--mount type=bind,source="$(pwd)"/config,target=/cardano/config,readonly \
--name grafana grafana:latest
** Tips: Just remove the bind mount
line if you're good with the provided configuration file.