Enable collectd to connect to metrics QDR
This patch enables collectd on overcloud nodes to connect to local QDR running on each overcloud node. Depends-On: I4cb6aa95e253b7fd19ed265fbcba0dfe6663592d Change-Id: I1d95454f049ca22d694b21b5102e24c63c6009cd
This commit is contained in:
committed by
Pradeep Kilambi
parent
b8aeabdcb0
commit
c56e9349f2
27
environments/metrics-collectd-qdr.yaml
Normal file
27
environments/metrics-collectd-qdr.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
## This environment servers the purpose of enabling collectd to send metrics
|
||||||
|
## through mesh of QPID dispatch routers. Each ovecloud node will have one local
|
||||||
|
## qdrouterd service running and collectd will send data to it.
|
||||||
|
|
||||||
|
|
||||||
|
resource_registry:
|
||||||
|
OS::TripleO::Services::MetricsQdr: ../docker/services/metrics/qdr.yaml
|
||||||
|
OS::TripleO::Services::Collectd: ../docker/services/metrics/collectd.yaml
|
||||||
|
|
||||||
|
|
||||||
|
parameter_defaults:
|
||||||
|
CollectdConnectionType: amqp1
|
||||||
|
CollectdAmqpInstances:
|
||||||
|
notify:
|
||||||
|
notify: true
|
||||||
|
format: JSON
|
||||||
|
presettle: true
|
||||||
|
telemetry:
|
||||||
|
format: JSON
|
||||||
|
presettle: false
|
||||||
|
#MetricsQdrConnectors:
|
||||||
|
# - addr: IP1
|
||||||
|
# port: 1234
|
||||||
|
# role: inter-router
|
||||||
|
# - addr: IP2
|
||||||
|
# port: 5678
|
||||||
|
# role: inter-router
|
||||||
@@ -37,6 +37,28 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
description: Keystone region for endpoint
|
description: Keystone region for endpoint
|
||||||
default: 'regionOne'
|
default: 'regionOne'
|
||||||
|
MetricsQdrPort:
|
||||||
|
default: '5666'
|
||||||
|
description: Service name or port number on which the qdrouterd will accept
|
||||||
|
connections. This argument must be string, even if the numeric
|
||||||
|
form is used.
|
||||||
|
type: string
|
||||||
|
MetricsQdrUsername:
|
||||||
|
default: 'guest'
|
||||||
|
description: Username which should be used to authenticate to the deployed
|
||||||
|
qdrouterd.
|
||||||
|
type: string
|
||||||
|
MetricsQdrPassword:
|
||||||
|
default: 'guest'
|
||||||
|
description: Password which should be used to authenticate to the deployed
|
||||||
|
qdrouterd.
|
||||||
|
type: string
|
||||||
|
hidden: true
|
||||||
|
CollectdConnectionType:
|
||||||
|
default: 'gnocchi'
|
||||||
|
description: Define which write plugin should collectd use. Currently
|
||||||
|
supported are 'amqp1', 'network' and 'gnocchi'.
|
||||||
|
type: string
|
||||||
CollectdDefaultPollingInterval:
|
CollectdDefaultPollingInterval:
|
||||||
default: 120
|
default: 120
|
||||||
type: number
|
type: number
|
||||||
@@ -199,17 +221,75 @@ parameters:
|
|||||||
type: number
|
type: number
|
||||||
description: Minimum number of values Gnocchi should batch.
|
description: Minimum number of values Gnocchi should batch.
|
||||||
default: 10
|
default: 10
|
||||||
|
CollectdAmqpHost:
|
||||||
|
type: string
|
||||||
|
description: Hostname or IP address of the AMQP 1.0 intermediary.
|
||||||
|
default: nil
|
||||||
|
CollectdAmqpPort:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
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.
|
||||||
|
default: '5666'
|
||||||
|
CollectdAmqpUser:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
User part of credentials used to authenticate to the AMQP 1.0 intermediary.
|
||||||
|
default: guest
|
||||||
|
CollectdAmqpPassword:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
Password part of credentials used to authenticate to the AMQP 1.0 intermediary.
|
||||||
|
default: guest
|
||||||
|
hidden: true
|
||||||
|
CollectdAmqpTransportName:
|
||||||
|
type: string
|
||||||
|
description: Name of the AMQP 1.0 transport.
|
||||||
|
default: metrics
|
||||||
|
CollectdAmqpAddress:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
This option specifies the prefix for the send-to value in the message.
|
||||||
|
default: collectd
|
||||||
|
CollectdAmqpInstances:
|
||||||
|
type: json
|
||||||
|
description: >
|
||||||
|
Hash of hashes. Each inner hash represent Instance block in plugin
|
||||||
|
configuration file. Key of outter hash represents instance name.
|
||||||
|
The 'address' value concatenated with the 'name' given will be used
|
||||||
|
as the send-to address for communications over the messaging link.
|
||||||
|
default: {}
|
||||||
|
CollectdAmqpRetryDelay:
|
||||||
|
type: number
|
||||||
|
description: >
|
||||||
|
When the AMQP 1.0 connection is lost, defines the time in seconds to wait
|
||||||
|
before attempting to reconnect.
|
||||||
|
default: 1
|
||||||
|
CollectdAmqpInterval:
|
||||||
|
type: number
|
||||||
|
description: >
|
||||||
|
Interval on which metrics should be sent to AMQP intermediary. If not set
|
||||||
|
the default for all collectd plugins is used.
|
||||||
|
default: -666
|
||||||
|
|
||||||
conditions:
|
conditions:
|
||||||
|
amqp_connection:
|
||||||
|
equals: [{get_param: CollectdConnectionType}, 'amqp1']
|
||||||
|
amqp_default_connection:
|
||||||
|
equals: [{get_param: CollectdAmqpHost}, nil]
|
||||||
|
amqp_default_interval:
|
||||||
|
equals: [{get_param: CollectdAmqpInterval}, -666]
|
||||||
|
collectd_connection:
|
||||||
|
equals: [{get_param: CollectdConnectionType}, 'network']
|
||||||
|
gnocchi_connection:
|
||||||
|
equals: [{get_param: CollectdConnectionType}, 'gnocchi']
|
||||||
|
gnocchi_auth_basic:
|
||||||
|
equals: [{get_param: CollectdGnocchiAuthMode}, 'basic']
|
||||||
gnocchi_default_connection:
|
gnocchi_default_connection:
|
||||||
and:
|
and:
|
||||||
- equals: [{get_param: CollectdGnocchiServer}, nil]
|
- equals: [{get_param: CollectdGnocchiServer}, nil]
|
||||||
- equals: [{get_param: CollectdGnocchiKeystoneEndpoint}, nil]
|
- equals: [{get_param: CollectdGnocchiKeystoneEndpoint}, nil]
|
||||||
collectd_connection:
|
|
||||||
not:
|
|
||||||
equals: [{get_param: CollectdServer}, '']
|
|
||||||
gnocchi_auth_basic:
|
|
||||||
equals: [{get_param: CollectdGnocchiAuthMode}, 'basic']
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
role_data:
|
role_data:
|
||||||
@@ -234,8 +314,47 @@ outputs:
|
|||||||
expression: >
|
expression: >
|
||||||
($.data.default_plugins + $.data.extra_plugins)
|
($.data.default_plugins + $.data.extra_plugins)
|
||||||
.flatten().distinct()
|
.flatten().distinct()
|
||||||
- if:
|
- if: # Collectd connected to QDR
|
||||||
- collectd_connection # use server side collectd or gnocchi as metrics relay?
|
- amqp_connection
|
||||||
|
- map_merge:
|
||||||
|
- tripleo::profile::base::metrics::collectd::amqp_transport_name:
|
||||||
|
get_param: CollectdAmqpTransportName
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_address:
|
||||||
|
get_param: CollectdAmqpAddress
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_instances:
|
||||||
|
get_param: CollectdAmqpInstances
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_retry_delay:
|
||||||
|
get_param: CollectdAmqpRetryDelay
|
||||||
|
- if:
|
||||||
|
- amqp_default_interval
|
||||||
|
- {}
|
||||||
|
- tripleo::profile::base::metrics::collectd::amqp_interval:
|
||||||
|
get_param: CollectdAmqpInterval
|
||||||
|
- if:
|
||||||
|
- amqp_default_connection
|
||||||
|
- tripleo::profile::base::metrics::collectd::amqp_host:
|
||||||
|
str_replace:
|
||||||
|
template:
|
||||||
|
"%{hiera('$NETWORK')}"
|
||||||
|
params:
|
||||||
|
$NETWORK: {get_param: [ServiceNetMap, MetricsQdrNetwork]}
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_port:
|
||||||
|
get_param: MetricsQdrPort
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_user:
|
||||||
|
get_param: MetricsQdrUsername
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_password:
|
||||||
|
get_param: MetricsQdrPassword
|
||||||
|
- tripleo::profile::base::metrics::collectd::amqp_host:
|
||||||
|
get_param: CollectdAmqpHost
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_port:
|
||||||
|
get_param: CollectdAmqpPort
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_user:
|
||||||
|
get_param: CollectdAmqpUser
|
||||||
|
tripleo::profile::base::metrics::collectd::amqp_password:
|
||||||
|
get_param: CollectdAmqpPassword
|
||||||
|
- {}
|
||||||
|
- if: # Collectd connected to external collectd instance
|
||||||
|
- collectd_connection
|
||||||
- tripleo::profile::base::metrics::collectd::collectd_server:
|
- tripleo::profile::base::metrics::collectd::collectd_server:
|
||||||
get_param: CollectdServer
|
get_param: CollectdServer
|
||||||
tripleo::profile::base::metrics::collectd::collectd_port:
|
tripleo::profile::base::metrics::collectd::collectd_port:
|
||||||
@@ -246,6 +365,9 @@ outputs:
|
|||||||
get_param: CollectdPassword
|
get_param: CollectdPassword
|
||||||
tripleo::profile::base::metrics::collectd::collectd_securitylevel:
|
tripleo::profile::base::metrics::collectd::collectd_securitylevel:
|
||||||
get_param: CollectdSecurityLevel
|
get_param: CollectdSecurityLevel
|
||||||
|
- {}
|
||||||
|
- if: # Collectd connected directly to Gnocchi DB
|
||||||
|
- gnocchi_connection
|
||||||
- map_merge:
|
- map_merge:
|
||||||
- tripleo::profile::base::metrics::collectd::gnocchi_auth_mode:
|
- tripleo::profile::base::metrics::collectd::gnocchi_auth_mode:
|
||||||
get_param: CollectdGnocchiAuthMode
|
get_param: CollectdGnocchiAuthMode
|
||||||
@@ -303,6 +425,7 @@ outputs:
|
|||||||
get_param: CollectdGnocchiKeystoneInterface
|
get_param: CollectdGnocchiKeystoneInterface
|
||||||
tripleo::profile::base::metrics::collectd::gnocchi_keystone_endpoint:
|
tripleo::profile::base::metrics::collectd::gnocchi_keystone_endpoint:
|
||||||
get_param: CollectdGnocchiKeystoneEndpoint
|
get_param: CollectdGnocchiKeystoneEndpoint
|
||||||
|
- {}
|
||||||
step_config: |
|
step_config: |
|
||||||
include ::tripleo::profile::base::metrics::collectd
|
include ::tripleo::profile::base::metrics::collectd
|
||||||
upgrade_tasks:
|
upgrade_tasks:
|
||||||
|
|||||||
5
releasenotes/notes/collectd-amqp1-a1d8773e8e7ff80e.yaml
Normal file
5
releasenotes/notes/collectd-amqp1-a1d8773e8e7ff80e.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Enabled collectd on overcloud nodes to connect to local QDR running on each
|
||||||
|
overcloud node in metrics_qdr container.
|
||||||
Reference in New Issue
Block a user