-
Hi, I'm trying to write alert text with arguments, I cannot use alert_text: |-
- Date/Time: {0}
- Host: {1}
- IP: {2}
alert_text_args:
- "@timestamp"
- host.hostname
- host.ip[1] OUTPUT:
the data: "host": {
"hostname": "computer",
"os": {
"build": "value",
"kernel": "value",
"name": "value",
"type": "windows",
"family": "value",
"version": "10.0",
"platform": "value"
},
"ip": [
"ipv6",
"ipv4"
], How can I output the IP? thanks in advance |
Beta Was this translation helpful? Give feedback.
Answered by
jertel
Dec 30, 2022
Replies: 1 comment 4 replies
-
Your syntax looks correct. In fact we now have a unit test that proves this syntax works. See this commit: 759f19f Since yours isn't working I suspect two possible problems:
|
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
jertel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your syntax looks correct. In fact we now have a unit test that proves this syntax works. See this commit: 759f19f
Since yours isn't working I suspect two possible problems:
ip
value is not actually a list. You will need to enable debug logging and view the result records coming back from Elasticsearch to confirm this.host.ip
. I think this is unlikely but I wanted to mention it just in case you spot something like this in your results.