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

Filter EMS queue from host within a particular host group in Entity selector

Hillman
Contributor

Hi all,

I am working on the auto-tagging to add an "Environment" tag to EMS queues.

However, the only properties available in the Tibco EMS queue is only host name and port number

Hillman_1-1732784607270.png

I know how to filter the queues by hard-coding the host name

type(tibco:queue),host("<host1>","<host2>")

and filter the host name based on host group

type(host),tag(host-group:<host-group name>)

However, is there any way that we can merge 2 queries together such that we can provide host name based on a particular host group?

5 REPLIES 5

Hi @Peter_Youssef 

Thank you for the documents provided. However, in this tenant, we are monitoring both SIT and UAT environment. They have their own EMS servers but the queues are using the same name. Here comes the issue, the type(queue) seems to mix up the data of the same queue name, even though they come from different host group

Hillman_0-1733111948562.png

If we want to separate the queue from different environment with different tags, e.g. uat2 and sit2, we cannot use the message queue type. Only type(tibco:queue) is feasible as it maps to a particular host.

Hillman_1-1733112050592.png

However, I am still struggling with the query. It seems there are not much relationship can be defined for tibco:queue

Hillman_1-1733108827666.png

Hillman

Hi @Hillman ,

I think for linking queues with hosts you can have to relate first with a queue with a queue instance, a queue instance with a queue or queue with a service.

Let me give you some examples:

type("QUEUE_INSTANCE"),fromRelationship.isInstanceOf(type("QUEUE"),entityName.startsWith("queue_name")),fromRelationship.runsOnHost(type("HOST"),entityName.startsWith("hostname"))

type("QUEUE"),toRelationships.isInstanceOf(type("QUEUE_INSTANCE"),entityName.equals("queue_instance"),fromRelationship.runsOnHost(type("HOST"),entityName.equals("hostname")))

type("QUEUE"),toRelationship.listensOnQueue(type("SERVICE"),entityName.in("service_name"),fromRelationship.runsOnHost(type("HOST"),entityName.equals("hostname")))

I think it's not possible to relate queues with hostgroups. But with hosts it's possible as you can see.

Hope it helps.

Regards,

Elena.

Hi @erh_inetum ,

As I have mentioned above, the queues returned from type(queue) are mixing up the 2 environments together. That does not suit our case as we want to assign different tags to the queues from different environments.

I am still trying to figure out what relationships does type(tibco:queue) support.

Regards,
Hillman

Hillman
Contributor

I have used Dynatrace API to get the entity and see what kind of relationship does the type(tibco:queue) have. The only relationship it has got is a tibco broker

Hillman_0-1733126560486.png

At the end, I can only match the pattern with tibco broker name as it contains the hostname which is the only way to identify the environment.

 

type(tibco:queue),fromRelationships.isChildOf(type(tibco:broker),entityName.Contains(<partial_string_of_hostname>))

 

 

Hillman

Featured Posts