1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

add unparsed_line field if line cannot be parsed

This commit is contained in:
Kelly Brazil
2021-05-04 19:04:16 -07:00
parent c2af7d113e
commit a1fe7037e5

View File

@ -36,6 +36,7 @@ Schema:
"responses": [
{
"type": string, # 'reply', 'timeout', 'unparsable_line', etc. See `_error_type.type_map` for all options
"unparsed_line": string, # only if an 'unparsable_line' type
"timestamp": float,
"bytes": integer,
"response_ip": string,
@ -395,7 +396,8 @@ def _linux_parse(data):
}
except Exception:
response = {
'type': 'unparsable_line'
'type': 'unparsable_line',
'unparsed_line': line
}
ping_responses.append(response)
@ -558,7 +560,8 @@ def _bsd_parse(data):
}
except Exception:
response = {
'type': 'unparsable_line'
'type': 'unparsable_line',
'unparsed_line': line
}
ping_responses.append(response)
@ -578,7 +581,8 @@ def _bsd_parse(data):
}
except Exception:
response = {
'type': 'unparsable_line'
'type': 'unparsable_line',
'unparsed_line': line
}
ping_responses.append(response)