What I need is to loop through all of the records from a DQL output and have it formatted in a human-readable format.
Here is my DQL query
timeseries percent = avg(dt.host.disk.used.percent), by: { dt.entity.host, dt.entity.disk }, filter: { in(dt.entity.host, classicEntitySelector("type(host),tag(\"Business Unit:FINANCE\")")) }
| fields util = abs(arrayAvg(percent)), entityName(dt.entity.host)
| fieldsRename dt.entity.host.name, Host
…which if I use get_disk_stats.records, equivalent to {{ result(“get_disk_stats”)[“records”] }}, I get the following output:
[
{
"Host": "WIN11023.corporate.org",
"util": 73.14564947430772
},
{
"Host": "WIN19876.corporate.org",
"util": 49.68959838117046
},
{
"Host": "WIN11234.corporate.org",
"util": 37.80735823445836
},
{
"Host": "WIN15678.corporate.org",
"util": 69.33072939353247
},
{
"Host": "WIN19987.corporate.org",
"util": 37.659657944489574
},
{
"Host": "WIN12045.corporate.org",
"util": 42.12913605995685
},
{
"Host": "WIN13456.corporate.org",
"util": 0.5479891637632675
}
]
How do I code the for loop within the input itself or in the ‘Options’ menu?
