2015-09-16 00:25:56 +00:00
|
|
|
# AMQP Output Plugin
|
|
|
|
|
2017-03-03 18:24:50 +00:00
|
|
|
This plugin writes to a AMQP 0-9-1 Exchange, a promenent implementation of this protocol being [RabbitMQ](https://www.rabbitmq.com/).
|
|
|
|
|
|
|
|
Metrics are written to a topic exchange using tag, defined in configuration file as RoutingTag, as a routing key.
|
2015-09-16 00:25:56 +00:00
|
|
|
|
|
|
|
If RoutingTag is empty, then empty routing key will be used.
|
2015-10-21 17:25:36 +00:00
|
|
|
Metrics are grouped in batches by RoutingTag.
|
2015-09-16 00:25:56 +00:00
|
|
|
|
|
|
|
This plugin doesn't bind exchange to a queue, so it should be done by consumer.
|
2017-01-13 17:02:10 +00:00
|
|
|
|
2017-03-03 18:24:50 +00:00
|
|
|
For an introduction to AMQP see:
|
|
|
|
- https://www.rabbitmq.com/tutorials/amqp-concepts.html
|
|
|
|
- https://www.rabbitmq.com/getstarted.html
|
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
### Configuration:
|
|
|
|
|
|
|
|
```
|
|
|
|
# Configuration for the AMQP server to send metrics to
|
|
|
|
[[outputs.amqp]]
|
|
|
|
## AMQP url
|
|
|
|
url = "amqp://localhost:5672/influxdb"
|
|
|
|
## AMQP exchange
|
|
|
|
exchange = "telegraf"
|
|
|
|
## Auth method. PLAIN and EXTERNAL are supported
|
2017-03-03 18:24:50 +00:00
|
|
|
## Using EXTERNAL requires enabling the rabbitmq_auth_mechanism_ssl plugin as
|
|
|
|
## described here: https://www.rabbitmq.com/plugins.html
|
2017-01-13 17:02:10 +00:00
|
|
|
# auth_method = "PLAIN"
|
|
|
|
## Telegraf tag to use as a routing key
|
2017-04-27 21:59:18 +00:00
|
|
|
## ie, if this tag exists, its value will be used as the routing key
|
2017-01-13 17:02:10 +00:00
|
|
|
routing_tag = "host"
|
|
|
|
|
|
|
|
## InfluxDB retention policy
|
|
|
|
# retention_policy = "default"
|
|
|
|
## InfluxDB database
|
|
|
|
# database = "telegraf"
|
|
|
|
|
2017-04-27 18:10:30 +00:00
|
|
|
## Write timeout, formatted as a string. If not provided, will default
|
|
|
|
## to 5s. 0s means no timeout (not recommended).
|
|
|
|
# timeout = "5s"
|
|
|
|
|
2017-01-13 17:02:10 +00:00
|
|
|
## Optional SSL Config
|
|
|
|
# ssl_ca = "/etc/telegraf/ca.pem"
|
|
|
|
# ssl_cert = "/etc/telegraf/cert.pem"
|
|
|
|
# ssl_key = "/etc/telegraf/key.pem"
|
|
|
|
## Use SSL but skip chain & host verification
|
|
|
|
# insecure_skip_verify = false
|
|
|
|
|
|
|
|
## Data format to output.
|
2017-04-27 21:59:18 +00:00
|
|
|
## Each data format has its own unique set of configuration options, read
|
2017-01-13 17:02:10 +00:00
|
|
|
## more about them here:
|
|
|
|
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
|
|
|
|
data_format = "influx"
|
|
|
|
```
|