I can see that tags are exposed on the endpoints dataset in XQL but when I inlcude them in a query they appear (vaguely) as key value pairs thus:
"endpoint tags": , "server_tags":["IAN"]
The schema though reports tags as being of type string and not an array
I would like to be able to extract just the server tag value(s) and present that in an XQL query, is that possible?
I have this working, but it still returns the value in double quotes. I've no idea if there is a btter way to a cheive thgis nor if it possible to remove the quotes but this works for me for now
dataset = endpoints | alter server = json_extract(tags,"$.server_tags") | alter server = trim(server,"") | fields endpoint_name as Host_Name, agent_version as Version, server as Server_Tag
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!