7
votes

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?

2

2 Answers

10
votes

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

2
votes

Thers 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