Default collectd to overcloud gnocchi

This patch makes it possible to use overcloud gnocchi instance as datastore
for collectd.

Closes-Bug: #1766255
Change-Id: I122c705eed80a4ee0cefcbd077e6f03cd320d448
This commit is contained in:
Martin Mágr 2018-04-18 21:56:33 +02:00
parent 628cd0e390
commit 723e428f40
2 changed files with 67 additions and 44 deletions

View File

@ -29,6 +29,14 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
GnocchiPassword:
type: string
description: The password for the gnocchi service and db account.
hidden: true
KeystoneRegion:
type: string
description: Keystone region for endpoint
default: 'regionOne'
CollectdDefaultPlugins:
default:
- disk
@ -97,7 +105,7 @@ parameters:
description: >
Type of authentication Gnocchi server is using. Supported values are
'simple' and 'keystone'.
default: 'simple'
default: 'keystone'
CollectdGnocchiProtocol:
type: string
description: API protocol Gnocchi server is using.
@ -134,6 +142,7 @@ parameters:
type: string
description: Password for authenticating to Keystone
default: nil
hidden: true
CollectdGnocchiKeystoneProjectId:
type: string
description: Project ID for authenticating to Keystone.
@ -184,8 +193,7 @@ parameters:
default: 10
conditions:
gnocchi_connection:
not:
gnocchi_default_connection:
and:
- equals: [{get_param: CollectdGnocchiServer}, nil]
- equals: [{get_param: CollectdGnocchiKeystoneEndpoint}, nil]
@ -218,7 +226,7 @@ outputs:
($.data.default_plugins + $.data.extra_plugins)
.flatten().distinct()
- if:
- collectd_connection
- collectd_connection # use server side collectd or gnocchi as metrics relay?
- tripleo::profile::base::metrics::collectd::collectd_server:
get_param: CollectdServer
tripleo::profile::base::metrics::collectd::collectd_port:
@ -229,9 +237,6 @@ outputs:
get_param: CollectdPassword
tripleo::profile::base::metrics::collectd::collectd_securitylevel:
get_param: CollectdSecurityLevel
- {}
- if:
- gnocchi_connection
- map_merge:
- tripleo::profile::base::metrics::collectd::gnocchi_auth_mode:
get_param: CollectdGnocchiAuthMode
@ -240,7 +245,21 @@ outputs:
tripleo::profile::base::metrics::collectd::gnocchi_batch_size:
get_param: CollectdGnocchiBatchSize
- if:
- gnocchi_auth_simple
- gnocchi_default_connection # use overcloud gnocchi instance or user provided instance?
- tripleo::profile::base::metrics::collectd::gnocchi_keystone_endpoint:
get_param: [EndpointMap, GnocchiInternal, uri]
tripleo::profile::base::metrics::collectd::gnocchi_keystone_auth_url:
get_param: [EndpointMap, KeystoneInternal, uri_no_suffix]
tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_name: 'gnocchi'
tripleo::profile::base::metrics::collectd::gnocchi_keystone_password:
get_param: GnocchiPassword
tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_name: 'service'
tripleo::profile::base::metrics::collectd::gnocchi_keystone_user_domain_name: 'Default'
tripleo::profile::base::metrics::collectd::gnocchi_keystone_project_domain_name: 'Default'
tripleo::profile::base::metrics::collectd::gnocchi_keystone_region_name:
get_param: KeystoneRegion
- if:
- gnocchi_auth_simple # use simple auth or keystone auth?
- tripleo::profile::base::metrics::collectd::gnocchi_protocol:
get_param: CollectdGnocchiProtocol
tripleo::profile::base::metrics::collectd::gnocchi_server:
@ -275,7 +294,6 @@ outputs:
get_param: CollectdGnocchiKeystoneInterface
tripleo::profile::base::metrics::collectd::gnocchi_keystone_endpoint:
get_param: CollectdGnocchiKeystoneEndpoint
- {}
step_config: |
include ::tripleo::profile::base::metrics::collectd
upgrade_tasks:

View File

@ -0,0 +1,5 @@
---
features:
- |
Makes collectd deployment default output metrics data to Gnocchi instance
running on overcloud nodes.