aboutsummaryrefslogtreecommitdiffstats
path: root/docker/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'docker/ansible')
-rw-r--r--docker/ansible/roles/config_files/tasks/rdt.yml7
-rw-r--r--docker/ansible/roles/config_files/tasks/virt.yml16
-rw-r--r--docker/ansible/roles/config_files/templates/rdt.conf.j222
-rw-r--r--docker/ansible/roles/config_files/templates/virt.conf.j232
-rw-r--r--docker/ansible/roles/config_files/vars/main.yml6
5 files changed, 16 insertions, 67 deletions
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/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
diff --git a/docker/ansible/roles/config_files/templates/rdt.conf.j2 b/docker/ansible/roles/config_files/templates/rdt.conf.j2
deleted file mode 100644
index 0e1afcfc..00000000
--- a/docker/ansible/roles/config_files/templates/rdt.conf.j2
+++ /dev/null
@@ -1,22 +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.
-
-<LoadPlugin intel_rdt>
- Interval {{ rdt_interval }}
-</LoadPlugin>
-
-<Plugin intel_rdt>
- Cores ""
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/virt.conf.j2 b/docker/ansible/roles/config_files/templates/virt.conf.j2
deleted file mode 100644
index f1ba324d..00000000
--- a/docker/ansible/roles/config_files/templates/virt.conf.j2
+++ /dev/null
@@ -1,32 +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.
-
-LoadPlugin virt
-
-<Plugin virt>
-# Connection "xen:///"
- RefreshInterval 60
-# Domain "name"
-# BlockDevice "name:device"
-# BlockDeviceFormat target
-# BlockDeviceFormatBasename false
-# InterfaceDevice "name:device"
-# IgnoreSelected false
-# HostnameFormat name
-# InterfaceFormat name
-# PluginInstanceFormat name
-# Instances 1
- ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin"
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/vars/main.yml b/docker/ansible/roles/config_files/vars/main.yml
index 4e42791b..410e24ed 100644
--- a/docker/ansible/roles/config_files/vars/main.yml
+++ b/docker/ansible/roles/config_files/vars/main.yml
@@ -42,6 +42,9 @@ collectd_plugin_intel_pmu_report_kernel_pmu_events: True
collectd_plugin_intel_pmu_report_software_events: True
collectd_plugin_intel_pmu_cores: ["0-4"]
+collectd_plugin_intel_rdt_cores: [""]
+collectd_plugin_intel_rdt_interval: "{{ rdt_interval }}"
+
collectd_plugin_logfile_loglevel: "{{ logfile_log_level }}"
collectd_plugin_logfile_file: "{{ logfile_dir }}/collectd.log"
collectd_plugin_logfile_timestamp: True
@@ -49,6 +52,9 @@ collectd_plugin_logfile_timestamp: True
collectd_plugin_ovs_events_dispatch_values: True
collectd_plugin_ovs_events_send_notification: True
+collectd_plugin_virt_extra_stats: "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin"
+collectd_plugin_virt_refresh_interval: 60
+
collectd_plugin_write_kafka_hosts:
- "{{ kafka_ip_addr }}:{{ kafka_port }}"
collectd_plugin_write_kafka_topics: '{{ { kafka_topic: { "format": "JSON" }} }}'