Replies: 2 comments
-
Do you mean the corresponding image below? elastalert/alerters/telegram.py add self.telegram_parse_mode = self.rule.get('telegram_parse_mode', 'markdown') modify 'parse_mode': 'markdown', elastalert/schema.yaml add telegram_parse_mode: {type: string, enum: ['markdown', 'html']} Documentation update docs/source/ruletypes.rst#telegram |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for your help, @nsano-rururu! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use ElastAlert2 to send alerts to Telegram from Suricata IDS. I insert the signature name to the alert text. Sometimes there is even number of '_' in the signature name (e.g.
ET EXPLOIT Apache log4j RCE Attempt (http ldap) (CVE-2021-44228)
- zero '_'), but sometimes not (e.g."ET WEB_SERVER HP OpenView Network Node Manager Remote Command Execution Attempt"
- 1 opened '_') and therefore I receive an error, because markdown is invalid:I don't think this is a good idea to go through all Suricata signatures and change the name of every signature deleting all '_' (there always will be new signatures).
Because ElastAlert2 generates alert_text and sends the resulting text to Telegram, the right way is to solve this problem in ElastAlert2. Could you please change
parse_mode
in telegram alerter tohtml
here? HTMLparse_mode
could be more independent of alert text.Or maybe you could provide separate option for
parse_mode
, so it would be possible to set this option in alert rule? (like already settingtelegram_bot_token
,telegram_api_url
, etc)Beta Was this translation helpful? Give feedback.
All reactions