cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problems API - filtering by management zone

olegus
Helper

I observe weird behavior with this endpoint. I want to get all problems with certain severity for a date range for a specific MZ. It kinda works, but management zone selector in this case works as "contains" or "starts with" , not equal. I have two zones, lets say MyZone and MyZoneNextGen and whenever I add management zone selector for "MyZone" to a problem selector I receive back problems for both zones. I have  other zones that have completely different names and I do not get problem for those so I believe in this particular case management zone selector works incorrectly. My problem selector looks like this -

severityLevel("RESOURCE_CONTENTION","PERFORMANCE","ERROR","AVAILABILITY","MONITORING_UNAVAILABLE"),managementZones(MyZone)
Example:

https://{environmentid}.live.dynatrace.com/api/v2/problems?pageSize=500&problemSelector=severityLeve...

Is it a bug or a feature?

2 REPLIES 2

MuhammadGamal
Observer

 

You can try using: managementZoneIds("mZId-1", "mzId-2")

to filter for specific Management Zones. You can obtain the Management Zone (MZ) ID from the Problems page by applying the MZ filter and capturing the ID from the page title, as shown below.

MuhammadGamal_0-1742936768535.png

 

Hmm, I'll try it, but I call this API from a script that has zone name as a parameter. And AFAIK there is no direct way to get zone ID from API by just zone Name .

Featured Posts