Closed Menogus closed 3 years ago
Port 9094 is for the web hook, It appears to me you are trying to run both alertmanager-discord and alertmanager itself on port 9094.
You will either want to change the ports that alertmanager-discord works on, or disable the conflicting port on alertmanager
hm.... so, these two packages (alertmanager and alertmanager-discord) are interchangeable ? I thought alertmanager-discord is an add-on for alertmanager for discord sending... so, if i must use alertmanager-discord instead of alertmanager, i have 3 question:
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
- localhost:9093
alertmanager-discord dont use port 9093... how do i connect to this?
so, these two packages (alertmanager and alertmanager-discord) are interchangeable ?
Nope, However it does appear that the alertmanager HA cluster stuff (that came after alertmanager-discord) has a port conflict with alertmanager-discord.
So you have two options, Either move/disable the HA cluster alertmanager, For example my alertmanager runs with this cmdline:
/usr/bin/alertmanager --config.file /etc/alertmanager.yml --cluster.advertise-address=127.0.0.1:65000 --cluster.listen-address=127.0.0.1:9099
or you can set the LISTEN_ADDRESS
and set alertmanager-discord to listen on another port.
/usr/local/bin/alertmanager --config.file /etc/alertmanager.yml --cluster.advertise-address=127.0.0.1:65000 --cluster.listen-address=127.0.0.1:9099
its works!! thanks :)
but LISTEN_ADDRESS dont work with docker image:((
i set in file envo (try all 3 times):
#LISTEN_ADDRESS=9099
#LISTEN_ADDRESS=localhost:9099
LISTEN_ADDRESS=http://localhost:9099
DISCORD_WEBHOOK=https://discord.com/api/webhooks/xxx/zzzz
after docker run -p 9094:9094 --env-file envo d6 i got 9094: 2021/01/17 08:10:20 Listening on: 0.0.0.0:9094
@Menogus LISTEN_ADDRESS env got override If you look into base Docker image files
ENTRYPOINT ["/go/bin/alertmanager-discord", "-listen.address", "0.0.0.0:9094"]
You can override these ENTRYPOINT by supply your own startup command
alermanager.xml
if i run alertmanager first: root@watcher:~# systemctl start alertmanager
and then docker image:
root@watcher:~# docker run -p 9094:9094 --env-file envo d6 &
i have this error:
if first docker, and then alertmanager, i have same trouble with 9094 port:
how i can solve this problem ??