Commit c6bd4b75 authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added exception digest to elk logging. [skip ci]

parent 9eaca8b5
......@@ -154,7 +154,10 @@ class LogstashFormatter(logstash.formatter.LogstashFormatterBase):
if key in ('event', 'stack_info', 'id', 'timestamp'):
continue
elif key in ['exception']:
pass
digest_value = str(value)
if len(digest_value) > 256:
digest_value = digest_value[:256]
message['exception.digest'] = digest_value
elif key in (
'upload_id', 'calc_id', 'mainfile',
'service', 'release'):
......
......@@ -26,6 +26,36 @@ content-type: application/json
DELETE http://localhost:9200/calcs HTTP/1.1
###
# Get errors from ELK
GET http://localhost:29200/logstash-2019.03.27,logstash-2019.03.26/_search HTTP/1.1
content-type: application/json
{
"size": 10,
"query": {
"match": {
"level.keyword": "ERROR"
}
},
"aggs": {
"event": {
"terms": {
"field": "event.keyword",
"size": 100
},
"aggs": {
"upload_path": {
"terms": {
"field": "nomad.migration.upload_path.keyword",
"size": 100
}
}
}
}
}
}
###
POST http://localhost:9200/calcs/_update_by_query HTTP/1.1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment