Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

structured output to tcp socket #166

Open
windelbouwman opened this issue Dec 8, 2020 · 4 comments
Open

structured output to tcp socket #166

windelbouwman opened this issue Dec 8, 2020 · 4 comments

Comments

@windelbouwman
Copy link

Hi!

This tracing tool is cool! Is there an option to route the events as timestamp/message pairs in either json / cbor format into a tcp/ip pipe? I would like this to be able to visualize them in a trace visualizer.

For example, my own visualization toolie (https://github.com/windelbouwman/lognplot) can ingest (timestamp,message) pairs over a tcp link. For this to work, I would write a python script that takes the strace output, and forwards it in the proper format.

@windelbouwman
Copy link
Author

Follow up question: what would it take to add a different output format to strace? I looked into the code, and a lot of code boils down to tprintf-ing to the currently active tcb. Would it be worth it to support different output formats? For example, JSON, XML and these kind of thing? Maybe in a row oriented fashion, such that on each logline an event is emitted?

@SamB
Copy link

SamB commented Mar 10, 2021

Hmm. Well, I guessd you could use --output='|nc host.example.com 1337' along with a structured output flag, once #169 gets implemented. See https://manpages.debian.org/unstable/netcat-openbsd/nc.1.en.html for details on nc ("net cat").

Or for this particular application, I guess you would just stick your python script in there and it could convert the structured format (once it exists) to the form your server is expecting.

@windelbouwman
Copy link
Author

Yup, this would work. A machine parseble structured output in any shape would be great, together with nc this would work.

@rchateauneu
Copy link

For example, JSON, XML and these kind of thing?

Outputting RDF triples would be great, because strace logs could be fed into a graph database, for example to investigate with SPARQL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants