Select to view content in your preferred language

Expression Builder issue for Selecting a Host by Multiple Labels in ArcGIS Monitor 2023.2

521
2
12-15-2023 10:21 AM
BHK
by
Occasional Contributor

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.

 

BHK_3-1702664440348.png

 

 

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'"
    }
  ]
}

BHK_1-1702664128911.png

 

The Test is not returning anything for Metrics.

BHK_2-1702664281252.png

 

Can you please let me know why this is happening and how to fix it?

 

 

Tags (1)
0 Kudos
2 Replies
Pat_Gallagher
Regular Contributor

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.

Pat_Gallagher_0-1702910222238.png

 

0 Kudos
TristanMcHardie
Regular Contributor

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:

 

TristanMcHardie_1-1704752426774.png

0 Kudos