influxdata / influxdata/kapacitor
kapacitor - telegram error : dial tcp 149.154.167.220:443: i/o timeout
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
Hi,
I am using kapacitor version: kapacitor-1.5.7-1.x86_64. and trying to send alert through telegram.
PFB kapacitor config:
**[telegram]
enabled = true
url = "https://api.telegram.org/bot"
token = "1234:AAAA-BBBB"
chat-id = "-***111***"
parse-mode = "Markdown"
disable-web-page-preview = false
disable-notification = false
global = false**
also added telegram into TICKSCRIPT:
.log('/tmp/telegram-disk.log')
.telegram()
.chatId('-111')
.parseMode('Markdown')
but I am getting below error in log:
**ts=2021-03-31T15:53:07.757+05:30 lvl=error msg="failed to send event to Telegram" service=telegram task=chronograf-v1-e73925dd-30e1-4fa8-8879-966dd6b448d1 err="Post https://api.telegram.org/bot1234:AAAA-BBBB/sendMessage: dial tcp 149.154.167.220:443: i/o timeout"**
where it may possible that i/o timeout error throws because of proxy issue.
but here is this case I can run successfully through curl command from the same server.
**curl https://api.telegram.org/bot1234:AAAA-BBBB/sendMessage -F chat_id=-***111*** -F text="hello"**
_{"ok":true,"result":{"message_id":36,"from":{"id":1763934750,"is_bot":true,"first_name":"Tools","username":"Tools_bot"},"chat":{"id":-111,"title":"Tools","type":"group","all_members_are_administrators":true},"date":1617186495,"text":"hello"}}_
I am not sure what is the cause of this error, is it from server proxy (then it should throw error while running from server itself ) /
else I need to modify any setting to kapacitor configuration.
please help me here.
Contributor guide
Research direction
Start with the Kapacitor Telegram configuration and the TICKscript shown in the issue, then compare their behavior with the successful curl request and the logged timeout. Determine whether the Telegram notification path needs proxy or connection handling changes; done means the configured task sends a Telegram alert successfully and the timeout cause is documented or fixed.
Written by the indexing model from the issue text.
Assessment
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100