alexvasseur / cf_get_events

Cloud Foundry CLI plugin to report on APP, App Instance, Memory, Velocity, Service instance and Members per Org/Space & totals.
14 stars 2 forks source link

BCR output in json #8

Open omkarphadke84 opened 5 years ago

omkarphadke84 commented 5 years ago

Hello,

I am using bcr-plugin for generating reports for our PCF foundations but is it possible to output the output in json format?

alexvasseur commented 5 years ago

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

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)

omkarphadke84 commented 5 years ago

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 :(

omkarphadke84 commented 5 years ago

Hi Alexandre, I wrote shellscripts which fetches the desired information from BCR output so for now we can close this issue.