28 Feb 2025
06:10 PM
- last edited on
03 Mar 2025
10:51 AM
by
MaciejNeumann
Hello Team,
Could you please advise how to extract Management Zone IDs (not the Object IDs) from Dynatrace either by Data Explorer /DQL or API? Tried using API but it's giving only the Object IDs, not the management zone IDs. Thank you.
28 Feb 2025 07:06 PM
Hello Sajarra.
If you head over to the management zone settings (Settings > Preferences > Management Zones > Management Zones Settings) and expand one of the management zones, you'll be able to see the ID.
Hope this helps!
28 Feb 2025 07:22 PM
Thank you for your inputs.. I need to extract the mzIDs for all the MZs (400+) within our environment.
28 Feb 2025 08:20 PM
Could I ask the use case for extracting all the mzID's it may help in finding a solution.
28 Feb 2025 08:38 PM
We are collecting few SLO/Infrastructure metrics from Dynatrace through a Python Script (Based on AppCodes). Since we kept our Prod and DR servers in different MZs, the output is with multiple mzIDs.. To filter Prod data, we needed the mzIDs.
03 Mar 2025 07:36 PM
Found this community post it may help.
Solved: Management Zone ID using Settings Objects Endpoint - Dynatrace Community
07 Mar 2025 08:21 AM
Hi,
If you want to filter production data, I would suggest you filter using tags.
Best regards
07 Mar 2025 02:29 PM
Yes, I can extract the problem events with 'Tags'. Looks like we don't have any options to extract the mzIDs from Dynatrace. Working with Dynatrace consultant for our team and he is checking with Dynatrace Dev (API team). Thank you all your supports.
fetch dt.davis.problems
| fieldsAdd entity.type, timestamp, host.name, display_id, affected_entity_ids, affected_entity_types, Description
| filter matchesValue(entity_tags,"AppCode:XXX")
| sort event.status asc
06 Mar 2025 07:54 PM
Thank you but it's not solving the issue. Through Dynatrace APIs, I'm unable to extract the mzIDs.