Add SendQueueLimit to collectd-amqp1
to limit the queue length and to ignore data added earlier to the queue, when there is no remote to connect to. This will limit the memory usage of this plugin. By default, the memory may grow until it runs out of memory. Depends-On: https://review.opendev.org/756365 Change-Id: Ie2db4b7487f9a8eaa7152b1b7984c52016219ed5
This commit is contained in:
parent
0dd3f9f72a
commit
91cc43e01f
@ -164,6 +164,7 @@ parameter_defaults:
|
|||||||
telemetry:
|
telemetry:
|
||||||
format: JSON
|
format: JSON
|
||||||
presettle: false
|
presettle: false
|
||||||
|
CollectdAmqpQueueLimit: 40
|
||||||
LoggingServers:
|
LoggingServers:
|
||||||
- host: 127.0.0.1
|
- host: 127.0.0.1
|
||||||
port: 24224
|
port: 24224
|
||||||
|
@ -299,6 +299,12 @@ parameters:
|
|||||||
Interval on which metrics should be sent to AMQP intermediary. If not set
|
Interval on which metrics should be sent to AMQP intermediary. If not set
|
||||||
the default for all collectd plugins is used.
|
the default for all collectd plugins is used.
|
||||||
default: -666
|
default: -666
|
||||||
|
CollectdAmqpSendQueueLimit:
|
||||||
|
type: number
|
||||||
|
description: >
|
||||||
|
Number of data sets to be kept in memory, older sets will be discarded,
|
||||||
|
if set to -1, this feature is disabled.
|
||||||
|
default: -1
|
||||||
CollectdEnableSensubility:
|
CollectdEnableSensubility:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Set to true if sensubility should be executed by exec plugin.
|
description: Set to true if sensubility should be executed by exec plugin.
|
||||||
@ -378,6 +384,8 @@ conditions:
|
|||||||
equals: [{get_param: CollectdAmqpHost}, nil]
|
equals: [{get_param: CollectdAmqpHost}, nil]
|
||||||
amqp_default_interval:
|
amqp_default_interval:
|
||||||
equals: [{get_param: CollectdAmqpInterval}, -666]
|
equals: [{get_param: CollectdAmqpInterval}, -666]
|
||||||
|
amqp_default_send_queue_limit:
|
||||||
|
equals: [{get_param: CollectdAmqpSendQueueLimit}, -1]
|
||||||
collectd_connection:
|
collectd_connection:
|
||||||
equals: [{get_param: CollectdConnectionType}, 'network']
|
equals: [{get_param: CollectdConnectionType}, 'network']
|
||||||
gnocchi_connection:
|
gnocchi_connection:
|
||||||
@ -480,6 +488,11 @@ outputs:
|
|||||||
- {}
|
- {}
|
||||||
- tripleo::profile::base::metrics::collectd::amqp_interval:
|
- tripleo::profile::base::metrics::collectd::amqp_interval:
|
||||||
get_param: CollectdAmqpInterval
|
get_param: CollectdAmqpInterval
|
||||||
|
- if:
|
||||||
|
- amqp_default_send_queue_limit
|
||||||
|
- {}
|
||||||
|
- tripleo::profile::base::metrics::collectd::amqp_default_send_queue_limit:
|
||||||
|
get_param: CollectdAmqpSendQueueLimit
|
||||||
- if:
|
- if:
|
||||||
- amqp_default_connection
|
- amqp_default_connection
|
||||||
- tripleo::profile::base::metrics::collectd::amqp_host:
|
- tripleo::profile::base::metrics::collectd::amqp_host:
|
||||||
|
@ -14,6 +14,7 @@ parameter_defaults:
|
|||||||
CollectdConnectionType: amqp1
|
CollectdConnectionType: amqp1
|
||||||
CollectdAmqpInterval: 5
|
CollectdAmqpInterval: 5
|
||||||
CollectdDefaultPollingInterval: 5
|
CollectdDefaultPollingInterval: 5
|
||||||
|
CollectdAmqpQueueLimit: 40
|
||||||
|
|
||||||
CollectdAmqpInstances:
|
CollectdAmqpInstances:
|
||||||
notify:
|
notify:
|
||||||
|
@ -6,6 +6,7 @@ resource_registry:
|
|||||||
|
|
||||||
parameter_defaults:
|
parameter_defaults:
|
||||||
CollectdConnectionType: amqp1
|
CollectdConnectionType: amqp1
|
||||||
|
CollectdAmqpQueueLimit: 40
|
||||||
CollectdAmqpInstances:
|
CollectdAmqpInstances:
|
||||||
notify:
|
notify:
|
||||||
notify: true
|
notify: true
|
||||||
|
Loading…
Reference in New Issue
Block a user