Closed rchicoli closed 6 years ago
this looks cool:
{
"took": 7,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 1,
"max_score": 1,
"hits": [
{
"_index": "docker",
"_type": "log",
"_id": "AWIHV72s5dJofV9tBo-V",
"_score": 1,
"_source": {
"containerID": "5ad82a912d4a",
"containerName": "webapper",
"containerImageName": "rchicoli/webapper",
"containerCreated": "2018-03-08T20:40:11.997781535Z",
"source": "stdout",
"timestamp": "2018-03-08T20:40:13.162255674Z",
"partial": false,
"grok": {
"auth": "-",
"bytes": "207",
"clientip": "127.0.0.1",
"httpversion": "1.1",
"ident": "-",
"rawrequest": "",
"request": "/index.php",
"response": "404",
"timestamp": "23/Apr/2014:22:58:32 +0200",
"verb": "GET"
}
}
}
]
}
}
TODO before releasing:
17.09
grok-pattern
, grok-pattern-file
and grok-pattern-path
When you want to add a custom pattern, use the grok.AddPattern(nameOfPattern, pattern), see the example folder for an example of usage. You also can load your custom patterns from a file (or folder) using grok.AddPatternsFromPath(path), or PatterndDir configuration.
add grok feature