Hi I am having json data, below is the sample snippet attached:
{
"GNBID": "1153",
"beginTime": "1667535381",
"counters": {
"applevel": {
"OR.ENDCPROCEDURE": {
"SgnbAddAttemptNeiEnb.neighboreNB.0": "1.00",
"SgnbAddAttemptNeiEnb.neighboreNB.1": "0.00"
}
},
"cellId=153": {
"OR.ENDCPROCEDURE": {
"SgnbAddAttemptCell": "0.00"
}
},
"cellId=155": {
"OR.ENDCPROCEDURE": {
"SgnbAddAttemptCelltwo": "0.00"
}
}
},
"endTime": "1667535381",
"swVersion": "6.5.04.072"
}
I want to get below 3 metrics with a tag named cell with values as “applevel”,“153” and “155”, rest of the tags would be same and the fields depends on cell.
Currently I was using - unpivot, starlark, pivot and aggregator plugin combination. However, it is not working fine. Is there any way to do that?
I thought of getting tag names using starlark processor after looping through every fields and generate 3 metrics from 1 metric, but that approach is taking too much time. Any way to optimize that?