X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=puppet%2Fservices%2Fmetrics%2Fcollectd.yaml;h=7fd301b2b8af3f14ce1856d777e47210c19ff86b;hb=33bc901670a952b626d303c91466a593d1310167;hp=b68a5eca80d1091f85dca33bf17ec00ff7e7c5cc;hpb=f209f0aa48d277ecb8300ef33225f6ce6e24a4ae;p=apex-tripleo-heat-templates.git diff --git a/puppet/services/metrics/collectd.yaml b/puppet/services/metrics/collectd.yaml index b68a5eca..7fd301b2 100644 --- a/puppet/services/metrics/collectd.yaml +++ b/puppet/services/metrics/collectd.yaml @@ -1,8 +1,12 @@ -heat_template_version: ocata +heat_template_version: pike description: Collectd client service parameters: + ServiceData: + default: {} + description: Dictionary packing service data + type: json ServiceNetMap: default: {} description: Mapping of service_name -> network name. Typically set @@ -17,6 +21,14 @@ parameters: DefaultPasswords: default: {} type: json + RoleName: + default: '' + description: Role name on which the service is applied + type: string + RoleParameters: + default: {} + description: Parameters specific to the role + type: json CollectdDefaultPlugins: default: - disk @@ -112,11 +124,22 @@ outputs: step_config: | include ::tripleo::profile::base::metrics::collectd upgrade_tasks: + - name: Check if collectd is deployed + command: systemctl is-enabled collectd + tags: common + ignore_errors: True + register: collectd_enabled - name: Check status of collectd service shell: > /usr/bin/systemctl show collectd --property ActiveState | grep '\bactive\b' + when: collectd_enabled.rc == 0 tags: step0,validation - name: Stop collectd service tags: step1 + when: collectd_enabled.rc == 0 service: name=collectd state=stopped + - name: Install collectd package if it was disabled + tags: step3 + yum: name=collectd state=latest + when: collectd_enabled.rc != 0