title: PromQL to calculate error rates with RabbitMq queues
body: <p>I am using the Prometheus plugin for RabbitMq which tracks the number of published messages to different queues. I am interested in the following metric: <code>rabbitmq_queue_messages_published_total</code> which has a couple of labels, but I am interested in the <code>queue</code> label. In RabbitMq by default, each queue will have an error queue paired with it. So if the original queue is called <code>ConnectionQueue</code> there will be a <code>ConnectionQueue_Error</code> queue for the errors. So our instant vectors will look like this:</p>
  
  <pre><code>rabbitmq_queue_messages_published_total{queue="ConnectionQueue",...} : 5000
  rabbitmq_queue_messages_published_total{queue="ConnectionQueue_Error",...} : 50
  ...
  rabbitmq_queue_messages_published_total{queue="SomeOtherQueue",...} : 4000
  rabbitmq_queue_messages_published_total{queue="SomeOtherQueue_Error",...} : 40
  </code></pre>
  
  <p>So, I want to calculate the rate of errors for each queue in the last 5 minutes. 
  I have tried this query:</p>
  
  <pre><code>(sum by (queue)(rate(rabbitmq_queue_messages_published_total{queue=~".*(Errors)"}[5m]))) / (sum by (queue)(rate(rabbitmq_queue_messages_published_total[5m])))
  </code></pre>
  
  <p>But the problem is that it doesn't group only the two corresponding queues together. Is there a way to achieve that?</p>