-
What Grafana version and what operating system are you using? 11.2.2
-
What are you trying to achieve? trying to remove the square brackets and quotation marks from data in a Grafana table
-
How are you trying to achieve it? Trying to achieve it by using a transformation - Rename fields by regex, using this regex - ```
.[([^]])].* -
What happened? Nothing changed
-
What did you expect to happen? Square brackets and quotation marks removed from the data in question
-
Can you copy/paste the configuration(s) that you are having problems with? Below is an example of what we have
[“hostname.com”]
what we would like to see is just the hostname.com data -
Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were. No errors at all
-
Did you follow any online instructions? If so, what is the URL? Tried using a regex and it worked in regex101 but not in our Grafana instance - How can remove a specific part of items that is showing in dahboard - #3 by ldrascic
Is that the field name or the data within
Also what is your datasource
It’s the data within and the datasource is from an API call from a Network Performance tool
Its nearly there as it works on the variable but not when I attempt to use it on the transformation as I think that only does the fields, but want it on a few columns with the square brackets and quotation marks
I am still confused. is it on column names or the data for the column and since your data is from an API should we assume it is json. if so please post sample json data.
Its for the data in the columns and here is a sample with the hostname removed
“content”: {
“columns”: [
“Device Name”,
“Device IP”,
“Module”,
“Instance”,
“Used”,
“Max Used”,
“95th Percentile of Used”,
“Currently Allocated”,
“Recommended Allocation”
],
“rows”: [
[
[
“hostname.example.com”
],
[
“123.123.123.123”
],
[
“Collecting”,
“Collector-Manager”
],
[
“emc-watch4net-health”
],
305.7714876447405,
548.0189819335938,
547.1662719726562,
null,
640
please post proper usable json data. this is not valid json data
so this data you posted is coming straight from the api? that is a most unusual rest api response.
Here is the response from the API call
"time-range": {
"start": 1736411950,
"end": 1736498350
},
"content": {
"columns": [
"Device Name",
"Device IP",
"Module",
"Instance",
"Used",
"Max Used",
"95th Percentile of Used",
"Currently Allocated",
"Recommended Allocation"
],
"rows": [
[
[
"hostname.example.com"
],
[
"123.123.123.123"
],
[
"Collecting",
"Collector-Manager"
],
[
"emc-watch4net-health"
],
305.7714876447405,
548.0189819335938,
547.1662719726562,
null,
640
],
Also I have attached a screenshot of the table with the hostnames scrubbed out
still not a proper json data, please vet it before posting. use tools like notepad++ or some online json validators.
also are you using infinity to fetch your data or json api?
I am using Sublime Text
still waiting for that proper json data from you.
Here is an extract from the JSON
{
"id": "0-t62ce62219462574b-h3be939af6a01bc09-7805d3f1-b5cd464f",
"path": "All/Report Library/System Health/Workload/JVMs Sizing Recommendation",
"name": "JVMs Sizing Recommendation",
"type": "mixed",
"properties": {
"description": [
"<div>\n <p><b>JVM Memory: JVM Memory Allocated and Recommendation</b> <br /> <i>This report helps you to set the ideal memory size for the JVM maximum memory setting (memory.max). The report calculates the proper memory allocation for M&R Modules by computing the 15% of the 95th percentile Used Memory to better utilized the memory resources of your servers.</i></p>\n <p><b>The memory.max setting should be rounded to the nearest multiple of 64: Value between 0 and 64 : 64, Value between 65 and 128 : 128</b></p>\n</div>"
]
},
"time-range": {
"start": 1736682735,
"end": 1736769135
},
"content": {
"child-reports": [
{
"id": "0-t62ce62219462574b-h3be939af6a01bc09-7805d3f1-b5cd464f",
"path": "All/Report Library/System Health/Workload/JVMs Sizing Recommendation",
"name": "JVMs Sizing Recommendation",
"type": "table",
"properties": {},
"time-range": {
"start": 1736682735,
"end": 1736769135
},
"content": {
"columns": [
"Device Name",
"Device IP",
"Module",
"Instance",
"Used",
"Max Used",
"95th Percentile of Used",
"Currently Allocated",
"Recommended Allocation"
],
"rows": [
[
[
"hostname.com"
],
[
"123.123.123.123"
],
[
"Backends",
"Topology-Mapping-Service"
],
[
"Default"
],
152.98027303059894,
250.16700744628906,
214.6194969177246,
1820.5,
256
],
[
[
"hostname.com"
],
[
"123.123.123.123"
],
[
"Collecting",
"Collector-Manager"
],
[
"emc-watch4net-health"
],
118.99920633951824,
144.13499450683594,
134.16951675415038,
1820.5,
192
],
[
[
"hostname.com"
],
[
"123.123.123.123"
],
[
"Collecting",
"Collector-Manager"
],
[
"Generic-SNMP"
],
77.03283233642578,
89.58370208740234,
88.19583244323731,
1820.5,
128
],