implement a collectd composable service

The collectd composable service permits an operator to configure
collectd metrics collection as part of the overcloud install.

Depends-on: I03cfbd96778a76125d18e2ca2f48d96e292608de
Change-Id: I143565329f5128f15cc39c9b62a6b242666383ab
This commit is contained in:
Lars Kellogg-Stedman 2016-12-21 13:14:01 -05:00 committed by Emilien Macchi
parent 2a461c49db
commit 490c19bb38
7 changed files with 157 additions and 0 deletions

View File

@ -5,6 +5,7 @@ resource_registry:
OS::TripleO::Services::CephOSD: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-osd.yaml
OS::TripleO::Services::CephClient: /usr/share/openstack-tripleo-heat-templates/puppet/services/ceph-client.yaml
OS::TripleO::Services::PankoApi: /usr/share/openstack-tripleo-heat-templates/puppet/services/panko-api.yaml
OS::TripleO::Services::Collectd: /usr/share/openstack-tripleo-heat-templates/puppet/services/metrics/collectd.yaml
parameter_defaults:
ControllerServices:
@ -60,6 +61,7 @@ parameter_defaults:
- OS::TripleO::Services::CinderBackup
- OS::TripleO::Services::CinderScheduler
- OS::TripleO::Services::CinderVolume
- OS::TripleO::Services::Collectd
ControllerExtraConfig:
nova::compute::libvirt::services::libvirt_virt_type: qemu
nova::compute::libvirt::libvirt_virt_type: qemu
@ -91,3 +93,5 @@ parameter_defaults:
* evidence of criminal activity, system personnel may provide *
* the evidence from such monitoring to law enforcement officials.*
******************************************************************
CollectdExtraPlugins:
- rrdtool

View File

@ -0,0 +1,23 @@
resource_registry:
OS::TripleO::Services::Collectd: ../puppet/services/metrics/collectd.yaml
# parameter_defaults:
#
## You can specify additional plugins to load using the
## CollectdExtraPlugins key:
#
# CollectdExtraPlugins:
# - disk
# - df
#
## You can use ExtraConfig (or one of the related *ExtraConfig keys)
## to configure collectd. See the documentation for puppet-collectd at
## https://github.com/voxpupuli/puppet-collectd for details.
#
# ExtraConfig:
# collectd::plugin::disk::disks:
# - "/^[vhs]d[a-f][0-9]?$/"
# collectd::plugin::df::mountpoints:
# - "/"
# collectd::plugin::df::ignoreselected: false
# collectd::plugin::cpu::valuespercentage: true

View File

@ -202,6 +202,7 @@ resource_registry:
OS::TripleO::Services::GnocchiStatsd: puppet/services/gnocchi-statsd.yaml
# Services that are disabled by default (use relevant environment files):
OS::TripleO::Services::FluentdClient: OS::Heat::None
OS::TripleO::Services::Collectd: OS::Heat::None
OS::TripleO::LoggingConfiguration: puppet/services/logging/fluentd-config.yaml
OS::TripleO::Services::ManilaApi: OS::Heat::None
OS::TripleO::Services::ManilaScheduler: OS::Heat::None

View File

@ -40,3 +40,11 @@ outputs:
dport: 11211
step_config: |
include ::tripleo::profile::base::memcached
service_config_settings:
collectd:
tripleo.collectd.plugins.memcached:
- memcached
collectd::plugin::memcached::instances:
local:
host: "%{hiera('memcached::listen_ip')}"
port: 11211

View File

@ -0,0 +1,111 @@
heat_template_version: ocata
description: Collectd client service
parameters:
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
DefaultPasswords:
default: {}
type: json
CollectdDefaultPlugins:
default:
- disk
- interface
- load
- memory
- processes
- tcpconns
type: comma_delimited_list
description: >
List of collectd plugins to activate on all overcloud hosts. See
the documentation for the puppet-collectd module for a list plugins
supported by the module (https://github.com/voxpupuli/puppet-collectd).
Set this key to override the default list of plugins. Use
CollectdExtraPlugins if you want to load additional plugins without
overriding the defaults.
CollectdExtraPlugins:
default: []
type: comma_delimited_list
description: >
List of collectd plugins to activate on all overcloud hosts. See
the documentation for the puppet-collectd module for a list plugins
supported by the module (https://github.com/voxpupuli/puppet-collectd).
Set this key to load plugins in addition to those in
CollectdDefaultPlugins.
CollectdServer:
type: string
description: >
Address of remote collectd server to which we will send
metrics.
default: ''
CollectdServerPort:
type: number
default: 25826
description: >
Port on remote collectd server to which we will send
metrics.
CollectdUsername:
type: string
description: >
Username for authenticating to the remote collectd server. The default
is to not configure any authentication.
default: ''
CollectdPassword:
type: string
hidden: true
description: >
Password for authenticating to the remote collectd server. The
default is to not configure any authentication.
default: ''
CollectdSecurityLevel:
type: string
description: >
Security level setting for remote collectd connection.
default: 'None'
constraints:
- allowed_values:
- None
- Sign
- Encrypt
outputs:
role_data:
description: Role data for the Collectd client role.
value:
service_name: collectd
config_settings:
collectd::manage_repo: false
collectd::purge: true
collectd::recurse: true
collectd::purge_config: true
collectd::minimum_version: "5.7"
tripleo::profile::base::metrics::collectd::collectd_server:
get_param: CollectdServer
tripleo::profile::base::metrics::collectd::collectd_port:
get_param: CollectdServerPort
tripleo::profile::base::metrics::collectd::collectd_username:
get_param: CollectdUsername
tripleo::profile::base::metrics::collectd::collectd_password:
get_param: CollectdPassword
tripleo::profile::base::metrics::collectd::collectd_securitylevel:
get_param: CollectdSecurityLevel
tripleo.collectd.plugins.collectd:
yaql:
data:
default_plugins: {get_param: CollectdDefaultPlugins}
extra_plugins: {get_param: CollectdExtraPlugins}
expression: >
($.data.default_plugins + $.data.extra_plugins)
.flatten().distinct()
step_config: |
include ::tripleo::profile::base::metrics::collectd

View File

@ -141,3 +141,8 @@ outputs:
# We'll probably treat it like we do with Neutron plugins.
# Until then, just include it in the default nova-compute role.
include tripleo::profile::base::nova::compute::libvirt
service_config_settings:
collectd:
tripleo.collectd.plugins.nova_compute:
- virt
collectd::plugins::virt::connection: "qemu:///system"

View File

@ -104,6 +104,7 @@
- OS::TripleO::Services::OpenDaylightOvs
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::Collectd
- OS::TripleO::Services::BarbicanApi
- OS::TripleO::Services::PankoApi
- OS::TripleO::Services::Zaqar
@ -141,6 +142,7 @@
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::AuditD
- OS::TripleO::Services::Collectd
- name: BlockStorage
ServicesDefault:
@ -156,6 +158,7 @@
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::AuditD
- OS::TripleO::Services::Collectd
- name: ObjectStorage
disable_upgrade_deployment: True
@ -173,6 +176,7 @@
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::AuditD
- OS::TripleO::Services::Collectd
- name: CephStorage
disable_upgrade_deployment: True
@ -189,3 +193,4 @@
- OS::TripleO::Services::SensuClient
- OS::TripleO::Services::FluentdClient
- OS::TripleO::Services::AuditD
- OS::TripleO::Services::Collectd