Closed Kolano closed 6 years ago
it's possible to modify the output by adding your own output formatter, it does take some work but ultimately it's worth it, i can give you some pointers if you wish.
Thanks, that would be appreciated. I'm generating SQL output, and currently have to push everything through trim() calls to clean things up.
The output formater uses these spaces for display reason. I perfectly understand, that postprocessing the data requires trimming spaces. I would rather like to add json output format to nfdump rather than having a trim option for each and every field. For the time being, please postprocess the output and trim the space.
Wasn't asking for many individual options, just a single one to omit the indentation spaces from output.
Is there any documentation on "adding your own output formatter"?
Using nfdump with a custom format, such as...
nfdump -R /var/cache/nfdump/ -o "fmt:'%ts', '%te', '%td', '%sa', '%da', '%sp', '%dp', '%pr', '%byt', '%pkt', '%fl', '%flg', %ibyt, %obyt)," -a -q -6
...results in output like......where spaces used to align columns are included in each %XXX field rather than adjoining them.
Those spaces should be output separately from the data points and/or options provided to not make use of them.