zalando / zmon

Real-time monitoring of critical metrics & KPIs via elegant dashboards, Grafana3 visualizations & more
https://demo.zmon.io/
Other
359 stars 47 forks source link

Docker compose fails to run all checks #44

Open avb1989 opened 6 years ago

avb1989 commented 6 years ago

Starting with docker-compose causes all the checks to fail to execute and the dashboard is just completely red (due to failed evaluations). image

This is because the entities (example) are referring to localhost and these aren't reachable from the worker.

[16:19:39] user@machine:~/zmon/compose$ docker exec -it compose_worker_1 bash
root@9bc16fbd1363:/#
root@9bc16fbd1363:/# curl -k https://localhost:8443/health
curl: (7) Failed to connect to localhost port 8443: Connection refused
root@9bc16fbd1363:/#
root@9bc16fbd1363:/# curl -k https://controller:8443/health
{"timestamp":1537712390748,"status":404,"error":"Not Found","message":"Not Found","path":"/health"}
root@9bc16fbd1363:/# 
root@9bc16fbd1363:/# exit
[16:20:00] user@machine:~/zmon/compose$

I think there are a couple of solutions here :

  1. Duplicate entities for docker compose and use services names instead of localhost (to preserve Vagrant stuff)
  2. Use host networking (might be insecure though)
avb1989 commented 6 years ago

I can work on this if it is fine

Jan-M commented 6 years ago

Imho the Vagrant case could be considered obsolete, it was just too cumbersome and failure prone. If docker compose works that sounds like a good thing to achieve.

avb1989 commented 6 years ago

I did try to run it locally and it failed at running Virtualbox. docker-compose on the other hand ran flawlessly except it failed in running the checks :sweat_smile: .