Skip to content

Can top_count_keys be passed to http_post_payload values? #146

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

You must be logged in to vote

When you specify top_count_keys in the rule, ES will respond back with a mapping of the top 5 hostnames and how many times that appeared in the rule match. That mapping of hostnames to counts will be stored into a match key called top_events_hostname. Based on that, in your example, if you replace hosts: top_count_keys with hosts:top_events_hostname perhaps you might get a dictionary of hosts to counts posted to your URL. I've not attempted to do this so it might not work at all.

Disclaimer: I've not used http_post alerts, nor top_count_keys. So take the above worth a grain of salt. All I'm going off of here is a quick skim through the code.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by shahriar52
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