From a high-level point of view, I need a workflow which grabs a DQL query of disk free as a percentage and then sends that as a Teams message.
This is what I have as my first flow (the 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_DEPT\")")) }
| fields util = arrayAvg(percent), entityName(dt.entity.host)
It will then output this in a raw JSON format with the function get_disk_stats_title.records
[{"util":37.81379436933137,"dt.entity.host.name":"exampleserver_1"},{"util":0.48663042982483673,"dt.entity.host.name":"WNCDKS01.corp.net"},{"util":49.254119519423064,"dt.entity.host.name":"WNBX103.corp.net"},{"util":37.62645628433896,"dt.entity.host.name":"exampleserver_4"},{"util":69.18935581114691,"dt.entity.host.name":"exampleserver_5"},{"util":71.16928194761574,"dt.entity.host.name":"exampleserver_6"},{"util":40.62837394704024,"dt.entity.host.name":"exampleserver_7"}]
Im trying to use the adaptive cards but not sure how to format it to generate a human-readable card?