Docker-compose can be used to setup an small stack with prometheus/grafana/haproxy/cloudmonitor_exporter.
- Make sure docker engine is installed (instructions)
- Make sure docker compose is installed (instructions)
- Clone repository
git clone https://github.com/ExpressenAB/cloudmonitor_exporter.git
- Create self-signed certificate by running setup.sh
> cd cloudmonitor_exporter/setup
> ./setup.sh
This will generate a self-signed certificate to use with cloudmonitor_exporter
Enter companyname for certificate:
......
- Start containers by running
docker-compose up
Now we have 4 docker containers running with:
- cloudmonitor_exporter listening on :9143
- haproxy listening on 443 with self-signed certificate for ssl termination
- prometheus scraping localhost:9143
- grafana using prometheus datasource from localhost:9090
The stack can now be tested by running localtest.sh under tests
cd tests
./localtest.sh
Now visit local grafana instance and login with admin/admin