inCaller / prometheus_bot

Telegram bot for prometheus alerting
MIT License
397 stars 183 forks source link

Docker container constantly in restarting state #65

Open blazejobiala opened 3 years ago

blazejobiala commented 3 years ago

Hello,

I have set up telegram bot with the manual steps but after starting up, container stays in restarting phase and because of this I am not able to receive any alterts on Telegram channel.

What can I see in logs is: 2021/06/21 13:38:45 Load template file:/etc/telegrambot/template.tmpl 2021/06/21 13:38:45 Authorised on account mine_alerts_bot Can anyone help here, please?

alopanov commented 3 years ago

Hello, faced with similar issue, reason - my misconfigure, I changed in Docker file listen parameter and missed ":" symbol, so, program tried to listen portname as hostname, instead of port as port. I.e. in my Dockerfile was: CMD ["/prometheus_bot", "-c", "/etc/telegrambot/config.yaml" , "-l", "9089"

Correct version is: CMD ["/prometheus_bot", "-c", "/etc/telegrambot/config.yaml" , "-l", ":9089"

Regards, Alexander.

mulderx commented 3 years ago

Hello,

I have set up telegram bot with the manual steps but after starting up, container stays in restarting phase and because of this I am not able to receive any alterts on Telegram channel.

What can I see in logs is: 2021/06/21 13:38:45 Load template file:/etc/telegrambot/template.tmpl 2021/06/21 13:38:45 Authorised on account mine_alerts_bot Can anyone help here, please?

hi can you give me the docker run cmd?

docker run -p 9089:9089 -v $pwd/config.yaml:/config.yaml --name telegram-bot alertmanager-telegrambot:1.0

the log is 2021/09/23 19:37:04 Problem reading configuration file: open config.yaml: no such file or directory

thank you