Telegram Notifications not working

hello all ,

I have tried to configure Netdata to send notifications through Telegram but it doesn’t seem to work even though I followed the steps in

In the error log I see

go.d ERROR: prometheus[telegram_bot_for_alertmanager_local] Get “http://127.0.0.1:9087/metrics”: dial tcp 127.0.0.1:9087: connect: connection refused

go.d ERROR: prometheus[telegram_bot_for_alertmanager_local] check failed

Any Idea why isn’t working ? and I noticed it asking for something called prometheus but I don’t recall installing it or needed in the steps

Thanks in advance !

Hi, @Jh400. The errors are not related to sending notifications, ignore them.

Any Idea why isn’t working ?

Check Testing Notifications. The script debug output should help in debugging.

Thank you for the feedback @ilyam8

This is the debugging output of one of the roles

SENDING TEST WARNING ALARM TO ROLE: sysadmin

2022-11-01 19:20:26: alarm-notify.sh: DEBUG: Loading config file ‘/usr/lib/netdata/conf.d/health_alarm_notify.conf’…
2022-11-01 19:20:26: alarm-notify.sh: DEBUG: Loading config file ‘/etc/netdata/health_alarm_notify.conf’…
2022-11-01 19:20:26: alarm-notify.sh: DEBUG: Cannot find sendmail command in the system path. Disabling email notifications.
2022-11-01 19:20:26: alarm-notify.sh: DEBUG: Cannot find aws command in the system path. Disabling Amazon SNS notifications.
— BEGIN curl command —
/usr/bin/curl --data-urlencode parse_mode=HTML --data-urlencode disable_web_page_preview=true --data-urlencode $‘text=\342\232\240\357\270\217 JH400 needs attention - test alarm\ntest.chart (test.family)\ntest alarm = new value\nthis is a test alarm to verify notifications workhttps://api.telegram.org/bot[Bot ID]/sendMessage?chat_id=[Telegram Group ID]
— END curl command —
— BEGIN received response —
{“ok”:false,“error_code”:400,“description”:“Bad Request: group chat was upgraded to a supergroup chat”,“parameters”:{“migrate_to_chat_id”:[Telegram Group ID]}}
— END received response —
RECEIVED HTTP RESPONSE CODE: 400
2022-11-01 19:20:27: alarm-notify.sh: ERROR: failed to send telegram notification for: JH400 test.chart.test_alarm is WARNING to ‘[Telegram Group ID]’ with HTTP response status code 400.

FAILED

I have Removed the ID of Telegram bot and Group

I found out why…so stupid for not checking this out from the first place , It seems When the group is upgraded to supergroup , the ID was changed

since this is my first time dealing with Telegram bot , it’s a new thing to learn and remember !