aboutsummaryrefslogtreecommitdiffstats
path: root/docker/ansible/roles/config_files/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'docker/ansible/roles/config_files/tasks')
-rw-r--r--docker/ansible/roles/config_files/tasks/capabilities.yml9
-rw-r--r--docker/ansible/roles/config_files/tasks/csv.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/default_read_import.yml108
-rw-r--r--docker/ansible/roles/config_files/tasks/default_read_plugins.yml34
-rw-r--r--docker/ansible/roles/config_files/tasks/dpdk.yml25
-rw-r--r--docker/ansible/roles/config_files/tasks/exec.yml8
-rw-r--r--docker/ansible/roles/config_files/tasks/hugepages.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/ipmi.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/kafka.yml9
-rw-r--r--docker/ansible/roles/config_files/tasks/logfile.yml10
-rw-r--r--docker/ansible/roles/config_files/tasks/logparser.yml5
-rw-r--r--docker/ansible/roles/config_files/tasks/main.yml50
-rw-r--r--docker/ansible/roles/config_files/tasks/network.yml22
-rw-r--r--docker/ansible/roles/config_files/tasks/ovs.yml (renamed from docker/ansible/roles/config_files/tasks/vswitch.yml)20
-rw-r--r--docker/ansible/roles/config_files/tasks/pmu.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/prometheus.yml9
-rw-r--r--docker/ansible/roles/config_files/tasks/rdt.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/snmp_agent.yml4
-rw-r--r--docker/ansible/roles/config_files/tasks/syslog.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/uuid.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/virt.yml16
21 files changed, 168 insertions, 210 deletions
diff --git a/docker/ansible/roles/config_files/tasks/capabilities.yml b/docker/ansible/roles/config_files/tasks/capabilities.yml
index 55672e83..cfca03a2 100644
--- a/docker/ansible/roles/config_files/tasks/capabilities.yml
+++ b/docker/ansible/roles/config_files/tasks/capabilities.yml
@@ -1,4 +1,4 @@
-#Copyright 2019 OPNFV and Intel Corporation
+# Copyright 2019-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,11 +14,8 @@
---
- name: enable capabilities plugin
- template:
- src: experimental/capabilities.conf.j2
- dest: "{{ config_file_dir }}/capabilities.conf"
- when: flavor|default('stable')|string == 'experimental'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['capabilities']) | unique }}"
tags:
- capabilities
-
diff --git a/docker/ansible/roles/config_files/tasks/csv.yml b/docker/ansible/roles/config_files/tasks/csv.yml
index 0be4ec8f..bfd88c0e 100644
--- a/docker/ansible/roles/config_files/tasks/csv.yml
+++ b/docker/ansible/roles/config_files/tasks/csv.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,9 +14,8 @@
---
- name: enable csv plugin
- template:
- src: csv.conf.j2
- dest: "{{ config_file_dir }}/csv.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['csv']) | unique }}"
tags:
- csv
diff --git a/docker/ansible/roles/config_files/tasks/default_read_import.yml b/docker/ansible/roles/config_files/tasks/default_read_import.yml
index d70919b3..46b4d516 100644
--- a/docker/ansible/roles/config_files/tasks/default_read_import.yml
+++ b/docker/ansible/roles/config_files/tasks/default_read_import.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 OPNFV, Intel Corporation and Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,123 +12,107 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-
- name: enable contextswitch plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin contextswitch(\s+.*)?$'
- replace: '\1LoadPlugin contextswitch\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['contextswitch']) | unique }}"
tags:
+ - en_default_all
- contextswitch
- name: enable cpu plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin cpu(\s+.*)?$'
- replace: '\1LoadPlugin cpu\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['cpu']) | unique }}"
tags:
+ - en_default_all
- cpu
- name: enable cpufreq plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin cpufreq(\s+.*)?$'
- replace: '\1LoadPlugin cpufreq\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['cpufreq']) | unique }}"
tags:
+ - en_default_all
- cpufreq
- name: enable df plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin df(\s+.*)?$'
- replace: '\1LoadPlugin df\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['df']) | unique }}"
tags:
+ - en_default_all
- df
- name: enable disk plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin disk(\s+.*)?$'
- replace: '\1LoadPlugin disk\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['disk']) | unique }}"
tags:
+ - en_default_all
- disk
- name: enable ethstat plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin ethstat(\s+.*)?$'
- replace: '\1LoadPlugin ethstat\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['ethstat']) | unique }}"
tags:
+ - en_default_all
- ethstat
- name: enable ipc plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin ipc(\s+.*)?$'
- replace: '\1LoadPlugin ipc\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['ipc']) | unique }}"
tags:
+ - en_default_all
- ipc
- name: enable irq plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin irq(\s+.*)?$'
- replace: '\1LoadPlugin irq\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['irq']) | unique }}"
tags:
+ - en_default_all
- irq
- name: enable load plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin load(\s+.*)?$'
- replace: '\1LoadPlugin load\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['load']) | unique }}"
tags:
+ - en_default_all
- load
- name: enable memory plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin memory(\s+.*)?$'
- replace: '\1LoadPlugin memory\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['memory']) | unique }}"
tags:
+ - en_default_all
- memory
- name: enable numa plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin numa(\s+.*)?$'
- replace: '\1LoadPlugin numa\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['numa']) | unique }}"
tags:
+ - en_default_all
- numa
- name: enable processes plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin processes(\s+.*)?$'
- replace: '\1LoadPlugin processes\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['processes']) | unique }}"
tags:
+ - en_default_all
- processes
- name: enable swap plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin swap(\s+.*)?$'
- replace: '\1LoadPlugin swap\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['swap']) | unique }}"
tags:
+ - en_default_all
- swap
- name: enable turbostat plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin turbostat(\s+.*)?$'
- replace: '\1LoadPlugin turbostat\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['turbostat']) | unique }}"
tags:
+ - en_default_all
- turbostat
- name: enable uptime plugin
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin uptime(\s+.*)?$'
- replace: '\1LoadPlugin uptime\2'
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['uptime']) | unique }}"
tags:
+ - en_default_all
- uptime
diff --git a/docker/ansible/roles/config_files/tasks/default_read_plugins.yml b/docker/ansible/roles/config_files/tasks/default_read_plugins.yml
deleted file mode 100644
index 95b942c2..00000000
--- a/docker/ansible/roles/config_files/tasks/default_read_plugins.yml
+++ /dev/null
@@ -1,34 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
----
-
-- name: copy default template to system
- template:
- src: default_read_plugins.conf.j2
- dest: "{{ config_file_dir }}/default_read_plugins.conf"
- tags:
- - always
-
-- name: enable all default plugins
- replace:
- path: "{{ config_file_dir }}/default_read_plugins.conf"
- regexp: '(\s+)#LoadPlugin(\s+.*)?$'
- replace: '\1LoadPlugin\2'
- register: en_default_all
- tags:
- - en_default_all
-
-- name: include per default plugin tasks
- include: default_read_import.yml
- when: en_default_all is not defined \ No newline at end of file
diff --git a/docker/ansible/roles/config_files/tasks/dpdk.yml b/docker/ansible/roles/config_files/tasks/dpdk.yml
index 5ae05cbb..2be146b0 100644
--- a/docker/ansible/roles/config_files/tasks/dpdk.yml
+++ b/docker/ansible/roles/config_files/tasks/dpdk.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,27 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-
-- name: enable dpdkstat plugin
- template:
- src: dpdkstat.conf.j2
- dest: "{{ config_file_dir }}/dpdkstat.conf"
- tags:
- # require this to be explicitly enabled
- - never
- - dpdkstat
-
-- name: enable dpdkevents plugin
- template:
- src: dpdkevents.conf.j2
- dest: "{{ config_file_dir }}/dpdkevents.conf"
- tags:
- - never
- - dpdkevents
-
- name: enable dpdk_telemetry plugin
- template:
- src: dpdk_telemetry.conf.j2
- dest: "{{ config_file_dir }}/dpdk_telemetry.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['dpdk_telemetry']) | unique }}"
tags:
- dpdk_telemetry
diff --git a/docker/ansible/roles/config_files/tasks/exec.yml b/docker/ansible/roles/config_files/tasks/exec.yml
index b7389703..956e3a8f 100644
--- a/docker/ansible/roles/config_files/tasks/exec.yml
+++ b/docker/ansible/roles/config_files/tasks/exec.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,10 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
-
- name: enable exec plugin
- template:
- src: exec.conf.j2
- dest: "{{ config_file_dir }}/exec.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['exec']) | unique }}"
tags:
- exec
diff --git a/docker/ansible/roles/config_files/tasks/hugepages.yml b/docker/ansible/roles/config_files/tasks/hugepages.yml
index 43dca504..5b4ec0ba 100644
--- a/docker/ansible/roles/config_files/tasks/hugepages.yml
+++ b/docker/ansible/roles/config_files/tasks/hugepages.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -25,9 +25,8 @@
- hugepages
- name: enable hugepages plugin
- template:
- src: hugepages.conf.j2
- dest: "{{ config_file_dir }}//hugepages.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['hugepages']) | unique }}"
when: hugepages_result is succeeded
tags:
- hugepages
diff --git a/docker/ansible/roles/config_files/tasks/ipmi.yml b/docker/ansible/roles/config_files/tasks/ipmi.yml
index 558d5393..12913a85 100644
--- a/docker/ansible/roles/config_files/tasks/ipmi.yml
+++ b/docker/ansible/roles/config_files/tasks/ipmi.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -52,9 +52,8 @@
- ipmi
- name: enable ipmi plugin
- template:
- src: ipmi.conf.j2
- dest: "{{ config_file_dir }}/0_ipmi.conf"
+ set_fact:
+ collectd_plugins: '{{ collectd_plugins | union(["ipmi"]) | unique }}'
when: (ipmi0_exists is succeeded) and (ipmi_devintf is succeeded) and (ipmi_devsi is succeeded)
tags:
- ipmi
diff --git a/docker/ansible/roles/config_files/tasks/kafka.yml b/docker/ansible/roles/config_files/tasks/kafka.yml
index d7639cbf..6fb3f050 100644
--- a/docker/ansible/roles/config_files/tasks/kafka.yml
+++ b/docker/ansible/roles/config_files/tasks/kafka.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,9 +13,8 @@
# limitations under the License.
---
-- name: enable kafka plugin
- template:
- src: kafka.conf.j2
- dest: "{{ config_file_dir }}/kafka.conf"
+- name: enable kafka plugin with collectd_config
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['write_kafka']) | unique }}"
tags:
- kafka
diff --git a/docker/ansible/roles/config_files/tasks/logfile.yml b/docker/ansible/roles/config_files/tasks/logfile.yml
index b2700594..cd1c1049 100644
--- a/docker/ansible/roles/config_files/tasks/logfile.yml
+++ b/docker/ansible/roles/config_files/tasks/logfile.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,12 +14,8 @@
---
- name: enable logfile plugin
- template:
- src: logfile.conf.j2
- dest: "{{ config_file_dir }}/logfile.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['logfile']) | unique }}"
tags:
- logfile
-
-
-
diff --git a/docker/ansible/roles/config_files/tasks/logparser.yml b/docker/ansible/roles/config_files/tasks/logparser.yml
index 615d2e2b..72adcea2 100644
--- a/docker/ansible/roles/config_files/tasks/logparser.yml
+++ b/docker/ansible/roles/config_files/tasks/logparser.yml
@@ -1,4 +1,4 @@
-#Copyright 2019 OPNFV and Intel Corporation
+# Copyright 2019-21 Anuket, Intel Corporation, and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -15,9 +15,8 @@
- name: enable logparser plugin
template:
- src: experimental/logparser.conf.j2
+ src: logparser.conf.j2
dest: "{{ config_file_dir }}/logparser.conf"
- when: flavor|default('stable')|string == 'experimental'
tags:
- logparser
diff --git a/docker/ansible/roles/config_files/tasks/main.yml b/docker/ansible/roles/config_files/tasks/main.yml
index 3221242d..9b241890 100644
--- a/docker/ansible/roles/config_files/tasks/main.yml
+++ b/docker/ansible/roles/config_files/tasks/main.yml
@@ -1,4 +1,5 @@
-# Copyright 2018-2019 Intel Corporation and OPNFV. All rights reserved.
+# Copyright 2018-2021 Intel Corporation, Anuket and others.
+# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -37,7 +38,7 @@
import_tasks: csv.yml
- name: enable default plugins
- import_tasks: default_read_plugins.yml
+ import_tasks: default_read_import.yml
- name: enable dpdk plugins
import_tasks: dpdk.yml
@@ -82,14 +83,59 @@
- name: enable syslog plugin
import_tasks: syslog.yml
+- name: enable ovs plugins
+ import_tasks: ovs.yml
+
- name: enable virt plugin
import_tasks: virt.yml
- name: enable ipmi plugin
include: ipmi.yml
+- name: Enable unixsock plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['unixsock']) | unique }}"
+ tags:
+ - unixsock
+
- name: enable uuid plugin
include: uuid.yml
+- name: configure plugins
+ include_role:
+ name: collectd_config
+ vars:
+ collectd_conf_output_dir: /tmp/collectd.conf.d
+ tags:
+ - always
+ - en_default_all
+
+- name: Copy the generated plugin configs
+ copy:
+ src: "{{ item.src }}"
+ dest: "{{ item.dest }}"
+ with_items:
+ - { src: "/tmp/collectd.conf.d/", dest: "{{ config_file_dir }}" }
+ - { src: "/tmp/collectd.conf", dest: "{{ config_file_dir }}/../collectd.conf" }
+ tags:
+ - always
+ - en_default_all
+
+- name: Update TypesDB location
+ lineinfile:
+ path: "{{ config_file_dir }}../collectd.conf"
+ regexp: '^TypesDB "/usr/share/collectd/types.db"$'
+ line: 'TypesDB "/opt/collectd/share/collectd/types.db"'
+
+- name: Update config file location
+ lineinfile:
+ path: "{{ config_file_dir }}../collectd.conf"
+ regexp: "^(.*)/tmp/collectd.conf.d(.*)$"
+ line: '\1{{ config_file_dir }}\2'
+ backrefs: yes
+ tags:
+ - always
+ - en_default_all
+
- name: copy additional config files
include: additional_configs.yml
diff --git a/docker/ansible/roles/config_files/tasks/network.yml b/docker/ansible/roles/config_files/tasks/network.yml
index 52902d4c..0af6a713 100644
--- a/docker/ansible/roles/config_files/tasks/network.yml
+++ b/docker/ansible/roles/config_files/tasks/network.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,26 +14,24 @@
---
- name: Enable network plugin
- template:
- src: network.conf.j2
- dest: "{{ config_file_dir }}/network.conf"
+ set_fact:
+ collectd_plugins: '{{ collectd_plugins | union (["network"]) | unique }}'
tags:
- network
- name: Add network port if defined
- lineinfile:
- dest: "{{ config_file_dir }}/network.conf"
- insertafter: Plugin network
- line: " Server \"{{ network_ip_addr }}\" \"{{ network_port }}\""
+ set_fact:
+ collectd_plugin_network_server: "{{ collectd_plugin_network_server | default([]) | union([{
+ 'name': network_ip_addr,
+ 'port': network_port,
+ }]) }}"
when: network_ip_addr is defined
tags:
- network
- name: Modify network.conf to add influxdb_hosts
- lineinfile:
- dest: "{{ config_file_dir }}/network.conf"
- insertafter: Plugin network
- line: " Server \"{{ item }}\" \"{{ influx_network_port }}\""
+ set_fact:
+ collectd_plugin_network_server: "{{ collectd_plugin_network_server | default([]) | union([{ 'name': item, 'port': influx_network_port }]) }}"
with_items: "{{ groups['influxdb_hosts'] }}"
tags:
- network
diff --git a/docker/ansible/roles/config_files/tasks/vswitch.yml b/docker/ansible/roles/config_files/tasks/ovs.yml
index c3028822..fe3f0a13 100644
--- a/docker/ansible/roles/config_files/tasks/vswitch.yml
+++ b/docker/ansible/roles/config_files/tasks/ovs.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -31,17 +31,21 @@
- ovs_events
- name: enable ovs_stats plugin
- template:
- src: "ovs_stats.conf.j2"
- dest: "{{ config_file_dir }}/ovs_stats.conf"
+ set_fact:
+ collectd_plugins: '{{ collectd_plugins | union(["ovs_stats"]) | unique }}'
+ collectd_plugin_ovs_stats_port: "{{ ovs_stats_port if ovs_stats_port is defined else omit }}"
+ collectd_plugin_ovs_stats_address: "{{ ovs_stats_ip_addr if ovs_stats_ip_addr is defined else omit }}"
+ collectd_plugin_ovs_stats_interval: "{{ ovs_stats_interval if ovs_stats_interval is defined else omit }}"
when: (vswitchd_running is succeeded) and (dbsock_exists is succeeded)
tags:
- - ovs_stats
+ - ovs_stats
- name: enable ovs_events plugin
- template:
- src: "ovs_events.conf.j2"
- dest: "{{ config_file_dir }}/ovs_events.conf"
+ set_fact:
+ collectd_plugins: '{{ collectd_plugins | union(["ovs_events"]) | unique }}'
+ collectd_plugin_ovs_events_interval: "{{ ovs_events_interval if ovs_events_interval is defined else omit }}"
+ collectd_plugin_ovs_events_address: "{{ ovs_events_ip_addr if ovs_events_ip_addr is defined else omit }}"
+ collectd_plugin_ovs_events_port: "{{ ovs_events_port if ovs_events_port is defined else omit }}"
when: (vswitchd_running is succeeded) and (dbsock_exists is succeeded)
tags:
- ovs_events
diff --git a/docker/ansible/roles/config_files/tasks/pmu.yml b/docker/ansible/roles/config_files/tasks/pmu.yml
index 20e3034c..c5820f98 100644
--- a/docker/ansible/roles/config_files/tasks/pmu.yml
+++ b/docker/ansible/roles/config_files/tasks/pmu.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,8 +14,7 @@
---
- name: enable intel_pmu plugin
- template:
- src: intel_pmu.conf.j2
- dest: "{{ config_file_dir }}/intel_pmu.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['intel_pmu']) | unique }}"
tags:
- pmu
diff --git a/docker/ansible/roles/config_files/tasks/prometheus.yml b/docker/ansible/roles/config_files/tasks/prometheus.yml
index 51f2b1f6..c0e7e79d 100644
--- a/docker/ansible/roles/config_files/tasks/prometheus.yml
+++ b/docker/ansible/roles/config_files/tasks/prometheus.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,8 +14,7 @@
---
- name: enable prometheus plugin
- template:
- src: prometheus.conf.j2
- dest: "{{ config_file_dir }}/prometheus.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['write_prometheus']) | unique }}"
tags:
- - prometheus \ No newline at end of file
+ - prometheus
diff --git a/docker/ansible/roles/config_files/tasks/rdt.yml b/docker/ansible/roles/config_files/tasks/rdt.yml
index bad67b78..f0a46261 100644
--- a/docker/ansible/roles/config_files/tasks/rdt.yml
+++ b/docker/ansible/roles/config_files/tasks/rdt.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -29,9 +29,8 @@
- rdt
- name: enable rdt plugin
- template:
- src: rdt.conf.j2
- dest: "{{ config_file_dir }}/rdt.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['intel_rdt']) | unique }}"
when: (rdt_result is succeeded) and (virt_file.stat.exists == False)
tags:
- rdt
diff --git a/docker/ansible/roles/config_files/tasks/snmp_agent.yml b/docker/ansible/roles/config_files/tasks/snmp_agent.yml
index c72aee48..5e1ba975 100644
--- a/docker/ansible/roles/config_files/tasks/snmp_agent.yml
+++ b/docker/ansible/roles/config_files/tasks/snmp_agent.yml
@@ -21,9 +21,9 @@
tags:
- snmp
-- name: enable snmp agent for master container
+- name: enable snmp agent for non-stable container
template:
- src: master/snmp_agent.conf.j2
+ src: latest/snmp_agent.conf.j2
dest: "{{ config_file_dir }}/snmp_agent.conf"
when: flavor|default('stable')|string != 'stable'
tags:
diff --git a/docker/ansible/roles/config_files/tasks/syslog.yml b/docker/ansible/roles/config_files/tasks/syslog.yml
index 97864a5d..e9ab06f3 100644
--- a/docker/ansible/roles/config_files/tasks/syslog.yml
+++ b/docker/ansible/roles/config_files/tasks/syslog.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,9 +14,8 @@
---
- name: enable syslog plugin
- template:
- src: syslog.conf.j2
- dest: "{{ config_file_dir }}/syslog.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['syslog']) | unique }}"
tags:
- syslog
diff --git a/docker/ansible/roles/config_files/tasks/uuid.yml b/docker/ansible/roles/config_files/tasks/uuid.yml
index 25cfa128..df669e1a 100644
--- a/docker/ansible/roles/config_files/tasks/uuid.yml
+++ b/docker/ansible/roles/config_files/tasks/uuid.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -14,8 +14,7 @@
---
- name: enable uuid plugin
- template:
- src: uuid.conf.j2
- dest: "{{ config_file_dir }}/uuid.conf"
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['uuid']) | unique }}"
tags:
- uuid
diff --git a/docker/ansible/roles/config_files/tasks/virt.yml b/docker/ansible/roles/config_files/tasks/virt.yml
index 7fb0bb92..75a17a18 100644
--- a/docker/ansible/roles/config_files/tasks/virt.yml
+++ b/docker/ansible/roles/config_files/tasks/virt.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -21,16 +21,14 @@
- virt
- name: (virt) check if rdt is enabled
- stat:
- path: "{{ config_file_dir }}/rdt.conf"
- register: rdt_file
+ set_fact:
+ rdt_enabled: true
tags:
- - virt
+ - rdt
- name: enable virt plugin
- template:
- src: virt.conf.j2
- dest: "{{ config_file_dir }}/virt.conf"
- when: libvirt_result is succeeded and rdt_file.stat.exists == False
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['virt']) | unique }}"
+ when: libvirt_result is succeeded and not (rdt_enabled | default(false))
tags:
- virt