Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telegram push target support #341

Merged
merged 1 commit into from
Sep 4, 2023
Merged

Telegram push target support #341

merged 1 commit into from
Sep 4, 2023

Conversation

fjogeleit
Copy link
Member

@fjogeleit fjogeleit commented Sep 4, 2023

@EsDmitrii first draft of the Telegram Push Target support

  • Requires Bot Token and ChatID
  • Token can be provided as Secret or MountVolume
  • Routing (Channel) support and TLS configuration
telegram:
  chatID: "5235626040"
  token: "XXXXXXX:AAHmp3nGzcXIg-GALcxXFUv3IS5j2clwqiQ"
  minimumPriority: "warning"
  skipExistingOnStartup: true
  customFields:
    cluster: Minikube
Bildschirmfoto 2023-09-04 um 12 04 10

@fjogeleit fjogeleit linked an issue Sep 4, 2023 that may be closed by this pull request
@EsDmitrii
Copy link

hooray!
awesome!

@EsDmitrii
Copy link

can you additionally specify variable for proxy url?
maybe someone will use it in closed systems via proxy ( me :) )

@fjogeleit
Copy link
Member Author

fjogeleit commented Sep 4, 2023

Sure, how will this look like? Currently the API is configured with: https://api.telegram.org/bot%token%/sendMessage. Do you need also some kind of token placeholder, or would the token send as header?

Or should I provide an optional Host instead of token, where your token is included?

@EsDmitrii
Copy link

I don't know how to make it in Go, but for python it's looks like this https://github.com/eternnoir/pyTelegramBotAPI#proxy
via apihelper.proxy

@EsDmitrii
Copy link

EsDmitrii commented Sep 4, 2023

@fjogeleit
Copy link
Member Author

Ok, I think I understood. So I added a optional Host property, which can be overwritten with a proxy and defaults to the telegram API. This should provide the functionality you need.

The Host can be set over a secret/mountVolume like the token or directly in the config.

telegram:
  host: https://localhost:9090
  chatID: "5235626040"
  token: "XXXXXXX:AAHmp3nGzcXIg-GALcxXFUv3IS5j2clwqiQ"
  minimumPriority: "warning"
  skipExistingOnStartup: true
  customFields:
    cluster: Minikube

@EsDmitrii
Copy link

awesome, thank you!

Signed-off-by: Frank Jogeleit <[email protected]>
@fjogeleit fjogeleit merged commit 83366ac into main Sep 4, 2023
2 checks passed
@fjogeleit fjogeleit deleted the telegram-target branch September 4, 2023 11:51
@fjogeleit
Copy link
Member Author

fjogeleit commented Sep 4, 2023

I plan to release it end of the week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Telegram notifications
2 participants