17

On my ActiveMQ I have some Queues, which end with .error. On a Grafana Dashboard I want to list all queues without these .error-queues. Example:

some.domain.one
some.domain.one.error
some.domain.two
some.domain.two.error

To list all queues I use this query:

org_apache_activemq_localhost_QueueSize{Type="Queue",Destination=~"some.domain.*",}

How do I exclude all .error-queues?

Marco H
  • 173
  • 1
  • 1
  • 5

2 Answers2

26

You can use a negative regex matcher: org_apache_activemq_localhost_QueueSize{Type="Queue",Destination=~"some.domain.*",Destination!~".*\.error"}

brian-brazil
  • 31,678
  • 6
  • 93
  • 86
  • 1
    Cool, thx. I did not know that I can specify destinations more often. this works for me now: `org_apache_activemq_localhost_ConsumerCount{Type="Queue",Destination=~"some.domain.*",Destination!~".*error"}` – Marco H Oct 27 '16 at 06:56
6

Here is a bit more simpler way to exclude multiple endings:

org_apache_activemq_localhost_QueueSize{Type="Queue",Destination!~".*error|.*warn"}

!~: not include the quoted string
| : it is or

NOZUONOHIGH
  • 1,892
  • 1
  • 20
  • 20