SHA256
1
0
forked from pool/telegraf
telegraf/feature_passive_amqp_exchange.patch
Jordi Massaguer 30e343a43d Accepting request 597837 from home:mschnitzer
- Release 1.6.0
  * Release Notes
    - The mysql input plugin has been updated fix a number of type convertion issues. This may cause a field type error when inserting
      into InfluxDB due the change of types.
    - To address this we have introduced a new metric_version option to control enabling the new format. For in depth recommendations on
      upgrading please reference the mysql plugin documentation.
    - It is encouraged to migrate to the new model when possible as the old version is deprecated and will be removed in a future version.
    - The postgresql plugins now defaults to using a persistent connection to the database. In environments where TCP connections are
      terminated the max_lifetime setting should be set less than the collection interval to prevent errors.
    - The sqlserver input plugin has a new query and data model that can be enabled by setting query_version = 2. It is encouraged to
      migrate to the new model when possible as the old version is deprecated and will be removed in a future version.
    - An option has been added to the openldap input plugin that reverses metric name to improve grouping. This change is enabled
      when reverse_metric_names = true is set. It is encouraged to enable this option when possible as the old ordering is deprecated.
    - The new http input configured with data_format = "json" can perform the same task as the, now deprecated, httpjson input.
  * New Inputs
    http - Thanks to @grange74
    ipset - Thanks to @sajoupa
    nats - Thanks to @mjs & @levex
  * New Processors
    override - Thanks to @KarstenSchnitter
  * New Parsers
    dropwizard - Thanks to @atzoum
  * Features
    #3551: Add health status mapping from string to int in elasticsearch input.
    #3580: Add control over which stats to gather in basicstats aggregator.
    #3596: Add messages_delivered_get to rabbitmq input.
    #3632: Add wired field to mem input.
    #3619: Add support for gathering exchange metrics to the rabbitmq input.
    #3565: Add support for additional metrics on Linux in zfs input.
    #3524: Add available_entropy field to kernel input plugin.

OBS-URL: https://build.opensuse.org/request/show/597837
OBS-URL: https://build.opensuse.org/package/show/devel:languages:go/telegraf?expand=0&rev=4
2018-04-18 17:02:51 +00:00

70 lines
2.1 KiB
Diff

Index: telegraf-1.6.0/plugins/inputs/amqp_consumer/amqp_consumer.go
===================================================================
--- telegraf-1.6.0/plugins/inputs/amqp_consumer/amqp_consumer.go.original 2018-02-12 11:44:32.583888582 +0100
+++ telegraf-1.6.0/plugins/inputs/amqp_consumer/amqp_consumer.go 2018-02-12 11:53:42.111013874 +0100
@@ -20,6 +20,7 @@
URL string
// AMQP exchange
Exchange string
+ ExchangePassive bool
// Queue Name
Queue string
// Binding Key
@@ -65,6 +66,7 @@
url = "amqp://localhost:5672/influxdb"
## AMQP exchange
exchange = "telegraf"
+ exchange_passive = false
## AMQP queue name
queue = "telegraf"
## Binding Key
@@ -180,15 +182,27 @@
return nil, fmt.Errorf("Failed to open a channel: %s", err)
}
- err = ch.ExchangeDeclare(
- a.Exchange, // name
- "topic", // type
- true, // durable
- false, // auto-deleted
- false, // internal
- false, // no-wait
- nil, // arguments
- )
+ if a.ExchangePassive == true {
+ err = ch.ExchangeDeclarePassive(
+ a.Exchange, // name
+ "topic", // type
+ true, // durable
+ false, // auto-deleted
+ false, // internal
+ false, // no-wait
+ nil, // arguments
+ )
+ } else {
+ err = ch.ExchangeDeclare(
+ a.Exchange, // name
+ "topic", // type
+ true, // durable
+ false, // auto-deleted
+ false, // internal
+ false, // no-wait
+ nil, // arguments
+ )
+ }
if err != nil {
return nil, fmt.Errorf("Failed to declare an exchange: %s", err)
}
Index: telegraf-1.6.0/etc/telegraf.conf
===================================================================
--- telegraf-1.6.0/etc/telegraf.conf.original 2018-02-12 14:06:03.304072548 +0100
+++ telegraf-1.6.0/etc/telegraf.conf 2018-02-12 14:06:27.544041814 +0100
@@ -2747,6 +2747,7 @@
# url = "amqp://localhost:5672/influxdb"
# ## AMQP exchange
# exchange = "telegraf"
+# exchange_passive = false
# ## AMQP queue name
# queue = "telegraf"
# ## Binding Key