Skip to content

Alert Static Payload #381

Closed Locked Answered by ferozsalam
aclowkey asked this question in Q&A
Aug 1, 2021 · 4 comments · 7 replies
Discussion options

You must be logged in to vote

I'm not sure I understand exactly what you're looking to do, but depending on the alerter I think it might be possible.

With this rule:

name: First ElastAlert
type: # Doesn't matter (?)
index: alex_index-*
filter:
- query:
    query_string:
      query: "yes"
# Add static payload to all matches
static_payload: test

You can use the alert_text and alert_text_args arguments like so to get the static_payload value:

alert_text: "payload: {0}"
alert_text_args:
  - static_payload

In this case, the alert_text would be payload: test if the alerter builds its message body using the built-in ElastAlert functionality - most of the alerters do. I think this is what you are looking for?

N.B - ElastAl…

Replies: 4 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@nsano-rururu
Comment options

Comment options

You must be logged in to vote
4 replies
@aclowkey
Comment options

@aclowkey
Comment options

@ferozsalam
Comment options

@aclowkey
Comment options

Answer selected by jertel
Comment options

You must be logged in to vote
2 replies
@ferozsalam
Comment options

@aclowkey
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants