Skip to content

Add custom variable in global config.yml for use in rule configs #1120

Locked Answered by jertel
luminous706 asked this question in Q&A
Discussion options

You must be logged in to vote

Your command line args can contain references to match fields, as documented. However, I don't believe that will have access to config key/values. However, you have a couple of options:

  1. You can write a tiny enhancement to add custom keys/values to the match dict. The enhancement will have access to the rule config, so any key/values in there can also be copied into the match dict.

  2. You can use the alert body text and args, which do allow references to config or rule key/values, combined with the pipe_alert_text setting (see documentation referenced earlier) to pipe this in the form of JSON into your command.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@luminous706
Comment options

Answer selected by luminous706
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants