I have a query that returns 2 values
. . . | stats max(gb) as GB by metric_name
metric_name | GB |
storage_current | 99 |
storage_limit | 100 |
Now I want to be able to reference the current and limit values in a radial gauge, how can I covert that table into key value pairs so I can say that the value of the radial is "storage_current"?
something like
|eval {metric_name}={GB}
Use the transpose command to flip the table.
| stats max(gb) as GB by metric_name
| transpose header_field=metric_name
Use the transpose command to flip the table.
| stats max(gb) as GB by metric_name
| transpose header_field=metric_name