reporter
reporter copied to clipboard
Feature request: Export table only
I would like to know if someone has already made a lite version of this project. Instead of rendering images, just a simple piece of code that would read shown table data (or maybe just data with a query) and then convert this to pdf using pdflatex. User would have the possibility to edit the .tex file and setup the desired output style.
In my opinion, the project uses a very clever idea to use latex for exporting to pdf, good an proven way. But the problem becomes the image rendering, which I do think is not even needed. The Grafana has an option for table: Export as CSV, not nearly useful as it would be an export as PDF.
just a simple piece of code that would read shown table data (or maybe just data with a query) and then convert this to pdf using pdflatex.
I am not aware of anything.
Grafana has an option for table: Export as CSV, not nearly useful as it would be an export as PDF.
This is news to me as well. It would make a nice feature to the reporter if that Grafana option is accesable from a Grafana API. Could you link to some Grafana API documentation?
@MarkoBursic The Grafana API does not expose the raw data, since you should be querying the datasource directly for data. Grafana is a visualization tool, not a database.
However Grafana does does provide the query that drives each panel in a dashboard's JSON.
If you're building reports with latex inserting raw data into graphs, you might as well be building a datasource->LaTeX solution.
@onefourfive : I have zero knowledge in Grafana API an JSON. I have found the @IzakMarais project useful the way it uses a LaTex template for generating report. Each Grafana table is different in terms in number of columns, spacing, separating lines, ...etc, It would be difficult to implement an universal report, that allows you to adjust all these settings.
That's why I think, this could have a bright future.
For example: Let we have a table, graph and a report. The table is connected to the arbitrary datasource and it does the query with SQL statemns, or whatever. The query result goes to the intermediate Grafana's datasource: -- Dashboard -- . Therefore a plugin that can connect to the datasource -- Dashboard -- is enough. This plugin could have a button PDF, when pressed it would read the data from -- Dashboard -- and generate a report. It doesn't need to render images from Grafana UI, instead each report shall have its own template.tex file, then it's up to LaTex to visualize the data, it has even more possibilities than Grafana to make nice plots with pgfplot, tables,...everything a nice report needs to have.
@MarkoBursic I understand what you are looking for-- I'm just saying that raw data is not available from Grafana via API. There is no way to get data directly from Grafana programatically.
Your suggestion that the report gather data from the Dashboard as a datasource is not possible with the current Grafana API.
I'm not really accepting feature requests for this project. Also from the feedback this does not sound possible.