I have two questions that I haven't been able to figure out from the resources available:
-
I'm trying to use extract as described in the documentation to extract one field from the input. I'm not taking out the total of hits as described in the documentation, but rather I'd like to take out a field from my document, but all my trials come to no avail.
"input": {
"search": {
"request": {
"indices": [ ".watcher-history*" ]
},
"extract": [ "ctx.payload.hits.hits._source.Severity" ] #I've also tried a few other iterations to no avail (hits.hits.Severity, hits.Severity, hits._source.Severity)
}
}
My mapping is like this when I send
GET .watcher-history*/_search?pretty
result": {
"execution_time": "2017-02-28T15:27:11.037Z",
"execution_duration": 3,
"input": {
"type": "search",
"status": "success",
"payload": {
"_shards": {
"total": 5,
"failed": 0,
"successful": 5
},
"hits": {
"hits": [
{
"_index": "logstash-2017.02.21",
"_type": "logs",
"_source": {
"date": "Tue, 21 Feb 2017 09:40:44 -0500",
"ProcessName": "example.exe",
"subject": "error problem",
"Priority": "1",
"Severity": "Error",
"PID": "09090"
How can I pull out the "Severity" from the above field in my document?
- I want to make sure that running too many watches wont slow down my system. I'll be running approximately 30 watches running not all at the same moment but spaced out. My question is a) is that too many to run and b) On what machine do watches run on? I have a separate machine for logstash, Kibana, and ES.
Thanks a bunch!