CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
Currently, traceroute does not support streaming IO parsing. Given that traceroute can sometimes take a long time to complete, it would be beneficial in many cases to receive data via a stream as it becomes available, rather than waiting for the entire command to finish.
Proposal
I propose implementing a new feature, traceroute-s, which would return data in a streaming format. This would allow for real-time processing of traceroute data as it's generated.
Response Format
The streaming parser would return data in the following JSON format:
{
"type": "string", # 'header', 'hop', 'error',
"destination_ip": "string",
"destination_name": "string",
"hops": [
{
"hop": "integer",
"probes": [
{
"annotation": "string",
"asn": "integer",
"ip": "string",
"name": "string",
"rtt": "float"
}
]
}
],
# below object only exists if using -qq or ignore_exceptions=True
"_jc_meta": {
"success": "boolean", # false if error parsing
"error": "string", # exists if "success" is false
"line": "string" # exists if "success" is false
}
}
Implementation Status
I have already implemented this feature in a fork of traceroute-s.
If this proposal is accepted, I'm ready to submit it as a Pull Request.
Overview
Currently, traceroute does not support streaming IO parsing. Given that traceroute can sometimes take a long time to complete, it would be beneficial in many cases to receive data via a stream as it becomes available, rather than waiting for the entire command to finish.
Proposal
I propose implementing a new feature, traceroute-s, which would return data in a streaming format. This would allow for real-time processing of traceroute data as it's generated.
Response Format
The streaming parser would return data in the following JSON format:
Implementation Status
I have already implemented this feature in a fork of traceroute-s. If this proposal is accepted, I'm ready to submit it as a Pull Request.