cf_get_events
cf_get_events copied to clipboard
BCR output in json
Hello,
I am using bcr-plugin for generating reports for our PCF foundations but is it possible to output the output in json format?
It is a great request. Also had csv in mind for simplified processing in spreadsheet - although google spreadsheet works ok at importing the text table format (#1 )
Could you provide a format of json and field name and structure hierarchy you would like to see for each of --monthly, --ai and --si option the --ai and --si produce multiple tables so the json structure could be somewhat complex The summary sums could be kept or removed if you want to post process items yourselves.
Implementation of this is feasible yet not trivial because
- using currently tablewriter that can write raw char streams to low level Golang io.Writer but has no high level interface
- not sure tablewriter exposes fields I would need to rebuild a json myself
- may need to refactor and introduce an abstraction which is more work
Also kindly provide ideas if you would be fine with --json or would expect some other options on CLI to control this.
It would be great to also understand the post processing you plan to do from the json so that I capture your final use case better.
Kindly also let me know if you would consider doing a pull request or work in a small prototype or if you have no Golang experience to help implement this (fully or partly or not at all)
I need to send BCR data to our inhouse Grafana dashboard and it requires the data to be in json. We can send one row at a time,so I would like to have the data to be generated in json in such a way that it prints the table header as key and the underlying column as value. Is is possible to have the report generated in the above mentioned way? I don't know golang :(
Hi Alexandre, I wrote shellscripts which fetches the desired information from BCR output so for now we can close this issue.