1 heat_template_version: pike
3 description: Sensu client configured with Puppet
8 description: Dictionary packing service data
12 description: Mapping of service_name -> network name. Typically set
13 via parameter_defaults in the resource registry. This
14 mapping overrides those in ServiceNetMapDefaults.
21 description: Role name on which the service is applied
25 description: Parameters specific to the role
30 Mapping of service endpoint -> protocol. Typically set
31 via parameter_defaults in the resource registry.
34 description: Keystone admin user password
38 description: Keystone region for endpoint
40 SensuClientCustomConfig:
42 description: Hash containing custom sensu-client variables.
44 label: Custom configuration for Sensu Client variables
48 type: ./sensu-base.yaml
50 ServiceData: {get_param: ServiceData}
51 ServiceNetMap: {get_param: ServiceNetMap}
52 DefaultPasswords: {get_param: DefaultPasswords}
53 EndpointMap: {get_param: EndpointMap}
54 RoleName: {get_param: RoleName}
55 RoleParameters: {get_param: RoleParameters}
59 description: Role data for the Sensu client role.
61 service_name: sensu_client
62 monitoring_subscription: all
65 - get_attr: [SensuBase, role_data, config_settings]
71 - {get_param: SensuClientCustomConfig}
74 password: {get_param: AdminPassword}
75 auth_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
77 region: {get_param: KeystoneRegion}
79 include ::tripleo::profile::base::monitoring::sensu
81 - name: Check if sensu_client is deployed
82 command: systemctl is-enabled sensu-client
85 register: sensu_client_enabled
86 - name: Check status of sensu-client service
88 /usr/bin/systemctl show sensu-client --property ActiveState |
90 when: sensu_client_enabled.rc == 0
91 tags: step0,validation
92 - name: Stop sensu-client service
94 when: sensu_client_enabled.rc == 0
95 service: name=sensu-client state=stopped
96 - name: Install sensu package if it was disabled
98 yum: name=sensu state=latest
99 when: sensu_client_enabled.rc != 0