-
What Grafana version and what operating system are you using?
Grafana v11.2.0 (c57667e448) -
What are you trying to achieve?
Display logs in text format form MYSQL database -
How are you trying to achieve it?
Using Table or Stat visualization -
What happened?
Grafana Table/Stat visualization does not interpret \n as a new line -
What did you expect to happen?
\n to be interpreted as new line
In MYSQL db, I am saving logs in the format shown below:
In Grafana, I want to be able to read the Log text and display it nicely. For example the Log data may contain:
'R3,198862.55 - 219795.45,215791 \r\n R4,11754.35 - 12991.65,12496 \r\n C20,0.001 - 0.002,0.001610\n
In Grafana query I do the following:
SELECT 'R3,198862.55 - 219795.45,215791 \r\n R4,11754.35 - 12991.65,12496 \r\n C20,0.001 - 0.002,0.001610\n' AS Log;
The following data is displayed:
I have also tried the same using Stat visualization:
As you can see from screenshots above, the Log is displayed in a single line even though I have \n\r to separate the text in separate lines.
How can I ensure that Grafana parses new line properly?