aboutsummaryrefslogtreecommitdiffstats
path: root/docker/ansible/roles
diff options
context:
space:
mode:
Diffstat (limited to 'docker/ansible/roles')
-rw-r--r--docker/ansible/roles/build_collectd/tasks/main.yml71
-rw-r--r--docker/ansible/roles/config_files/defaults/main.yml60
-rw-r--r--docker/ansible/roles/config_files/tasks/additional_configs.yml23
-rw-r--r--docker/ansible/roles/config_files/tasks/capabilities.yml21
-rw-r--r--docker/ansible/roles/config_files/tasks/csv.yml21
-rw-r--r--docker/ansible/roles/config_files/tasks/default_read_import.yml118
-rw-r--r--docker/ansible/roles/config_files/tasks/dpdk.yml19
-rw-r--r--docker/ansible/roles/config_files/tasks/exec.yml19
-rw-r--r--docker/ansible/roles/config_files/tasks/hugepages.yml32
-rw-r--r--docker/ansible/roles/config_files/tasks/ipmi.yml60
-rw-r--r--docker/ansible/roles/config_files/tasks/kafka.yml20
-rw-r--r--docker/ansible/roles/config_files/tasks/logfile.yml21
-rw-r--r--docker/ansible/roles/config_files/tasks/logparser.yml22
-rw-r--r--docker/ansible/roles/config_files/tasks/main.yml141
-rw-r--r--docker/ansible/roles/config_files/tasks/make_mcelog.yml36
-rw-r--r--docker/ansible/roles/config_files/tasks/mcelog.yml78
-rw-r--r--docker/ansible/roles/config_files/tasks/network.yml38
-rw-r--r--docker/ansible/roles/config_files/tasks/ovs.yml53
-rw-r--r--docker/ansible/roles/config_files/tasks/pmu.yml20
-rw-r--r--docker/ansible/roles/config_files/tasks/prometheus.yml20
-rw-r--r--docker/ansible/roles/config_files/tasks/rdt.yml38
-rw-r--r--docker/ansible/roles/config_files/tasks/rrdtool.yml22
-rw-r--r--docker/ansible/roles/config_files/tasks/snmp_agent.yml30
-rw-r--r--docker/ansible/roles/config_files/tasks/syslog.yml21
-rw-r--r--docker/ansible/roles/config_files/tasks/uuid.yml20
-rw-r--r--docker/ansible/roles/config_files/tasks/virt.yml34
-rw-r--r--docker/ansible/roles/config_files/templates/latest/snmp_agent.conf.j2398
-rw-r--r--docker/ansible/roles/config_files/templates/logparser.conf.j275
-rw-r--r--docker/ansible/roles/config_files/templates/mcelog.conf.j226
-rw-r--r--docker/ansible/roles/config_files/templates/rrdtool.conf.j221
-rw-r--r--docker/ansible/roles/config_files/templates/snmp_agent.conf.j2398
-rw-r--r--docker/ansible/roles/config_files/vars/main.yml67
-rw-r--r--docker/ansible/roles/install_docker/tasks/centos.yml45
-rw-r--r--docker/ansible/roles/install_docker/tasks/fedora.yml47
-rw-r--r--docker/ansible/roles/install_docker/tasks/main.yml37
-rw-r--r--docker/ansible/roles/install_docker/tasks/proxy.yml55
-rw-r--r--docker/ansible/roles/install_docker/tasks/ubuntu.yml50
-rw-r--r--docker/ansible/roles/install_docker/vars/main.yml18
-rw-r--r--docker/ansible/roles/run_collectd/tasks/main.yml63
-rw-r--r--docker/ansible/roles/run_collectd/vars/main.yml23
-rw-r--r--docker/ansible/roles/run_grafana/tasks/main.yml52
-rw-r--r--docker/ansible/roles/run_grafana/vars/main.yml19
-rw-r--r--docker/ansible/roles/run_influxdb/tasks/main.yml48
-rw-r--r--docker/ansible/roles/run_kafka/tasks/main.yml52
-rw-r--r--docker/ansible/roles/run_kafka/vars/main.yml22
-rw-r--r--docker/ansible/roles/run_prometheus/tasks/main.yml65
-rw-r--r--docker/ansible/roles/run_prometheus/templates/prometheus.yml24
-rw-r--r--docker/ansible/roles/run_prometheus/vars/main.yml21
-rw-r--r--docker/ansible/roles/run_ves/tasks/main.yml41
-rw-r--r--docker/ansible/roles/run_zookeeper/tasks/main.yml41
50 files changed, 2766 insertions, 0 deletions
diff --git a/docker/ansible/roles/build_collectd/tasks/main.yml b/docker/ansible/roles/build_collectd/tasks/main.yml
new file mode 100644
index 00000000..6faddde5
--- /dev/null
+++ b/docker/ansible/roles/build_collectd/tasks/main.yml
@@ -0,0 +1,71 @@
+# Copyright 2021 Anuket and others
+#
+# 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: Build stable container
+ docker_image:
+ name: anuket/barometer-collectd
+ build:
+ path: "{{ playbook_dir }}/../barometer-collectd/"
+ source: build
+ tags:
+ - stable
+
+- name: Build the latest container
+ docker_image:
+ name: anuket/barometer-collectd-latest
+ build:
+ path: "{{ playbook_dir }}/../../"
+ dockerfile: "docker/barometer-collectd-latest/Dockerfile"
+ source: build
+ tags:
+ - latest
+
+- name: Build collectd-experimental
+ docker_image:
+ name: anuket/barometer-collectd-experimental
+ build:
+ path: "{{ playbook_dir }}/../../"
+ dockerfile: "docker/barometer-collectd-experimental/Dockerfile"
+ args:
+ COLLECTD_FLAVOR: experimental
+ COLLECTD_TAG: "{{ COLLECTD_TAG | default('main') }}"
+ COLLECTD_PULL_REQUESTS: "{{ COLLECTD_PULL_REQUESTS | default() }}"
+ source: build
+ tags:
+ - experimental
+
+- name: Build collectd-6
+ docker_image:
+ name: "anuket/barometer-collectd-6{{ ( '-' + COLLECTD_PULL_REQUESTS ) if COLLECTD_PULL_REQUESTS is defined else '' }}"
+ build:
+ path: "{{ playbook_dir }}/../../"
+ dockerfile: "docker/barometer-collectd-experimental/Dockerfile"
+ args:
+ COLLECTD_FLAVOR: collectd-6
+ COLLECTD_TAG: "{{ COLLECTD_TAG | default('collectd-6.0') }}"
+ COLLECTD_CONFIG_CMD_ARGS: "{{ COLLECTD_CONFIG_CMD_ARGS if COLLECTD_CONFIG_CMD_ARGS is defined }}"
+ source: build
+ tags:
+ - collectd-6
+
+- name: Build test_app for write_http
+ docker_image:
+ name: test-collectd-write_http
+ build:
+ path: "{{ playbook_dir }}/../flask_app/"
+ source: build
+ tags:
+ - flask_test
+ - never
+
diff --git a/docker/ansible/roles/config_files/defaults/main.yml b/docker/ansible/roles/config_files/defaults/main.yml
new file mode 100644
index 00000000..c2004ae1
--- /dev/null
+++ b/docker/ansible/roles/config_files/defaults/main.yml
@@ -0,0 +1,60 @@
+# 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.
+# 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.
+---
+config_file_dir: "/opt/collectd/etc/collectd.conf.d/"
+csv_log_dir: "/var/lib/collectd/csv"
+logfile_dir: "/var/log/"
+
+#global default interval
+interval_value: 10
+
+#influx network port
+influx_network_port: 25826
+
+#network plugin vars
+network_port: 25826
+network_ip_addr: localhost
+
+#prometheus plugin vars
+prometheus_port: 9103
+
+#ovs event and stats plugin vars
+ovs_events_interval: 1
+ovs_events_ip_addr: localhost
+ovs_events_port: 6640
+ovs_stats_interval: 1
+ovs_stats_ip_addr: localhost
+ovs_stats_port: 6640
+
+#rdt plugin vars
+rdt_interval: 1
+
+#kafka plugin vars
+kafka_ip_addr: localhost
+kafka_port: 9092
+kafka_topic: collectd
+
+#logfile plugin vars
+logfile_log_level: info
+
+#syslog plugin vars
+syslog_log_level: info
+
+#rrd plugin vars
+rrdtool_db_dir: "/var/lib/collectd/rrd"
+cache_flush: 120
+write_per_sec: 50
+
+#additional configuration files path
+additional_configs_path: ""
diff --git a/docker/ansible/roles/config_files/tasks/additional_configs.yml b/docker/ansible/roles/config_files/tasks/additional_configs.yml
new file mode 100644
index 00000000..28cad8a4
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/additional_configs.yml
@@ -0,0 +1,23 @@
+#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 additional configuration files to target system
+ template:
+ src: "{{ item }}"
+ dest: "{{ config_file_dir }}/{{ item | basename | regex_replace('\\.j2','') }}"
+ with_fileglob:
+ - "{{ additional_configs_path }}"
+ tags:
+ - copy_additional_configs
diff --git a/docker/ansible/roles/config_files/tasks/capabilities.yml b/docker/ansible/roles/config_files/tasks/capabilities.yml
new file mode 100644
index 00000000..cfca03a2
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/capabilities.yml
@@ -0,0 +1,21 @@
+# 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.
+# 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: enable capabilities plugin
+ 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
new file mode 100644
index 00000000..bfd88c0e
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/csv.yml
@@ -0,0 +1,21 @@
+# 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.
+# 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: enable csv plugin
+ 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
new file mode 100644
index 00000000..46b4d516
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/default_read_import.yml
@@ -0,0 +1,118 @@
+# 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.
+# 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: enable contextswitch plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['contextswitch']) | unique }}"
+ tags:
+ - en_default_all
+ - contextswitch
+
+- name: enable cpu plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['cpu']) | unique }}"
+ tags:
+ - en_default_all
+ - cpu
+
+- name: enable cpufreq plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['cpufreq']) | unique }}"
+ tags:
+ - en_default_all
+ - cpufreq
+
+- name: enable df plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['df']) | unique }}"
+ tags:
+ - en_default_all
+ - df
+
+- name: enable disk plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['disk']) | unique }}"
+ tags:
+ - en_default_all
+ - disk
+
+- name: enable ethstat plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['ethstat']) | unique }}"
+ tags:
+ - en_default_all
+ - ethstat
+
+- name: enable ipc plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['ipc']) | unique }}"
+ tags:
+ - en_default_all
+ - ipc
+
+- name: enable irq plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['irq']) | unique }}"
+ tags:
+ - en_default_all
+ - irq
+
+- name: enable load plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['load']) | unique }}"
+ tags:
+ - en_default_all
+ - load
+
+- name: enable memory plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['memory']) | unique }}"
+ tags:
+ - en_default_all
+ - memory
+
+- name: enable numa plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['numa']) | unique }}"
+ tags:
+ - en_default_all
+ - numa
+
+- name: enable processes plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['processes']) | unique }}"
+ tags:
+ - en_default_all
+ - processes
+
+- name: enable swap plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['swap']) | unique }}"
+ tags:
+ - en_default_all
+ - swap
+
+- name: enable turbostat plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['turbostat']) | unique }}"
+ tags:
+ - en_default_all
+ - turbostat
+
+- name: enable uptime plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['uptime']) | unique }}"
+ tags:
+ - en_default_all
+ - uptime
diff --git a/docker/ansible/roles/config_files/tasks/dpdk.yml b/docker/ansible/roles/config_files/tasks/dpdk.yml
new file mode 100644
index 00000000..2be146b0
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/dpdk.yml
@@ -0,0 +1,19 @@
+# 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.
+# 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: enable dpdk_telemetry plugin
+ 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
new file mode 100644
index 00000000..956e3a8f
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/exec.yml
@@ -0,0 +1,19 @@
+# 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.
+# 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: enable exec plugin
+ 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
new file mode 100644
index 00000000..5b4ec0ba
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/hugepages.yml
@@ -0,0 +1,32 @@
+# 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.
+# 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: check if hugepages folders exist on host
+ stat:
+ path: "{{ item }}"
+ register: hugepages_result
+ ignore_errors: "true"
+ with_items:
+ /sys/devices/system/node
+ /sys/kernel/mm/hugepages
+ tags:
+ - hugepages
+
+- name: enable hugepages plugin
+ 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
new file mode 100644
index 00000000..12913a85
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/ipmi.yml
@@ -0,0 +1,60 @@
+# 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.
+# 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: check ipmi_devintf is loaded
+ shell: "lsmod | cut -d' ' -f1 | grep ipmi_devintf"
+ register: ipmi_devintf
+ ignore_errors: true
+ tags:
+ - ipmi
+
+- name: check ipmi_si is loaded
+ shell: "lsmod | cut -d' ' -f1 | grep ipmi_si"
+ register: ipmi_devsi
+ ignore_errors: true
+ tags:
+ - ipmi
+
+- name: insert ipmi module ipmi_devintf
+ command: "modprobe ipmi_devintf"
+ register: ipmi_devintf
+ ignore_errors: true
+ when: (ipmi_devintf is failed) and (insert_ipmi_modules|default(false)|bool)
+ tags:
+ - ipmi
+
+- name: insert ipmi module ipmi_si
+ command: "modprobe ipmi_si"
+ register: ipmi_devsi
+ ignore_errors: true
+ when: (ipmi_devsi is failed) and (insert_ipmi_modules|default(false)|bool)
+ tags:
+ - ipmi
+
+- name: Check if /dev/ipmi0 exists
+ stat:
+ path: /dev/ipmi0
+ register: ipmi0_exists
+ ignore_errors: true
+ tags:
+ - ipmi
+
+- name: enable ipmi plugin
+ 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
new file mode 100644
index 00000000..6fb3f050
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/kafka.yml
@@ -0,0 +1,20 @@
+# 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.
+# 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: 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
new file mode 100644
index 00000000..cd1c1049
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/logfile.yml
@@ -0,0 +1,21 @@
+# 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.
+# 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: enable logfile plugin
+ 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
new file mode 100644
index 00000000..72adcea2
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/logparser.yml
@@ -0,0 +1,22 @@
+# 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.
+# 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: enable logparser plugin
+ template:
+ src: logparser.conf.j2
+ dest: "{{ config_file_dir }}/logparser.conf"
+ tags:
+ - logparser
+
diff --git a/docker/ansible/roles/config_files/tasks/main.yml b/docker/ansible/roles/config_files/tasks/main.yml
new file mode 100644
index 00000000..9b241890
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/main.yml
@@ -0,0 +1,141 @@
+# 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.
+# 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: Clean collectd config dir path
+ file:
+ state: absent
+ path: "{{ config_file_dir }}"
+ tags:
+ - rm_config_dir
+ - always
+
+- name: Create collectd.d folder on remote host
+ file:
+ path: "{{ config_file_dir }}"
+ force: yes
+ state: directory
+ tags:
+ - always
+
+- name: enable capabilities plugin
+ import_tasks: capabilities.yml
+
+- name: enable csv plugin
+ import_tasks: csv.yml
+
+- name: enable default plugins
+ import_tasks: default_read_import.yml
+
+- name: enable dpdk plugins
+ import_tasks: dpdk.yml
+
+- name: enable exec plugin
+ import_tasks: exec.yml
+
+- name: enable hugepages plugin
+ import_tasks: hugepages.yml
+
+- name: enable kafka plugin
+ import_tasks: kafka.yml
+
+- name: enable logfile plugin
+ import_tasks: logfile.yml
+
+- name: enable logparser plugin
+ import_tasks: logparser.yml
+
+- name: enable mcelog plugin
+ import_tasks: mcelog.yml
+
+- name: enable network plugin
+ import_tasks: network.yml
+
+- name: enable prometheus plugin
+ import_tasks: prometheus.yml
+ when: groups['prometheus_hosts'] is defined
+
+- name: enable pmu plugin
+ import_tasks: pmu.yml
+
+- name: enable rdt plugin
+ import_tasks: rdt.yml
+
+- name: enable rddtool plugin
+ import_tasks: rrdtool.yml
+
+- name: enable snmp_agent plugin
+ import_tasks: snmp_agent.yml
+
+- 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/make_mcelog.yml b/docker/ansible/roles/config_files/tasks/make_mcelog.yml
new file mode 100644
index 00000000..938396c8
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/make_mcelog.yml
@@ -0,0 +1,36 @@
+# Copyright 2016-2019 Intel Corporation and OPNFV. 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.
+# 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: extract mcelog from online archive
+ unarchive:
+ src: https://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git/snapshot/mcelog-161.tar.gz
+ dest: /tmp
+ remote_src: yes
+
+- name: make mcelog
+ make:
+ chdir: /tmp/mcelog-161
+
+- name: make install mcelog
+ make:
+ chdir: /tmp/mcelog-161
+ target: install
+
+- name: copy mcelog service
+ copy:
+ src: /tmp/mcelog-161/mcelog.service
+ dest: /etc/systemd/system/mcelog.service
+ remote_src: yes
diff --git a/docker/ansible/roles/config_files/tasks/mcelog.yml b/docker/ansible/roles/config_files/tasks/mcelog.yml
new file mode 100644
index 00000000..ac14f80c
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/mcelog.yml
@@ -0,0 +1,78 @@
+# Copyright 2018-2019 Intel Corporation and OPNFV. 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.
+# 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: install mcelog package
+ package:
+ name: mcelog
+ state: present
+ ignore_errors: "true"
+ when: install_mcelog|default(false)|bool
+ tags:
+ - mcelogs
+
+- name: check if mcelog present
+ shell: which mcelog > /dev/null
+ register: mcelog_present
+ ignore_errors: "true"
+ when: install_mcelog|default(false)|bool
+ tags:
+ - mcelogs
+
+- name: build mcelog from sources if not in package
+ import_tasks: make_mcelog.yml
+ when: (mcelog_present is failed) and (install_mcelog|default(false)|bool)
+ tags:
+ - mcelogs
+
+- name: start mcelog daemon if not running
+ service:
+ name: mcelog
+ state: started
+ enabled: true
+ ignore_errors: "true"
+ when: install_mcelog|default(false)|bool
+ tags:
+ - mcelogs
+
+- name: check if mcelog running on host
+ shell: ps -ef | grep mcelog | grep -v grep > /dev/null
+ register: mcelog_running
+ ignore_errors: "true"
+ tags:
+ - mcelogs
+
+- name: check if mcelog exists
+ shell: which mcelog > /dev/null
+ register: mcelog_exists
+ ignore_errors: "true"
+ tags:
+ - mcelogs
+
+- name: check if mcelog-client exists
+ stat:
+ path: /var/run/mcelog-client
+ register: mcelog_client_exists
+ ignore_errors: "true"
+ tags:
+ - mcelogs
+
+- name: enable mcelog plugin
+ template:
+ src: mcelog.conf.j2
+ dest: "{{ config_file_dir }}/mcelog.conf"
+ when: (mcelog_running is succeeded) and (mcelog_exists is succeeded) and (mcelog_client_exists is succeeded)
+ tags:
+ - mcelogs
diff --git a/docker/ansible/roles/config_files/tasks/network.yml b/docker/ansible/roles/config_files/tasks/network.yml
new file mode 100644
index 00000000..0af6a713
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/network.yml
@@ -0,0 +1,38 @@
+# 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.
+# 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: Enable network plugin
+ set_fact:
+ collectd_plugins: '{{ collectd_plugins | union (["network"]) | unique }}'
+ tags:
+ - network
+
+- name: Add network port if defined
+ 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
+ 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/ovs.yml b/docker/ansible/roles/config_files/tasks/ovs.yml
new file mode 100644
index 00000000..fe3f0a13
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/ovs.yml
@@ -0,0 +1,53 @@
+# 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.
+# 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: Check if vswitchd is running
+ shell: ps -ef | grep vswitchd | grep -v grep > /dev/null
+ register: vswitchd_running
+ ignore_errors: True
+ tags:
+ - ovs_stats
+ - ovs_events
+
+- name: Check if db.sock exists
+ stat:
+ path: /var/run/openvswitch/db.sock
+ register: dbsock_exists
+ ignore_errors: True
+ tags:
+ - ovs_stats
+ - ovs_events
+
+- name: enable ovs_stats plugin
+ 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
+
+- name: enable ovs_events plugin
+ 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
new file mode 100644
index 00000000..c5820f98
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/pmu.yml
@@ -0,0 +1,20 @@
+# 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.
+# 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: enable intel_pmu plugin
+ 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
new file mode 100644
index 00000000..c0e7e79d
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/prometheus.yml
@@ -0,0 +1,20 @@
+# 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.
+# 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: enable prometheus plugin
+ set_fact:
+ collectd_plugins: "{{ collectd_plugins | union(['write_prometheus']) | unique }}"
+ tags:
+ - prometheus
diff --git a/docker/ansible/roles/config_files/tasks/rdt.yml b/docker/ansible/roles/config_files/tasks/rdt.yml
new file mode 100644
index 00000000..f0a46261
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/rdt.yml
@@ -0,0 +1,38 @@
+# 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.
+# 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: check if rdt on host
+ shell: |
+ grep -q cqm* "/proc/cpuinfo"
+ register: rdt_result
+ ignore_errors: "true"
+ tags:
+ - rdt
+
+- name: (rdt) check if virt is enabled
+ stat:
+ path: "{{ config_file_dir }}/virt.conf"
+ register: virt_file
+ tags:
+ - rdt
+
+- name: enable rdt plugin
+ 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/rrdtool.yml b/docker/ansible/roles/config_files/tasks/rrdtool.yml
new file mode 100644
index 00000000..4c681dc6
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/rrdtool.yml
@@ -0,0 +1,22 @@
+#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: enable rrdtool plugin
+ template:
+ src: rrdtool.conf.j2
+ dest: "{{ config_file_dir }}/rrdtool.conf"
+ tags:
+ - rrdtool
+
diff --git a/docker/ansible/roles/config_files/tasks/snmp_agent.yml b/docker/ansible/roles/config_files/tasks/snmp_agent.yml
new file mode 100644
index 00000000..5e1ba975
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/snmp_agent.yml
@@ -0,0 +1,30 @@
+#Copyright 2018-2019 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: enable snmp agent
+ template:
+ src: snmp_agent.conf.j2
+ dest: "{{ config_file_dir }}/snmp_agent.conf"
+ when: flavor|default('stable')|string == 'stable'
+ tags:
+ - snmp
+
+- name: enable snmp agent for non-stable container
+ template:
+ src: latest/snmp_agent.conf.j2
+ dest: "{{ config_file_dir }}/snmp_agent.conf"
+ when: flavor|default('stable')|string != 'stable'
+ tags:
+ - snmp
diff --git a/docker/ansible/roles/config_files/tasks/syslog.yml b/docker/ansible/roles/config_files/tasks/syslog.yml
new file mode 100644
index 00000000..e9ab06f3
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/syslog.yml
@@ -0,0 +1,21 @@
+# 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.
+# 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: enable syslog plugin
+ 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
new file mode 100644
index 00000000..df669e1a
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/uuid.yml
@@ -0,0 +1,20 @@
+# 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.
+# 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: enable uuid plugin
+ 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
new file mode 100644
index 00000000..75a17a18
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/virt.yml
@@ -0,0 +1,34 @@
+# 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.
+# 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: check if libvirtd on host
+ shell: ps -ef | grep libvirtd | grep -v grep > /dev/null
+ register: libvirt_result
+ ignore_errors: "true"
+ tags:
+ - virt
+
+- name: (virt) check if rdt is enabled
+ set_fact:
+ rdt_enabled: true
+ tags:
+ - rdt
+
+- name: enable virt plugin
+ 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/latest/snmp_agent.conf.j2 b/docker/ansible/roles/config_files/templates/latest/snmp_agent.conf.j2
new file mode 100644
index 00000000..1ff8b228
--- /dev/null
+++ b/docker/ansible/roles/config_files/templates/latest/snmp_agent.conf.j2
@@ -0,0 +1,398 @@
+# Copyright 2017-2019 Intel Corporation and OPNFV. 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.
+# 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 snmp_agent
+
+<Plugin snmp_agent>
+# Intel PMU MIB
+ <Table "pmuTable">
+ IndexOID "INTEL-PMU-MIB::pmuGroupIndex"
+ <Data "pmuGroupDescr">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "intel_pmu"
+ OIDs "INTEL-PMU-MIB::pmuGroupDescr"
+ </Data>
+ <Data "pmuL1DCacheLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-loads"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheLoads"
+ </Data>
+ <Data "pmuL1DCacheLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheLoadMisses"
+ </Data>
+ <Data "pmuL1DCacheStores">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-stores"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheStores"
+ </Data>
+ <Data "pmuL1DCacheStoreMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-store-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheStoreMisses"
+ </Data>
+ <Data "pmuL1DCachePrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuL1DCachePrefetches"
+ </Data>
+ <Data "pmuL1DCachePrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1DCachePrefetchMisses"
+ </Data>
+ <Data "pmuL1ICacheLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-loads"
+ OIDs "INTEL-PMU-MIB::pmuL1ICacheLoads"
+ </Data>
+ <Data "pmuL1ICacheLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1ICacheLoadMisses"
+ </Data>
+ <Data "pmuL1ICachePrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuL1ICachePrefetches"
+ </Data>
+ <Data "pmuL1ICachePrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1ICachePrefetchMisses"
+ </Data>
+ <Data "pmuLLCLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-loads"
+ OIDs "INTEL-PMU-MIB::pmuLLCLoads"
+ </Data>
+ <Data "pmuLLCLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuLLCLoadMisses"
+ </Data>
+ <Data "pmuLLCStores">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-stores"
+ OIDs "INTEL-PMU-MIB::pmuLLCStores"
+ </Data>
+ <Data "pmuLLCStoreMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-store-misses"
+ OIDs "INTEL-PMU-MIB::pmuLLCStoreMisses"
+ </Data>
+ <Data "pmuLLCPrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuLLCPrefetches"
+ </Data>
+ <Data "pmuLLCPrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuLLCPrefetchMisses"
+ </Data>
+ <Data "pmuDTLBLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-loads"
+ OIDs "INTEL-PMU-MIB::pmuDTLBLoads"
+ </Data>
+ <Data "pmuDTLBLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuDTLBLoadMisses"
+ </Data>
+ <Data "pmuDTLBStores">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-stores"
+ OIDs "INTEL-PMU-MIB::pmuDTLBStores"
+ </Data>
+ <Data "pmuDTLBStoreMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-store-misses"
+ OIDs "INTEL-PMU-MIB::pmuDTLBStoreMisses"
+ </Data>
+ <Data "pmuDTLBPrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuDTLBPrefetches"
+ </Data>
+ <Data "pmuDTLBPrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuDTLBPrefetchMisses"
+ </Data>
+ <Data "pmuITLBLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "iTLB-loads"
+ OIDs "INTEL-PMU-MIB::pmuITLBLoads"
+ </Data>
+ <Data "pmuITLBLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "iTLB-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuITLBLoadMisses"
+ </Data>
+ <Data "pmuBranchLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branch-loads"
+ OIDs "INTEL-PMU-MIB::pmuBranchLoads"
+ </Data>
+ <Data "pmuBranchLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branch-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuBranchLoadMisses"
+ </Data>
+ <Data "pmuCpuCycles">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cpu-cycles"
+ OIDs "INTEL-PMU-MIB::pmuCpuCycles"
+ </Data>
+ <Data "pmuInstructions">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "instructions"
+ OIDs "INTEL-PMU-MIB::pmuInstructions"
+ </Data>
+ <Data "pmuCacheReferences">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cache-references"
+ OIDs "INTEL-PMU-MIB::pmuCacheReferences"
+ </Data>
+ <Data "pmuCacheMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cache-misses"
+ OIDs "INTEL-PMU-MIB::pmuCacheMisses"
+ </Data>
+ <Data "pmuBranches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branches"
+ OIDs "INTEL-PMU-MIB::pmuBranches"
+ </Data>
+ <Data "pmuBranchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branch-misses"
+ OIDs "INTEL-PMU-MIB::pmuBranchMisses"
+ </Data>
+ <Data "pmuBusCycles">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "bus-cycles"
+ OIDs "INTEL-PMU-MIB::pmuBusCycles"
+ </Data>
+ <Data "pmuCpuClock">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cpu-clock"
+ OIDs "INTEL-PMU-MIB::pmuCpuClock"
+ </Data>
+ <Data "pmuTaskClock">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "task-clock"
+ OIDs "INTEL-PMU-MIB::pmuTaskClock"
+ </Data>
+ <Data "pmuContextSwitches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "context-switches"
+ OIDs "INTEL-PMU-MIB::pmuContextSwitches"
+ </Data>
+ <Data "pmuCpuMigrations">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cpu-migrations"
+ OIDs "INTEL-PMU-MIB::pmuCpuMigrations"
+ </Data>
+ <Data "pmuPageFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "page-faults"
+ OIDs "INTEL-PMU-MIB::pmuPageFaults"
+ </Data>
+ <Data "pmuMinorFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "minor-faults"
+ OIDs "INTEL-PMU-MIB::pmuMinorFaults"
+ </Data>
+ <Data "pmuMajorFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "major-faults"
+ OIDs "INTEL-PMU-MIB::pmuMajorFaults"
+ </Data>
+ <Data "pmuAlignmentFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "alignment-faults"
+ OIDs "INTEL-PMU-MIB::pmuAlignmentFaults"
+ </Data>
+ <Data "pmuEmulationFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "emulation-faults"
+ OIDs "INTEL-PMU-MIB::pmuEmulationFaults"
+ </Data>
+ </Table>
+# Intel RDT MIB
+ <Table "rdtTable">
+ IndexOID "INTEL-RDT-MIB::rdtGroupIndex"
+ SizeOID "INTEL-RDT-MIB::rdtGroupNumber"
+ <Data "rdtGroupDescr">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "intel_rdt"
+ OIDs "INTEL-RDT-MIB::rdtGroupDescr"
+ </Data>
+ <Data "rdtLlc">
+ Plugin "intel_rdt"
+ Type "bytes"
+ TypeInstance "llc"
+ OIDs "INTEL-RDT-MIB::rdtLlc"
+ </Data>
+ <Data "rdtIpc">
+ Plugin "intel_rdt"
+ Type "ipc"
+ OIDs "INTEL-RDT-MIB::rdtIpc"
+ </Data>
+ <Data "rdtMbmRemote">
+ Plugin "intel_rdt"
+ Type "memory_bandwidth"
+ TypeInstance "remote"
+ OIDs "INTEL-RDT-MIB::rdtMbmRemote"
+ </Data>
+ <Data "rdtMbmLocal">
+ Plugin "intel_rdt"
+ Type "memory_bandwidth"
+ TypeInstance "local"
+ OIDs "INTEL-RDT-MIB::rdtMbmLocal"
+ </Data>
+ </Table>
+# Intel Mcelog MIB
+ <Table "mcelogTable">
+ IndexOID "INTEL-MCELOG-MIB::memoryGroupIndex"
+ <Data "memoryGroupDescr">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "mcelog"
+ OIDs "INTEL-MCELOG-MIB::memoryGroupDescr"
+ </Data>
+ <Data "memoryCorrectedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "corrected_memory_errors"
+ OIDs "INTEL-MCELOG-MIB::memoryCorrectedErrors"
+ </Data>
+ <Data "memoryCorrectedTimedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "corrected_memory_errors_in_24h"
+ OIDs "INTEL-MCELOG-MIB::memoryCorrectedTimedErrors"
+ </Data>
+ <Data "memoryUncorrectedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "uncorrected_memory_errors"
+ OIDs "INTEL-MCELOG-MIB::memoryUncorrectedErrors"
+ </Data>
+ <Data "memoryUncorrectedTimedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "uncorrected_memory_errors_in_24h"
+ OIDs "INTEL-MCELOG-MIB::memoryUncorrectedTimedErrors"
+ </Data>
+ </Table>
+# Hugepages
+ <Table "hugepagesTable">
+ <Data "hugepagesNode">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "hugepages"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesNode"
+ </Data>
+ <Data "hugepagesMemoryFree">
+ Plugin "hugepages"
+ Type "memory"
+ TypeInstance "free"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesMemoryFree"
+ </Data>
+ <Data "hugepagesMemoryUsed">
+ Plugin "hugepages"
+ Type "memory"
+ TypeInstance "used"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesMemoryUsed"
+ </Data>
+ <Data "hugepagesPagesFree">
+ Plugin "hugepages"
+ Type "vmpage_number"
+ TypeInstance "free"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPagesFree"
+ </Data>
+ <Data "hugepagesPagesUsed">
+ Plugin "hugepages"
+ Type "vmpage_number"
+ TypeInstance "used"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPagesUsed"
+ </Data>
+ <Data "hugepagesPercentFree">
+ Plugin "hugepages"
+ Type "percent"
+ TypeInstance "free"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPercentFree"
+ </Data>
+ <Data "hugepagesPercentUsed">
+ Plugin "hugepages"
+ Type "percent"
+ TypeInstance "used"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPercentUsed"
+ </Data>
+ </Table>
+</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/logparser.conf.j2 b/docker/ansible/roles/config_files/templates/logparser.conf.j2
new file mode 100644
index 00000000..1f1a725b
--- /dev/null
+++ b/docker/ansible/roles/config_files/templates/logparser.conf.j2
@@ -0,0 +1,75 @@
+# Copyright 2019 Intel Corporation and OPNFV. 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.
+# 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 logparser
+
+<Plugin logparser>
+ <Logfile "/var/log/syslog">
+ FirstFullRead false
+ <Message "pcie_errors">
+ DefaultType "pcie_error"
+ DefaultSeverity "warning"
+ <Match "aer error">
+ Regex "AER:.*error received"
+ SubmatchIdx -1
+ </Match>
+ <Match "incident time">
+ Regex "(... .. ..:..:..) .* pcieport.*AER"
+ SubmatchIdx 1
+ IsMandatory false
+ </Match>
+ <Match "root port">
+ Regex "pcieport (.*): AER:"
+ SubmatchIdx 1
+ IsMandatory true
+ </Match>
+ <Match "device">
+ PluginInstance true
+ Regex " ([0-9a-fA-F:\\.]*): PCIe Bus Error"
+ SubmatchIdx 1
+ IsMandatory false
+ </Match>
+ <Match "severity_mandatory">
+ Regex "severity="
+ SubMatchIdx -1
+ </Match>
+ <Match "nonfatal">
+ Regex "severity=.*\\([nN]on-[fF]atal"
+ TypeInstance "non_fatal"
+ IsMandatory false
+ </Match>
+ <Match "fatal">
+ Regex "severity=.*\\([fF]atal"
+ Severity "failure"
+ TypeInstance "fatal"
+ IsMandatory false
+ </Match>
+ <Match "corrected">
+ Regex "severity=Corrected"
+ TypeInstance "correctable"
+ IsMandatory false
+ </Match>
+ <Match "error type">
+ Regex "type=(.*),"
+ SubmatchIdx 1
+ IsMandatory false
+ </Match>
+ <Match "id">
+ Regex ", id=(.*)"
+ SubmatchIdx 1
+ </Match>
+ </Message>
+ </Logfile>
+</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/mcelog.conf.j2 b/docker/ansible/roles/config_files/templates/mcelog.conf.j2
new file mode 100644
index 00000000..148053cb
--- /dev/null
+++ b/docker/ansible/roles/config_files/templates/mcelog.conf.j2
@@ -0,0 +1,26 @@
+#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 mcelog>
+ Interval 1
+</LoadPlugin>
+
+<Plugin mcelog>
+ <Memory>
+ McelogClientSocket "/var/run/mcelog-client"
+ PersistentNotification false
+ </Memory>
+## McelogLogfile "/var/log/mcelog"
+</Plugin>
+
diff --git a/docker/ansible/roles/config_files/templates/rrdtool.conf.j2 b/docker/ansible/roles/config_files/templates/rrdtool.conf.j2
new file mode 100644
index 00000000..dd874210
--- /dev/null
+++ b/docker/ansible/roles/config_files/templates/rrdtool.conf.j2
@@ -0,0 +1,21 @@
+#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 rrdtool
+
+<Plugin rrdtool>
+ DataDir "{{ rrdtool_db_dir }}"
+ CacheFlush {{ cache_flush }}
+ WritesPerSecond {{ write_per_sec }}
+</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/snmp_agent.conf.j2 b/docker/ansible/roles/config_files/templates/snmp_agent.conf.j2
new file mode 100644
index 00000000..48bb709f
--- /dev/null
+++ b/docker/ansible/roles/config_files/templates/snmp_agent.conf.j2
@@ -0,0 +1,398 @@
+#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 snmp_agent
+
+<Plugin snmp_agent>
+# Intel PMU MIB
+ <Table "pmuTable">
+ IndexOID "INTEL-PMU-MIB::pmuGroupIndex"
+ <Data "pmuGroupDescr">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "intel_pmu"
+ OIDs "INTEL-PMU-MIB::pmuGroupDescr"
+ </Data>
+ <Data "pmuL1DCacheLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-loads"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheLoads"
+ </Data>
+ <Data "pmuL1DCacheLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheLoadMisses"
+ </Data>
+ <Data "pmuL1DCacheStores">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-stores"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheStores"
+ </Data>
+ <Data "pmuL1DCacheStoreMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-store-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1DCacheStoreMisses"
+ </Data>
+ <Data "pmuL1DCachePrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuL1DCachePrefetches"
+ </Data>
+ <Data "pmuL1DCachePrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-dcache-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1DCachePrefetchMisses"
+ </Data>
+ <Data "pmuL1ICacheLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-loads"
+ OIDs "INTEL-PMU-MIB::pmuL1ICacheLoads"
+ </Data>
+ <Data "pmuL1ICacheLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1ICacheLoadMisses"
+ </Data>
+ <Data "pmuL1ICachePrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuL1ICachePrefetches"
+ </Data>
+ <Data "pmuL1ICachePrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "L1-icache-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuL1ICachePrefetchMisses"
+ </Data>
+ <Data "pmuLLCLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-loads"
+ OIDs "INTEL-PMU-MIB::pmuLLCLoads"
+ </Data>
+ <Data "pmuLLCLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuLLCLoadMisses"
+ </Data>
+ <Data "pmuLLCStores">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-stores"
+ OIDs "INTEL-PMU-MIB::pmuLLCStores"
+ </Data>
+ <Data "pmuLLCStoreMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-store-misses"
+ OIDs "INTEL-PMU-MIB::pmuLLCStoreMisses"
+ </Data>
+ <Data "pmuLLCPrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuLLCPrefetches"
+ </Data>
+ <Data "pmuLLCPrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "LLC-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuLLCPrefetchMisses"
+ </Data>
+ <Data "pmuDTLBLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-loads"
+ OIDs "INTEL-PMU-MIB::pmuDTLBLoads"
+ </Data>
+ <Data "pmuDTLBLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuDTLBLoadMisses"
+ </Data>
+ <Data "pmuDTLBStores">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-stores"
+ OIDs "INTEL-PMU-MIB::pmuDTLBStores"
+ </Data>
+ <Data "pmuDTLBStoreMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-store-misses"
+ OIDs "INTEL-PMU-MIB::pmuDTLBStoreMisses"
+ </Data>
+ <Data "pmuDTLBPrefetches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-prefetches"
+ OIDs "INTEL-PMU-MIB::pmuDTLBPrefetches"
+ </Data>
+ <Data "pmuDTLBPrefetchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "dTLB-prefetch-misses"
+ OIDs "INTEL-PMU-MIB::pmuDTLBPrefetchMisses"
+ </Data>
+ <Data "pmuITLBLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "iTLB-loads"
+ OIDs "INTEL-PMU-MIB::pmuITLBLoads"
+ </Data>
+ <Data "pmuITLBLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "iTLB-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuITLBLoadMisses"
+ </Data>
+ <Data "pmuBranchLoads">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branch-loads"
+ OIDs "INTEL-PMU-MIB::pmuBranchLoads"
+ </Data>
+ <Data "pmuBranchLoadMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branch-load-misses"
+ OIDs "INTEL-PMU-MIB::pmuBranchLoadMisses"
+ </Data>
+ <Data "pmuCpuCycles">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cpu-cycles"
+ OIDs "INTEL-PMU-MIB::pmuCpuCycles"
+ </Data>
+ <Data "pmuInstructions">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "instructions"
+ OIDs "INTEL-PMU-MIB::pmuInstructions"
+ </Data>
+ <Data "pmuCacheReferences">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cache-references"
+ OIDs "INTEL-PMU-MIB::pmuCacheReferences"
+ </Data>
+ <Data "pmuCacheMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cache-misses"
+ OIDs "INTEL-PMU-MIB::pmuCacheMisses"
+ </Data>
+ <Data "pmuBranches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branches"
+ OIDs "INTEL-PMU-MIB::pmuBranches"
+ </Data>
+ <Data "pmuBranchMisses">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "branch-misses"
+ OIDs "INTEL-PMU-MIB::pmuBranchMisses"
+ </Data>
+ <Data "pmuBusCycles">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "bus-cycles"
+ OIDs "INTEL-PMU-MIB::pmuBusCycles"
+ </Data>
+ <Data "pmuCpuClock">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cpu-clock"
+ OIDs "INTEL-PMU-MIB::pmuCpuClock"
+ </Data>
+ <Data "pmuTaskClock">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "task-clock"
+ OIDs "INTEL-PMU-MIB::pmuTaskClock"
+ </Data>
+ <Data "pmuContextSwitches">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "context-switches"
+ OIDs "INTEL-PMU-MIB::pmuContextSwitches"
+ </Data>
+ <Data "pmuCpuMigrations">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "cpu-migrations"
+ OIDs "INTEL-PMU-MIB::pmuCpuMigrations"
+ </Data>
+ <Data "pmuPageFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "page-faults"
+ OIDs "INTEL-PMU-MIB::pmuPageFaults"
+ </Data>
+ <Data "pmuMinorFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "minor-faults"
+ OIDs "INTEL-PMU-MIB::pmuMinorFaults"
+ </Data>
+ <Data "pmuMajorFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "major-faults"
+ OIDs "INTEL-PMU-MIB::pmuMajorFaults"
+ </Data>
+ <Data "pmuAlignmentFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "alignment-faults"
+ OIDs "INTEL-PMU-MIB::pmuAlignmentFaults"
+ </Data>
+ <Data "pmuEmulationFaults">
+ Plugin "intel_pmu"
+ Type "counter"
+ TypeInstance "emulation-faults"
+ OIDs "INTEL-PMU-MIB::pmuEmulationFaults"
+ </Data>
+ </Table>
+# Intel RDT MIB
+ <Table "rdtTable">
+ IndexOID "INTEL-RDT-MIB::rdtGroupIndex"
+ SizeOID "INTEL-RDT-MIB::rdtGroupNumber"
+ <Data "rdtGroupDescr">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "intel_rdt"
+ OIDs "INTEL-RDT-MIB::rdtGroupDescr"
+ </Data>
+ <Data "rdtLlc">
+ Plugin "intel_rdt"
+ Type "bytes"
+ TypeInstance "llc"
+ OIDs "INTEL-RDT-MIB::rdtLlc"
+ </Data>
+ <Data "rdtIpc">
+ Plugin "intel_rdt"
+ Type "ipc"
+ OIDs "INTEL-RDT-MIB::rdtIpc"
+ </Data>
+ <Data "rdtMbmRemote">
+ Plugin "intel_rdt"
+ Type "memory_bandwidth"
+ TypeInstance "remote"
+ OIDs "INTEL-RDT-MIB::rdtMbmRemote"
+ </Data>
+ <Data "rdtMbmLocal">
+ Plugin "intel_rdt"
+ Type "memory_bandwidth"
+ TypeInstance "local"
+ OIDs "INTEL-RDT-MIB::rdtMbmLocal"
+ </Data>
+ </Table>
+# Intel Mcelog MIB
+ <Table "mcelogTable">
+ IndexOID "INTEL-MCELOG-MIB::memoryGroupIndex"
+ <Data "memoryGroupDescr">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "mcelog"
+ OIDs "INTEL-MCELOG-MIB::memoryGroupDescr"
+ </Data>
+ <Data "memoryCorrectedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "corrected_memory_errors"
+ OIDs "INTEL-MCELOG-MIB::memoryCorrectedErrors"
+ </Data>
+ <Data "memoryCorrectedTimedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "corrected_memory_errors_in_24h"
+ OIDs "INTEL-MCELOG-MIB::memoryCorrectedTimedErrors"
+ </Data>
+ <Data "memoryUncorrectedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "uncorrected_memory_errors"
+ OIDs "INTEL-MCELOG-MIB::memoryUncorrectedErrors"
+ </Data>
+ <Data "memoryUncorrectedTimedErrors">
+ Plugin "mcelog"
+ Type "errors"
+ TypeInstance "uncorrected_memory_errors_in_24h"
+ OIDs "INTEL-MCELOG-MIB::memoryUncorrectedTimedErrors"
+ </Data>
+ </Table>
+# Hugepages
+ <Table "hugepagesTable">
+ <Data "hugepagesNode">
+ <IndexKey>
+ Source "PluginInstance"
+ </IndexKey>
+ Plugin "hugepages"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesNode"
+ </Data>
+ <Data "hugepagesMemoryFree">
+ Plugin "hugepages"
+ Type "memory"
+ TypeInstance "free"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesMemoryFree"
+ </Data>
+ <Data "hugepagesMemoryUsed">
+ Plugin "hugepages"
+ Type "memory"
+ TypeInstance "used"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesMemoryUsed"
+ </Data>
+ <Data "hugepagesPagesFree">
+ Plugin "hugepages"
+ Type "vmpage_number"
+ TypeInstance "free"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPagesFree"
+ </Data>
+ <Data "hugepagesPagesUsed">
+ Plugin "hugepages"
+ Type "vmpage_number"
+ TypeInstance "used"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPagesUsed"
+ </Data>
+ <Data "hugepagesPercentFree">
+ Plugin "hugepages"
+ Type "percent"
+ TypeInstance "free"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPercentFree"
+ </Data>
+ <Data "hugepagesPercentUsed">
+ Plugin "hugepages"
+ Type "percent"
+ TypeInstance "used"
+ OIDs "INTEL-HUGEPAGES-MIB::hugepagesPercentUsed"
+ </Data>
+ </Table>
+</Plugin>
+
diff --git a/docker/ansible/roles/config_files/vars/main.yml b/docker/ansible/roles/config_files/vars/main.yml
new file mode 100644
index 00000000..02fd7fb9
--- /dev/null
+++ b/docker/ansible/roles/config_files/vars/main.yml
@@ -0,0 +1,67 @@
+# 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.
+# 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.
+---
+collectd_plugins: []
+collectd_interval: "{{ interval_value }}"
+collectd_hostname: "{{ inventory_hostname }}"
+
+collectd_plugin_capabilities_port: "9564"
+
+collectd_plugin_cpu_valuespercentage: False
+collectd_plugin_cpu_reportbystate: True
+
+collectd_plugin_csv_datadir: "{{ csv_log_dir }}"
+collectd_plugin_csv_storerates: False
+
+collectd_plugin_dpdk_telemetry_client_socket_path: "/var/run/.client"
+collectd_plugin_dpdk_telemetry_dpdk_socket_path: "/var/run/dpdk/rte/telemetry"
+
+collectd_plugin_exec_exec:
+ - user: "collectd_exec"
+ exec: "/src/barometer/src/collectd/collectd_sample_configs/ovs_pmd_stats.sh"
+collectd_plugin_exec_notification:
+ - user: "collectd_exec"
+ notification_exec: "/src/barometer/src/collectd/collectd_sample_configs/write_notification.sh"
+
+collectd_plugin_hugepages_report_per_node_hp: True
+collectd_plugin_hugepages_report_root_hp: True
+collectd_plugin_hugepages_values_pages: True
+collectd_plugin_hugepages_values_bytes: False
+collectd_plugin_hugepages_values_percentage: False
+
+collectd_plugin_intel_pmu_report_hardware_cache_events: True
+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
+
+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" }} }}'
+
+collectd_plugin_write_prometheus_port: "{{ prometheus_port }}"
+
+collectd_plugin_syslog_loglevel: "{{ syslog_log_level }}"
diff --git a/docker/ansible/roles/install_docker/tasks/centos.yml b/docker/ansible/roles/install_docker/tasks/centos.yml
new file mode 100644
index 00000000..b84d98f2
--- /dev/null
+++ b/docker/ansible/roles/install_docker/tasks/centos.yml
@@ -0,0 +1,45 @@
+#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: install dependencies for docker
+ package:
+ name: "{{ packages }}"
+ state: present
+ vars:
+ packages:
+ - python
+ - yum-utils
+ - device-mapper-persistent-data
+ - lvm2
+
+- name: set up docker repository
+ command: "yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo"
+
+- name: install docker-py
+ package:
+ name: python-docker-py
+ state: present
+
+- name: install docker
+ package:
+ name: docker-ce
+ state: present
+
+- name: start docker daemon
+ systemd:
+ name: docker
+ daemon_reload: true
+ state: started
+ enabled: true
diff --git a/docker/ansible/roles/install_docker/tasks/fedora.yml b/docker/ansible/roles/install_docker/tasks/fedora.yml
new file mode 100644
index 00000000..f2a4f403
--- /dev/null
+++ b/docker/ansible/roles/install_docker/tasks/fedora.yml
@@ -0,0 +1,47 @@
+#Copyright 2019 Red Hat
+#
+# 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: Set Python interpreter
+ set_fact: ansible_python_interpreter=/usr/bin/python3
+
+- name: install dependencies for docker
+ package:
+ name: "{{ packages }}"
+ state: present
+ vars:
+ packages:
+ - python3-dnf
+ - python3
+ - python3-libselinux
+
+- name: set up docker repository
+ command: "dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo && dnf makecache"
+
+- name: install docker-py
+ package:
+ name: python3-docker
+ state: present
+
+- name: install docker
+ package:
+ name: docker-ce
+ state: present
+
+- name: start docker daemon
+ systemd:
+ name: docker
+ daemon_reload: true
+ state: started
+ enabled: true
diff --git a/docker/ansible/roles/install_docker/tasks/main.yml b/docker/ansible/roles/install_docker/tasks/main.yml
new file mode 100644
index 00000000..ba356563
--- /dev/null
+++ b/docker/ansible/roles/install_docker/tasks/main.yml
@@ -0,0 +1,37 @@
+#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: proxy configuration for docker
+ tags:
+ - install_docker
+ import_tasks: proxy.yml
+
+- name: install docker for ubuntu
+ tags:
+ - install_docker
+ import_tasks: ubuntu.yml
+ when: ansible_distribution == "Ubuntu"
+
+- name: install docker for fedora
+ tags:
+ - install_docker
+ import_tasks: fedora.yml
+ when: ansible_distribution == "Fedora"
+
+- name: install docker for centos
+ tags:
+ - install_docker
+ import_tasks: centos.yml
+ when: ansible_distribution == "CentOS"
diff --git a/docker/ansible/roles/install_docker/tasks/proxy.yml b/docker/ansible/roles/install_docker/tasks/proxy.yml
new file mode 100644
index 00000000..397bed4c
--- /dev/null
+++ b/docker/ansible/roles/install_docker/tasks/proxy.yml
@@ -0,0 +1,55 @@
+#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: create docker proxy configuration file
+ tags:
+ - add_docker_proxy
+ lineinfile:
+ path: "{{ docker_proxy_conf }}"
+ line: "[Service]"
+ create: yes
+
+- name: add docker http_proxy
+ tags:
+ - add_docker_proxy
+ lineinfile:
+ path: "{{ docker_proxy_conf }}"
+ line: "Environment=\"HTTP_PROXY={{ ansible_env.http_proxy }}\""
+ when: ansible_env.http_proxy is defined
+
+- name: add docker https_proxy
+ tags:
+ - add_docker_proxy
+ lineinfile:
+ path: "{{ docker_proxy_conf }}"
+ line: "Environment=\"HTTPS_PROXY={{ ansible_env.https_proxy }}\""
+ when: ansible_env.https_proxy is defined
+
+- name: add docker ftp_proxy
+ tags:
+ - add_docker_proxy
+ lineinfile:
+ path: "{{ docker_proxy_conf }}"
+ line: "Environment=\"FTP_PROXY={{ ansible_env.ftp_proxy }}\""
+ when: ansible_env.ftp_proxy is defined
+
+- name: add docker no_proxy
+ tags:
+ - add_docker_proxy
+ lineinfile:
+ path: "{{ docker_proxy_conf }}"
+ line: "Environment=\"NO_PROXY={{ ansible_env.no_proxy }}\""
+ when: ansible_env.no_proxy is defined
+
diff --git a/docker/ansible/roles/install_docker/tasks/ubuntu.yml b/docker/ansible/roles/install_docker/tasks/ubuntu.yml
new file mode 100644
index 00000000..f3aa81b1
--- /dev/null
+++ b/docker/ansible/roles/install_docker/tasks/ubuntu.yml
@@ -0,0 +1,50 @@
+#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: set Python interpreter
+ set_fact: ansible_python_interpreter=/usr/bin/python3
+
+- name: update package manager cache
+ tags:
+ - cache_update
+ package:
+ update_cache: yes
+
+- name: install python3
+ package:
+ name: python3
+ state: present
+
+- name: install python3-pip
+ package:
+ name: python3-pip
+ state: present
+
+- name: install docker-py
+ pip:
+ name: docker-py
+ state: present
+
+- name: install docker
+ package:
+ name: docker.io
+ state: present
+
+- name: start docker daemon
+ systemd:
+ name: docker
+ daemon_reload: true
+ state: started
+ enabled: true
diff --git a/docker/ansible/roles/install_docker/vars/main.yml b/docker/ansible/roles/install_docker/vars/main.yml
new file mode 100644
index 00000000..0673a63a
--- /dev/null
+++ b/docker/ansible/roles/install_docker/vars/main.yml
@@ -0,0 +1,18 @@
+#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.
+---
+
+#docker proxy configuration file
+docker_proxy_conf: "/etc/systemd/system/docker.service.d/proxy.conf"
+
diff --git a/docker/ansible/roles/run_collectd/tasks/main.yml b/docker/ansible/roles/run_collectd/tasks/main.yml
new file mode 100644
index 00000000..bf5aabf5
--- /dev/null
+++ b/docker/ansible/roles/run_collectd/tasks/main.yml
@@ -0,0 +1,63 @@
+# 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.
+# 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: remove bar-collectd container
+ docker_container:
+ name: "{{ collectd_container_name }}"
+ state: absent
+ tags:
+ - rm_containers
+ - rm_collectd_cont
+ when: rm_containers|default(false)|bool == true
+
+- name: Remove bar-collectd image
+ docker_image:
+ name: "{{ collectd_image_name }}"
+ state: absent
+ tags:
+ - rm_images
+ - rm_collectd_image
+ when: rm_images|default(false)|bool == true
+
+- name: check if /sys/fs/resctrl exist
+ stat:
+ path: /sys/fs/resctrl
+ register: resctrl_dir
+
+- name: set list of volumes to bind
+ set_fact:
+ volumes_list:
+
+ - /opt/collectd/etc/:/opt/collectd/etc/
+ - /var/run:/var/run
+ - /tmp:/tmp
+ - /var/lib/collectd:/var/lib/collectd
+
+- name: add resctrl to container volumes
+ set_fact:
+ volumes_list: "{{ volumes_list + [ '/sys/fs/resctrl:/sys/fs/resctrl' ] }}"
+ when: resctrl_dir.stat.exists
+
+- name: launch collectd container
+ docker_container:
+ name: "{{ collectd_container_name }}"
+ image: "{{ collectd_image_name }}"
+ volumes: "{{ volumes_list }}"
+ entrypoint: "/run_collectd.sh"
+ detach: yes
+ state: started
+ restart: yes
+ privileged: yes
+ network_mode: host
diff --git a/docker/ansible/roles/run_collectd/vars/main.yml b/docker/ansible/roles/run_collectd/vars/main.yml
new file mode 100644
index 00000000..26007ecf
--- /dev/null
+++ b/docker/ansible/roles/run_collectd/vars/main.yml
@@ -0,0 +1,23 @@
+# 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.
+# 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.
+---
+
+collectd_container_name: "bar-collectd"
+default_flavor: "{{ flavor|default('stable')|string }}"
+flavor_image_name: "{{
+ 'barometer-collectd-latest' if (default_flavor == 'master' or default_flavor == 'latest') else
+ 'barometer-collectd-experimental' if (default_flavor == 'experimental') else
+ 'barometer-collectd-6' if (default_flavor == 'collectd-6')
+ else 'barometer-collectd' }}"
+collectd_image_name: "{{ 'anuket/' + flavor_image_name }}"
diff --git a/docker/ansible/roles/run_grafana/tasks/main.yml b/docker/ansible/roles/run_grafana/tasks/main.yml
new file mode 100644
index 00000000..d4a1638c
--- /dev/null
+++ b/docker/ansible/roles/run_grafana/tasks/main.yml
@@ -0,0 +1,52 @@
+# 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.
+# 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: remove bar-grafana container
+ docker_container:
+ name: bar-grafana
+ state: absent
+ tags:
+ - rm_containers
+ - rm_grafana_cont
+ when: rm_containers|default(false)|bool == true
+
+- name: Remove barometer-grafana image
+ docker_image:
+ state: absent
+ name: anuket/barometer-grafana
+ tags:
+ - rm_images
+ - rm_grafana_image
+ when: rm_images|default(false)|bool == true
+
+- name: Cleanup barometer-grafana cache directory under host
+ file:
+ path: /var/lib/grafana
+ state: absent
+ when: clean_grafana_cache|default(true)|bool == true
+
+- name: launch barometer-grafana container
+ docker_container:
+ name: bar-grafana
+ image: anuket/barometer-grafana
+ volumes:
+ - /var/lib/grafana:/var/lib/grafana
+ ports:
+ - 3000:3000
+ env:
+ influxdb_host: "{{ influxdb_host_ip }}"
+ detach: yes
+ restart: yes
+ network_mode: host
diff --git a/docker/ansible/roles/run_grafana/vars/main.yml b/docker/ansible/roles/run_grafana/vars/main.yml
new file mode 100644
index 00000000..eb2d5274
--- /dev/null
+++ b/docker/ansible/roles/run_grafana/vars/main.yml
@@ -0,0 +1,19 @@
+#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.
+---
+
+#get hostname from invetory
+influxdb_hostname: "{{ (groups['influxdb_hosts']|default({}))[0] | default('localhost') }}"
+#get ip address for given host
+influxdb_host_ip: "{{ hostvars[influxdb_hostname].ansible_default_ipv4.address }}"
diff --git a/docker/ansible/roles/run_influxdb/tasks/main.yml b/docker/ansible/roles/run_influxdb/tasks/main.yml
new file mode 100644
index 00000000..02eeb788
--- /dev/null
+++ b/docker/ansible/roles/run_influxdb/tasks/main.yml
@@ -0,0 +1,48 @@
+# 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.
+# 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: remove bar-influxdb container
+ docker_container:
+ name: bar-influxdb
+ state: absent
+ tags:
+ - rm_containers
+ - rm_influxdb_cont
+ when: rm_containers|default(false)|bool == true
+
+- name: Remove barometer-influxdb image
+ docker_image:
+ name: anuket/barometer-influxdb
+ state: absent
+ tags:
+ - rm_images
+ - rm_influxdb_cont
+ when: rm_images|default(false)|bool == true
+
+- name: launch barometer-influxdb container
+ docker_container:
+ name: bar-influxdb
+ image: anuket/barometer-influxdb
+ volumes:
+ - /var/lib/influxdb:/var/lib/influxdb
+ exposed:
+ - 8086
+ - 25826
+ ports:
+ - 8086:8086
+ - 25826:25826
+ detach: yes
+ restart: yes
+ network_mode: host
diff --git a/docker/ansible/roles/run_kafka/tasks/main.yml b/docker/ansible/roles/run_kafka/tasks/main.yml
new file mode 100644
index 00000000..f30acd89
--- /dev/null
+++ b/docker/ansible/roles/run_kafka/tasks/main.yml
@@ -0,0 +1,52 @@
+# 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.
+# 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: Remove bar-kafka container
+ docker_container:
+ name: bar-kafka
+ state: absent
+ tags:
+ - remove_containers
+ - remove_bar-kafka
+ when: rm_containers|default(false)|bool == true
+
+- name: Remove anuket/barometer-kafka image
+ docker_image:
+ name: anuket/barometer-kafka
+ state: absent
+ tags:
+ - remove_images
+ - remove_kafka_image
+ when: rm_images|default(false)|bool == true
+
+- name: launch anuket/barometer-kafka container
+ docker_container:
+ name: bar-kafka
+ image: anuket/barometer-kafka
+ env:
+ zookeeper_node: "{{ zookeeper_hostname }}"
+ broker_id: "{{ broker_id }}"
+ etc_hosts: >
+ {
+ "{{ zookeeper_hostname }}": "{{ zookeeper_host_ip }}"
+ }
+ detach: true
+ exposed:
+ - 9092
+ ports:
+ - 9092:9092
+ state: started
+ restart: yes
+ network_mode: host
diff --git a/docker/ansible/roles/run_kafka/vars/main.yml b/docker/ansible/roles/run_kafka/vars/main.yml
new file mode 100644
index 00000000..b3091d40
--- /dev/null
+++ b/docker/ansible/roles/run_kafka/vars/main.yml
@@ -0,0 +1,22 @@
+# Copyright 2016-2019 Intel Corporation and OPNFV. 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.
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+---
+
+zookeeper_hostname: "{{ (groups['zookeeper_hosts']|default({}))[0] | default('localhost') }}"
+zookeeper_host_ip: "{{ hostvars[zookeeper_hostname].ansible_default_ipv4.address }}"
+
+broker_id: "0"
diff --git a/docker/ansible/roles/run_prometheus/tasks/main.yml b/docker/ansible/roles/run_prometheus/tasks/main.yml
new file mode 100644
index 00000000..940852e8
--- /dev/null
+++ b/docker/ansible/roles/run_prometheus/tasks/main.yml
@@ -0,0 +1,65 @@
+#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: remove bar-prometheus container
+ docker_container:
+ name: bar-prometheus
+ state: absent
+ tags:
+ - rm_containers
+ - rm_prometheus_cont
+ when: rm_containers|default(false)|bool == true
+
+- name: Create prometheus directory
+ file:
+ path: /etc/prometheus
+ state: directory
+
+- name: copy prometheus config
+ template:
+ src: prometheus.yml
+ dest: "/etc/prometheus/prometheus.yml"
+
+- name: modify prometheus.yml to add prometheus_hosts
+ lineinfile:
+ dest: /etc/prometheus/prometheus.yml
+ insertafter: targets
+ line: " - '{{ item }}:{{ prometheus_port }}'"
+ with_items: "{{ groups['collectd_hosts'] }}"
+
+- name: Remove prom-prometheus image
+ docker_image:
+ name: prom/prometheus
+ state: absent
+ tags:
+ - rm_images
+ - rm_prometheus_cont
+ when: rm_images|default(false)|bool == true
+
+- name: launch bar-prometheus container
+ docker_container:
+ name: bar-prometheus
+ image: prom/prometheus
+ volumes:
+ - /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
+ exposed:
+ - 9090
+ - "{{ prometheus_port }}"
+ ports:
+ - 9090:9090
+ - "{{ prometheus_port }}:{{ prometheus_port }}"
+ detach: yes
+ restart: yes
+ network_mode: host
diff --git a/docker/ansible/roles/run_prometheus/templates/prometheus.yml b/docker/ansible/roles/run_prometheus/templates/prometheus.yml
new file mode 100644
index 00000000..86ee6e0a
--- /dev/null
+++ b/docker/ansible/roles/run_prometheus/templates/prometheus.yml
@@ -0,0 +1,24 @@
+# Copyright 2018-2019 Intel Corporation and OPNFV. 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.
+# 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.
+#
+
+global:
+ scrape_timeout: "{{scrape_timeout}}"
+ scrape_interval: "{{scrape_interval}}"
+ evaluation_interval: "{{evaluation_interval}}"
+
+scrape_configs:
+ - job_name: 'collectd_exporter'
+ static_configs:
+ - targets:
diff --git a/docker/ansible/roles/run_prometheus/vars/main.yml b/docker/ansible/roles/run_prometheus/vars/main.yml
new file mode 100644
index 00000000..acf4d2d4
--- /dev/null
+++ b/docker/ansible/roles/run_prometheus/vars/main.yml
@@ -0,0 +1,21 @@
+#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.
+---
+
+#prometheus plugin vars
+prometheus_port: 9103
+
+scrape_timeout: 4s
+scrape_interval: 5s
+evaluation_interval: 5s \ No newline at end of file
diff --git a/docker/ansible/roles/run_ves/tasks/main.yml b/docker/ansible/roles/run_ves/tasks/main.yml
new file mode 100644
index 00000000..a203fa98
--- /dev/null
+++ b/docker/ansible/roles/run_ves/tasks/main.yml
@@ -0,0 +1,41 @@
+# 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.
+# 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: Remove bar-ves container
+ docker_container:
+ name: bar-ves
+ state: absent
+ tags:
+ - remove_containers
+ - remove_bar-ves
+ when: rm_containers|default(false)|bool == true
+
+- name: Remove anuket/barometer-ves image
+ docker_image:
+ state: absent
+ name: anuket/barometer-ves
+ tags:
+ - remove_images
+ - remove_ves_image
+ when: rm_images|default(false)|bool == true
+
+- name: launch anuket/barometer-ves container
+ docker_container:
+ name: bar-ves
+ image: anuket/barometer-ves
+ detach: yes
+ state: started
+ restart: yes
+ network_mode: host
diff --git a/docker/ansible/roles/run_zookeeper/tasks/main.yml b/docker/ansible/roles/run_zookeeper/tasks/main.yml
new file mode 100644
index 00000000..fdda300d
--- /dev/null
+++ b/docker/ansible/roles/run_zookeeper/tasks/main.yml
@@ -0,0 +1,41 @@
+#Copyright 2019 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: Remove bar-zookeeper container
+ docker_container:
+ name: bar-zookeeper
+ state: absent
+ tags:
+ - remove_containers
+ - remove_bar-zookeeper
+ when: rm_containers|default(false)|bool == true
+
+- name: Remove zookeeper image
+ docker_image:
+ state: absent
+ name: zookeeper:3.4.11
+ tags:
+ - remove_images
+ - remove_zookeeper_image
+ when: rm_images|default(false)|bool == true
+
+- name: launch zookeeper container
+ docker_container:
+ name: bar-zookeeper
+ image: zookeeper:3.4.11
+ detach: yes
+ state: started
+ restart: yes
+ network_mode: host