mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-25 15:47:23 -04:00
[DOCS] Swap event.original
for message
This commit is contained in:
parent
17e3971f57
commit
07e9c6aca4
1 changed files with 2 additions and 2 deletions
|
@ -111,7 +111,7 @@ GET my-data-stream/_search
|
||||||
"source.ip": {
|
"source.ip": {
|
||||||
"type": "ip",
|
"type": "ip",
|
||||||
"script": """
|
"script": """
|
||||||
String sourceip=grok('%{IPORHOST:sourceip} .*').extract(doc[ "event.original" ].value)?.sourceip;
|
String sourceip=grok('%{IPORHOST:sourceip} .*').extract(doc[ "message" ].value)?.sourceip;
|
||||||
if (sourceip != null) emit(sourceip);
|
if (sourceip != null) emit(sourceip);
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
@ -168,7 +168,7 @@ POST my-data-stream/_async_search
|
||||||
"source.ip": {
|
"source.ip": {
|
||||||
"type": "ip",
|
"type": "ip",
|
||||||
"script": """
|
"script": """
|
||||||
String sourceip=grok('%{IPORHOST:sourceip} .*').extract(doc[ "event.original" ].value)?.sourceip;
|
String sourceip=grok('%{IPORHOST:sourceip} .*').extract(doc[ "message" ].value)?.sourceip;
|
||||||
if (sourceip != null) emit(sourceip);
|
if (sourceip != null) emit(sourceip);
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue