def poll(self):
        """Poll the RabbitMQ server"""
        LOGGER.info('Polling RabbitMQ via %s', self.rabbitmq_base_url)
        start_time = time.time()

        self.requests_session = requests.Session()

        # Initialize the values each iteration
        self.derive = dict()
        self.gauge = dict()
        self.rate = dict()
        self.consumers = 0

        # Fetch the data from RabbitMQ
        channel_data = self.fetch_channel_data()
        node_data = self.fetch_node_data()
        queue_data = self.fetch_queue_data()

        # Create all of the metrics
        self.add_queue_datapoints(queue_data)
        self.add_node_datapoints(node_data, queue_data, channel_data)
        LOGGER.info('Polling complete in %.2f seconds',
                    time.time() - start_time)
dataset/ETHPy150Open MeetMe/newrelic-plugin-agent/newrelic_plugin_agent/plugins/rabbitmq.py/RabbitMQ.poll/original