code: def queue_stats(self, queue, tags):
          
          for mname, pymqi_value in iteritems(metrics.queue_metrics()):
              try:
                  mname = '{}.queue.{}'.format(self.METRIC_PREFIX, mname)
                  m = queue.inquire(pymqi_value)
                  self.gauge(mname, m, tags=tags)
              except pymqi.Error as e:
                  self.warning("Error getting queue stats for {}: {}".format(queue, e))
  
          for mname, func in iteritems(metrics.queue_metrics_functions()):
              try:
                  mname = '{}.queue.{}'.format(self.METRIC_PREFIX, mname)
                  m = func(queue)
                  self.gauge(mname, m, tags=tags)
              except pymqi.Error as e:
                  self.warning("Error getting queue stats for {}: {}".format(queue, e))
docs: Grab stats from queues