Skip to content

amqp1 plugin

Plugin name amqp1
Type write
Callbacks config, shutdown, write
Status supported
Since 5.9
Copyright 2017 Andy Smith
License MIT License
Configuration collectd.conf(5)

The AMQP1 plugin can be used to communicate with other instances of collectd or third party applications using an AMQP 1.0 message intermediary. Metric values or notifications are sent to the messaging intermediary which may handle direct messaging or queue based transfer.

Synopsis

  <Plugin "amqp1">
    # Send values to an AMQP 1.0 intermediary
   <Transport "name">
     Host "localhost"
     Port "5672"
     User "guest"
     Password "guest"
     Address "collectd"
     SendQueueLimit 50
  #    RetryDelay 1
     <Instance "some_name">
         Format "command"
         PreSettle false
         Notify false
  #      StoreRates false
  #      GraphitePrefix "collectd."
  #      GraphiteEscapeChar "_"
  #      GraphiteSeparateInstances false
  #      GraphiteAlwaysAppendDS false
  #      GraphitePreserveSeparator false
     </Instance>
   </Transport>
  </Plugin>

Dependencies

  • Qpid-proton-c

See also

Configuration

Configuration options · from collectd.conf(5)

See this section in the full configuration reference

The AMQP1 plugin can be used to communicate with other instances of collectd or third party applications using an AMQP 1.0 message intermediary. Metric values or notifications are sent to the messaging intermediary which may handle direct messaging or queue based transfer.

Synopsis:

 <Plugin "amqp1">
   # Send values to an AMQP 1.0 intermediary
  <Transport "name">
    Host "localhost"
    Port "5672"
    User "guest"
    Password "guest"
    Address "collectd"
#    RetryDelay 1
    <Instance "some_name">
        Format "command"
        PreSettle false
        Notify false
 #      StoreRates false
 #      GraphitePrefix "collectd."
 #      GraphiteEscapeChar "_"
 #      GraphiteSeparateInstances false
 #      GraphiteAlwaysAppendDS false
 #      GraphitePreserveSeparator false
    </Instance>
  </Transport>
 </Plugin>

The plugin's configuration consists of a Transport that configures communications to the AMQP 1.0 messaging bus and one or more Instance corresponding to metric or event publishers to the messaging system.

The address in the Transport block concatenated with the name given in the Instance block starting tag will be used as the send-to address for communications over the messaging link.

The following options are accepted within each Transport block:

Host Host
Hostname or IP-address of the AMQP 1.0 intermediary. Defaults to the default behavior of the underlying communications library, libqpid-proton, which is "localhost".
Port Port
Service name or port number on which the AMQP 1.0 intermediary accepts connections. This argument must be a string, even if the numeric form is used. Defaults to "5672".
User User
Password Password
Credentials used to authenticate to the AMQP 1.0 intermediary. By default "guest"/"guest" is used.
Address Address
This option specifies the prefix for the send-to value in the message. By default, "collectd" will be used.
RetryDelay RetryDelay
When the AMQP1 connection is lost, defines the time in seconds to wait before attempting to reconnect. Defaults to 1, which implies attempt to reconnect at 1 second intervals.
SendQueueLimit SendQueueLimit If there is no AMQP1 connection, the plugin will continue to queue messages to send, which could result in unbounded memory consumption. This parameter is used to limit the number of messages in the outbound queue to the specified value. The default value is 0, which disables this feature.

The following options are accepted within each Instance block:

Format Command|JSON|Graphite

Selects the format in which messages are sent to the intermediary. If set to Command (the default), values are sent as PUTVAL commands which are identical to the syntax used by the Exec and UnixSock plugins. In this case, the Content-Type header field will be set to text/collectd.

If set to JSON, the values are encoded in the JavaScript Object Notation, an easy and straight forward exchange format. The Content-Type header field will be set to application/json.

If set to Graphite, values are encoded in the Graphite format, which is "<metric> <value> <timestamp>\n". The Content-Type header field will be set to text/graphite.

A subscribing client should use the Content-Type header field to determine how to decode the values.

PreSettle true|false
If set to false (the default), the plugin will wait for a message acknowledgement from the messaging bus before sending the next message. This indicates transfer of ownership to the messaging system. If set to true, the plugin will not wait for a message acknowledgement and the message may be dropped prior to transfer of ownership.
Notify true|false
If set to false (the default), the plugin will service the instance write call back as a value list. If set to true the plugin will service the instance as a write notification callback for alert formatting.
StoreRates true|false

Determines whether or not COUNTER, DERIVE and ABSOLUTE data sources are converted to a rate (i.e. a GAUGE value). If set to false (the default), no conversion is performed. Otherwise the conversion is performed using the internal value cache.

Please note that currently this option is only used if the Format option has been set to JSON.

GraphitePrefix
A prefix can be added in the metric name when outputting in the Graphite format. It's added before the Host name. Metric name will be "<prefix><host><postfix><plugin><type><name>"
GraphitePostfix
A postfix can be added in the metric name when outputting in the Graphite format. It's added after the Host name. Metric name will be "<prefix><host><postfix><plugin><type><name>"
GraphiteEscapeChar
Specify a character to replace dots (.) in the host part of the metric name. In Graphite metric name, dots are used as separators between different metric parts (host, plugin, type). Default is "_" (Underscore).
GraphiteSeparateInstances true|false
If set to true, the plugin instance and type instance will be in their own path component, for example host.cpu.0.cpu.idle. If set to false (the default), the plugin and plugin instance (and likewise the type and type instance) are put into one component, for example host.cpu-0.cpu-idle.
GraphiteAlwaysAppendDS true|false
If set to true, append the name of the Data Source (DS) to the "metric" identifier. If set to false (the default), this is only done when there is more than one DS.
GraphitePreserveSeparator false|true
If set to false (the default) the . (dot) character is replaced with GraphiteEscapeChar. Otherwise, if set to true, the . (dot) character is preserved, i.e. passed through.