Using ArcGIS Monitor 2023.2 I have two host (one for Server VM Host and one for Portal VM host ) registered and labeled as below.
Now in Expression Builder when I try to select the specific HOST with 3 labels like below
{
"resource": "components",
"where": "components.type = 'host'",
"having": [
{
"resource": "labels",
"where": "labels.name = 'DEV' AND labels.name = 'STAFF' AND labels.name = 'VMHOST'"
}
],
"join": [
{
"resource": "metrics",
"where": "metrics.r_id = 'cpu_utilized'"
}
]
}
The Test is not returning anything for Metrics.
Can you please let me know why this is happening and how to fix it?
I have been fighting this as well, I ended up using the component name for the system/service that I wanted to monitor to get it to work.
Your query is asking for components attached to a single label that is named DEV and also named STAFF and also named VMHOST, which of course isn't possible because labels can only have one name.
What you need is multiple HAVING clauses which wasn't possible until 2023.3: