Count Hosts by Custom Metadata or Tags Using DQL

Dear community members,

I need a custom DQL queries for fetching hosts via custom host metadata or Tags.

If there are practical use cases that would be appreciated.

BR,

Peter

@Peter_Youssef You can try the below DQL

fetch dt.entity.host
| fieldsAdd entity.type, monitoringMode,memoryTotal, physicalMemory, tags, managementZones, networkZone
| filter matchesValue(tags, "TIER:GOLD")

Hi @p_devulapalli

thanks for your inputs, I’ll try and keep you posted.

Hi @p_devulapalli

Thanks for your support, I’ve applied the DQL statements as per actual setup, It’s not working.

Are there other DQL Queries to fetch the required Hosts information

KR,

Peter

@Peter_Youssef the above DQL should work fine without any issues , what error do you see when you run the query. Please make sure you are using the right tags as filter to see the hosts

Hey @Peter_Youssef ,
I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you! :blush:
Please let me know what works best for you.