1 # Copyright 2018-2021 Intel Corporation, Anuket and others.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 - name: Clean collectd config dir path
21 path: "{{ config_file_dir }}"
26 - name: Create collectd.d folder on remote host
28 path: "{{ config_file_dir }}"
34 - name: enable capabilities plugin
35 import_tasks: capabilities.yml
37 - name: enable csv plugin
40 - name: enable default plugins
41 import_tasks: default_read_import.yml
43 - name: enable dpdk plugins
44 import_tasks: dpdk.yml
46 - name: enable exec plugin
47 import_tasks: exec.yml
49 - name: enable hugepages plugin
50 import_tasks: hugepages.yml
52 - name: enable kafka plugin
53 import_tasks: kafka.yml
55 - name: enable logfile plugin
56 import_tasks: logfile.yml
58 - name: enable logparser plugin
59 import_tasks: logparser.yml
61 - name: enable mcelog plugin
62 import_tasks: mcelog.yml
64 - name: enable network plugin
65 import_tasks: network.yml
67 - name: enable prometheus plugin
68 import_tasks: prometheus.yml
69 when: groups['prometheus_hosts'] is defined
71 - name: enable pmu plugin
74 - name: enable rdt plugin
77 - name: enable rddtool plugin
78 import_tasks: rrdtool.yml
80 - name: enable snmp_agent plugin
81 import_tasks: snmp_agent.yml
83 - name: enable syslog plugin
84 import_tasks: syslog.yml
86 - name: enable ovs plugins
89 - name: enable virt plugin
90 import_tasks: virt.yml
92 - name: enable ipmi plugin
95 - name: Enable unixsock plugin
97 collectd_plugins: "{{ collectd_plugins | union(['unixsock']) | unique }}"
101 - name: enable uuid plugin
104 - name: configure plugins
106 name: collectd_config
108 collectd_conf_output_dir: /tmp/collectd.conf.d
113 - name: Copy the generated plugin configs
115 src: "{{ item.src }}"
116 dest: "{{ item.dest }}"
118 - { src: "/tmp/collectd.conf.d/", dest: "{{ config_file_dir }}" }
119 - { src: "/tmp/collectd.conf", dest: "{{ config_file_dir }}/../collectd.conf" }
124 - name: Update TypesDB location
126 path: "{{ config_file_dir }}../collectd.conf"
127 regexp: '^TypesDB "/usr/share/collectd/types.db"$'
128 line: 'TypesDB "/opt/collectd/share/collectd/types.db"'
130 - name: Update config file location
132 path: "{{ config_file_dir }}../collectd.conf"
133 regexp: "^(.*)/tmp/collectd.conf.d(.*)$"
134 line: '\1{{ config_file_dir }}\2'
140 - name: copy additional config files
141 include: additional_configs.yml