collectd_rabbitmq package¶
Submodules¶
collectd_rabbitmq.rabbit module¶
python plugin for collectd to obtain rabbitmq stats
-
class
collectd_rabbitmq.rabbit.
RabbitMQStats
(config)[source]¶ Bases:
object
Class to interface with the RabbitMQ API.
-
get_exchange_stats
(exchange_name=None, vhost_name=None)[source]¶ Returns a dictionary of stats for exchange_name.
-
get_queue_stats
(queue_name=None, vhost_name=None)[source]¶ Returns a dictionary of stats for queue_name.
-
nodes
¶ Return a list of nodes.
-
vhost_names
¶ Returns a list of vhost names.
-
collectd_rabbitmq.collectd_plugin module¶
This module controls the interactions with collectd
-
class
collectd_rabbitmq.collectd_plugin.
CollectdPlugin
[source]¶ Bases:
object
Controls interaction between rabbitmq stats and collectd.
-
dispatch_message_stats
(data, vhost, plugin, plugin_instance)[source]¶ Sends message stats to collectd.
-
static
dispatch_values
(values, host, plugin, plugin_instance, metric_type, type_instance=None)[source]¶ Dispatch metrics to collectd.
Parameters: - (tuple or list) (values) – The values to dispatch. It will be coerced into a list.
- host – (str): The name of the vhost.
- (str) (plugin_instance) – The name of the plugin. Should be queue/exchange.
- (str) – The queue/exchange name.
- metric_type – (str): The name of metric.
- type_instance – Optional.
-
message_details
= ['avg', 'avg_rate', 'rate', 'sample']¶
-
message_stats
= ['ack', 'publish', 'publish_in', 'publish_out', 'confirm', 'deliver', 'deliver_noack', 'get', 'get_noack', 'deliver_get', 'redeliver', 'return']¶
-
node_stats
= ['disk_free', 'disk_free_limit', 'fd_total', 'fd_used', 'mem_limit', 'mem_used', 'proc_total', 'proc_used', 'processors', 'run_queue', 'sockets_total', 'sockets_used']¶
-
collectd_rabbitmq.utils module¶
Module that contains utility classes and functions
-
class
collectd_rabbitmq.utils.
Auth
(username='guest', password='guest', realm=None)[source]¶ Bases:
object
Stores Auth data.
-
class
collectd_rabbitmq.utils.
Config
(auth, connection, data_to_ignore=None)[source]¶ Bases:
object
Class that contains configuration data.
-
class
collectd_rabbitmq.utils.
ConnectionInfo
(host='localhost', port=15672, scheme='http')[source]¶ Bases:
object
Stores connection information.
-
url
¶ Returns a url made from scheme, host and port.
-