Hi,
I am new to elastic search and I am trying to filter and replace some http Status Codes.
I've got error logs like these:
'Error domain: NSURLErrorDomain Code=-1005'
'HTTP 404 not found'
'Error domain: mycompany.ErrorDomain Code=201'
'Error Domain=NSURLErrorDomain Code=-1005 "The network connection was lost." UserInfo={_kCFStreamErrorCodeKey=53, NSUnderlyingError=0x28358a640 {Error Domain=kCFErrorDomainCFNetwork Code=-1005 "(null)" UserInfo={NSErrorPeerAddressKey=<CFData 0x281802580 [0x1e2c23cf0]>{length = 16, capacity = 16, bytes = 0x10021f4017ed9ccb0000000000000000}, _kCFStreamErrorCodeKey=53, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <9ABFF999-25B7-448E-91DC-B4B8A0DF5496>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <9ABFF999-25B7-448E-91DC-B4B8A0DF5496>.<1>"
), NSLocalizedDescription=The network connection was lost., NSErrorFailingURLStringKey=http://stream.a.txlr.net:8000/;, NSErrorFailingURLKey=http://stream.a.txlr.net:8000/;, _kCFStreamErrorDomainKey=1}'
and so on ...
I want to replace these long messages by just showing the errorcodes (404, 1001,... )
I tried grok but I do not really know how to do this and how tho implement that in the console by using POST / ... / update_per_query.
Can someone help me ?
Thanks !