X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=puppet%2Fservices%2Fmetrics%2Fcollectd.yaml;h=d2d9f3dc9a1dfac4cf94f28cbfebe0708570422f;hb=68402dc7f538418b1e0eb23bb782daf7e3bcadd4;hp=e4e7dac72877ed3c58225e78aae67933931f193f;hpb=aa842a1575b15e4d31c9dcfa6298391322ca15c8;p=apex-tripleo-heat-templates.git diff --git a/puppet/services/metrics/collectd.yaml b/puppet/services/metrics/collectd.yaml index e4e7dac7..d2d9f3dc 100644 --- a/puppet/services/metrics/collectd.yaml +++ b/puppet/services/metrics/collectd.yaml @@ -70,7 +70,9 @@ parameters: CollectdSecurityLevel: type: string description: > - Security level setting for remote collectd connection. + Security level setting for remote collectd connection. If it is + set to Sign or Encrypt the CollectdPassword and CollectdUsername + parameters need to be set. default: 'None' constraints: - allowed_values: @@ -109,3 +111,23 @@ outputs: .flatten().distinct() 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