VictoriaMetrics / VictoriaMetrics

VictoriaMetrics: fast, cost-effective monitoring solution and time series database
https://victoriametrics.com/
Apache License 2.0
12.43k stars 1.23k forks source link

Docker image and alermanager web.hook error #995

Closed wallflower closed 3 years ago

wallflower commented 3 years ago

Describe the bug I was trying out your docker image (https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker) and the logs were filling up with the following error:

alertmanager       | level=warn ts=2021-01-06T15:08:33.086Z caller=notify.go:674 component=dispatcher receiver=web.hook integration=webhook[0] msg="Notify attempt failed, will retry later" attempts=1 err="Post \"http://127.0.0.1:5001/\": dial tcp 127.0.0.1:5001: connect: connection refused"

I added port 5001 to the alertmanager's port configuration in the docker-compose file but that did not fix the error.

I am not sure if you want that port opened for custom receivers to alertmanager or that should be done against vmalert (I haven't got that far in my investigation/learning yet), But I assume you don't want the logs being filled up with that error.

Version 1.5.1

hagen1778 commented 3 years ago

Hi @wallflower! The http://127.0.0.1:5001 addr is a webhook receiver configured in Alertmanager by default. And Alertmanager is present there just so vmalert may connect to it and send alerts. There is no service which listens for webhook or any other receiver. It is just an example of how things could be connected together and it is assumed that users will update Alertmanager config with their own settings and receivers list.

hagen1778 commented 3 years ago

@wallflower the issue has been fixed in https://github.com/valyala/VictoriaMetrics/commit/7327ce95b84abd65e8b686e8cc7edd5b87959814. The fix will be included into the next release.

valyala commented 3 years ago

The bugfix has been included in v1.52.0 release. Closing the issue as fixed.

wallflower commented 3 years ago

Thank you so much! Works great.