How to Display Static File in a Panel

I am using Grafana on a Raspberry Pi Device. I would like to via the dashboard have the user just see the contents of a text file. How would I do that? Very small number of items in the file, but it does get updated during the boot up process. If it is as simple as copying the file to a location I can do that, I just need to know where to put it.

Thanks in advance.

I can’t think of an easy way to do it. Two workarounds:

  • Autogenerate an image of the text file and store it at a URL accessible from wherever you’re displaying the dashboard. Use the grafana text panel and embed the image using the Markdown syntax.
  • Store the text as a metric in your datasource. Create an SVG that is a single text object and update the text to match the text in your datasource using a js script in the “Events” panel of the SVG window.

You can use a microframework like SparkJava and read the file and expose the service as a webservice.
From Grafana configure a simpleJSON datasource and link it to the Panel.
When Grafana Invokes the webservice- The webservice will read the file at runtime and respond back with JSON output to Grafana to render as graph.