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: The password for the keystone admin account, used for monitoring, querying neutron etc.
39 description: Keystone region for endpoint
41 SensuClientCustomConfig:
43 description: Hash containing custom sensu-client variables.
45 label: Custom configuration for Sensu Client variables
49 type: ./sensu-base.yaml
51 ServiceData: {get_param: ServiceData}
52 ServiceNetMap: {get_param: ServiceNetMap}
53 DefaultPasswords: {get_param: DefaultPasswords}
54 EndpointMap: {get_param: EndpointMap}
55 RoleName: {get_param: RoleName}
56 RoleParameters: {get_param: RoleParameters}
60 description: Role data for the Sensu client role.
62 service_name: sensu_client
63 monitoring_subscription: all
66 - get_attr: [SensuBase, role_data, config_settings]
72 - {get_param: SensuClientCustomConfig}
75 password: {get_param: AdminPassword}
76 auth_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
78 region: {get_param: KeystoneRegion}
80 include ::tripleo::profile::base::monitoring::sensu
82 - name: Check if sensu_client is deployed
83 command: systemctl is-enabled sensu-client
86 register: sensu_client_enabled
87 - name: Check status of sensu-client service
89 /usr/bin/systemctl show sensu-client --property ActiveState |
91 when: sensu_client_enabled.rc == 0
92 tags: step0,validation
93 - name: Stop sensu-client service
95 when: sensu_client_enabled.rc == 0
96 service: name=sensu-client state=stopped
97 - name: Install sensu package if it was disabled
99 yum: name=sensu state=latest
100 when: sensu_client_enabled.rc != 0