3ae7110ff916a18b3b66fecc595fa7e61f36c2ed
[apex-tripleo-heat-templates.git] / puppet / services / logging / fluentd-client.yaml
1 heat_template_version: 2016-10-14
2
3 description: Fluentd client configured with Puppet
4
5 parameters:
6   ServiceNetMap:
7     default: {}
8     description: Mapping of service_name -> network name. Typically set
9                  via parameter_defaults in the resource registry.  This
10                  mapping overrides those in ServiceNetMapDefaults.
11     type: json
12   DefaultPasswords:
13     default: {}
14     type: json
15   EndpointMap:
16     default: {}
17     description: >
18       Mapping of service endpoint -> protocol. Typically set
19       via parameter_defaults in the resource registry.
20     type: json
21
22 resources:
23   FluentdBase:
24     type: ./fluentd-base.yaml
25     properties:
26       EndpointMap: {get_param: EndpointMap}
27       ServiceNetMap: {get_param: ServiceNetMap}
28       DefaultPasswords: {get_param: DefaultPasswords}
29
30   LoggingConfiguration:
31     type: OS::TripleO::LoggingConfiguration
32
33 outputs:
34   role_data:
35     description: Role data for the Fluentd client role.
36     value:
37       service_name: fluentd_client
38       config_settings:
39         map_merge:
40           - get_attr: [FluentdBase, role_data, config_settings]
41           - tripleo::profile::base::logging::fluentd::fluentd_servers:
42               get_attr: [LoggingConfiguration, LoggingServers]
43             tripleo::profile::base::logging::fluentd::fluentd_filters:
44               yaql:
45                 expression: >
46                   $.data.filters.flatten().where($)
47                 data:
48                   filters:
49                     - get_attr: [LoggingConfiguration, LoggingDefaultFilters]
50                     - get_attr: [LoggingConfiguration, LoggingExtraFilters]
51             tripleo::profile::base::logging::fluentd::fluentd_pos_file_path:
52               get_attr: [LoggingConfiguration, LoggingPosFilePath]
53             tripleo::profile::base::logging::fluentd::fluentd_use_ssl:
54               get_attr: [LoggingConfiguration, LoggingUsesSSL]
55             tripleo::profile::base::logging::fluentd::fluentd_ssl_certificate:
56               get_attr: [LoggingConfiguration, LoggingSSLCertificate]
57             tripleo::profile::base::logging::fluentd::fluentd_ssl_key:
58               get_attr: [LoggingConfiguration, LoggingSSLKey]
59             tripleo::profile::base::logging::fluentd::fluentd_ssl_key_passphrase:
60               get_attr: [LoggingConfiguration, LoggingSSLKeyPassphrase]
61             tripleo::profile::base::logging::fluentd::fluentd_shared_key:
62               get_attr: [LoggingConfiguration, LoggingSharedKey]
63       step_config: |
64         include ::tripleo::profile::base::logging::fluentd