Cloning the grafana tutorials from github, docker coompose up -d, when following the tutorial trying to add a prometheus source the error is “HTTP error Bad Gateway”.
A more thorough inspection shows that the prometheus container has exited after one second. Inspecting the prometheus log shows:
sounds like one of Grafana’s funky user:group permissions issues. See if this comment helps:
fwiw I’ve been revising that tutorial and test it often, so let me know if that doesn’t work and I’ll try to run through the steps on a fresh Ubuntu vm
also, for that fundamentals tutorial, the correct path for adding prometheus is: http://prometheus:9090, and not the ip, as it often is in real situations
Thanks for all your suggestions. I am sorry that I don’t understand them very well. The instructions tell me to clone the github repository, check if docker is running (it does) and run docker-compose up. I checked the volumes this time and it creates two: one with an internal docker name and one called ‘tutorial-environment_app_data’.
I cleared all volumes, checked that no containers were running and chown the prometheus directory to 472:472 (later 132:142 because I found out that was user:group grafana) and did a chmod 777 on prometheus and prometheus/prometheus.yml.
The same error persisted. And I think that is because it expects the config files should have the correct permissions in the docker container itself. Is that the case?