Negate Multiple IBM MQ Local Queues in the Entity Selector

Dear All,

How can we negate multiple IBM MQ local queues in the entity selector while applying automatic tagging?

Regards,

Babar

Hi @Babar_Qayyum ,

I suggest trying one of the following sample queries:

  1. type(ibmmq:local_queue), entityName.in(“queue1”, “queue2”), not(entityName.in(“queue3”, “queue4”))
  2. type(ibmmq:local_queue), not(entityName.in(“queue3”, “queue4”))

While I haven’t tested these with the IBM MQ extension, they worked well for me with a standard message queue. Please test these queries and let me know if they work for you.

For reference, here are similar queries using a generic QUEUE type:

  1. type(QUEUE), entityName.in(“queue1”, “queue2”), not(entityName.in(“queue3”, “queue4”))
  2. type(QUEUE), not(entityName.in(“queue3”, “queue4”))

Best Regards,

Mohamed

Hello @Mohamed_Hamdy

I was playing around with this one not(entityName.in, but it did not work in my case. I want to eliminate backout queues as a wild mask and others as queue names. The wild mask works only with the entityName as the value operator contains, but it does not accept the multiple values.

Regards,

Babar

Hו @Babar_Qayyum  & @Mohamed_Hamdy

The follows work for me at customer site yesterday for metric selector:

ibmmq.queue.depth
:filter(in("dt.entity.ibmmq:local_queue", 
entitySelector("
    type(~"ibmmq:local_queue~"),
    queue_manager(~"AAA.XXX.QMGR~"), 
    not(entityName.startsWith(~"QL.DMZ.COMPRETAIL.TO.PORTAL.INTERNET~")),
    not(entityName.startsWith(~"QL.DMZ.COMPRETAIL.TO.RETAIL~"))
    ")))
:splitBy("dt.entity.ibmmq:local_queue")

and for Tag by entity selector

type("ibmmq:local_queue"),
queue_manager("AAA.BBB.QMGR"),
not(entityName.startsWith("QL.DMZ.COMPRETAIL.TO.PORTAL.INTERNET")),
not(entityName.startsWith("QL.DMZ.COMPRETAIL.TO.RETAIL"))

HTH

Yos

Hello @Yosi_Neuman

Thank you for your comments. It worked for me.

Regards,

Babar

Hello @Yosi_Neuman @Mohamed_Hamdy

What issues exist with the current entity selector intended for implementing auto tagging?

type(“ibmmq:channel”),queue_manager(“ABCD”),entityName(“XYZ”)

entitySelector Predicate name ‘queue_manager’ not applicable for type ibmmq:channel

Regards,

Babar

Hi @Babar_Qayyum ,

I think you can use the following

type(“ibmmq:queue_manager”),entityName(“ABCD”)

Regards,

Hamdy

Dear @Mohamed_Hamdy

Thank you for your comments.

I wish to assign tags to specific channels on specific queue managers.

Regards,

Babar

Hi @Babar_Qayyum did you come right with this?

I am struggling with the same thing, tagging specific IBM MQ Channels with entity selector

Regards,

Pieter

Hello @pieter_luttig

I successfully implemented a workaround by utilizing an auto tag for specific channels. This allowed me to filter by the tag and the name of a queue manager to present a tile on the dashboard.

Regards,

Babar

@Babar_Qayyum, Ah yes if you do have a list of the specific channels then you can do a Monitored entity rule type that applies to custom devices where the name matches the channel names.

However, I was more interested in auto-tagging ALL channels living on specific queue managers. But I guess the relationship between channels and queue_managers does not exist. (  Although interesting enough, the IBM MQ extension content says “ibmmq:channel() is child of ibmmq:queue_manager()”  )

Example of what I am trying:

type(ibmmq:channel), queue_manager(queue_manager1,queue_manager2)

entitySelector Predicate name ‘queue_manager’ not applicable for type ibmmq:channel

Or

type(ibmmq:channel), fromRelationship.runsOn(type(ibmmq:queue_manager),entityName.in(queue_manager1,queue_manager2))

Regards,

Pieter

Hello @pieter_luttig

Exactly, the child relationship is not functioning as anticipated, as outlined in the documentation.

I implemented auto-tagging for designated channels and filtered the results using specific queue managers.

type(“ibmmq:channel”),entityName.in(“channel01”, “channel01”, “channel01”)

Regards,

Babar

Hi @Babar_Qayyum, thought I’d quickly share with you. It turns out the child relationship does exist:laughing:. You can use the below query to show all channels living on a particular queue manager. This way you can keep your auto-tag dynamically up-to-date.

type(ibmmq:channel),fromRelationships.isChildOf(type(ibmmq:queue_manager),entityName.equals("QMGRname"))

Hello @pieter_luttig

Thank you for your comments. The requirement is to tag a particular channel /or channels for particular queue managers.

Regards,

Babar