[ansible] Use collectd_config for plugins 40/71540/29
authorEmma Foley <efoley@redhat.com>
Wed, 9 Jun 2021 17:36:17 +0000 (18:36 +0100)
committerEmma Foley <efoley@redhat.com>
Thu, 26 Aug 2021 20:05:50 +0000 (21:05 +0100)
* Update the following plugins to use collectd_config role
  * capabilities
  * csv
  * dpdk_telemetry
  * exec
  * hugepages
  * ipmi
  * logfile
  * network
  * ovs_events
  * ovs_stats
  * syslog
  * uuid
  * write_kafka
  * write_prometheus

JIRA: BAROMETER-180
Signed-off-by: Emma Foley <efoley@redhat.com>
Change-Id: I2ec9e3c2db2c1d907459b40550012834196f0c65

31 files changed:
docker/ansible/roles/config_files/tasks/capabilities.yml
docker/ansible/roles/config_files/tasks/csv.yml
docker/ansible/roles/config_files/tasks/dpdk.yml
docker/ansible/roles/config_files/tasks/exec.yml
docker/ansible/roles/config_files/tasks/hugepages.yml
docker/ansible/roles/config_files/tasks/ipmi.yml
docker/ansible/roles/config_files/tasks/kafka.yml
docker/ansible/roles/config_files/tasks/logfile.yml
docker/ansible/roles/config_files/tasks/main.yml
docker/ansible/roles/config_files/tasks/network.yml
docker/ansible/roles/config_files/tasks/ovs.yml [moved from docker/ansible/roles/config_files/tasks/vswitch.yml with 56% similarity]
docker/ansible/roles/config_files/tasks/pmu.yml
docker/ansible/roles/config_files/tasks/prometheus.yml
docker/ansible/roles/config_files/tasks/syslog.yml
docker/ansible/roles/config_files/tasks/uuid.yml
docker/ansible/roles/config_files/templates/capabilities.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/csv.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/dpdk_telemetry.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/exec.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/hugepages.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/intel_pmu.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/ipmi.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/kafka.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/logfile.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/network.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/ovs_events.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/ovs_stats.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/prometheus.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/syslog.conf.j2 [deleted file]
docker/ansible/roles/config_files/templates/uuid.conf.j2 [deleted file]
docker/ansible/roles/config_files/vars/main.yml

index f57d55d..cfca03a 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2019 OPNFV and Intel Corporation
+# Copyright 2019-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 ---
 
 - name: enable capabilities plugin
-  template:
-    src: capabilities.conf.j2
-    dest: "{{ config_file_dir }}/capabilities.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['capabilities']) | unique }}"
   tags:
     - capabilities
 
-
index 0be4ec8..bfd88c0 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,9 +14,8 @@
 ---
 
 - name: enable csv plugin
-  template:
-    src: csv.conf.j2
-    dest: "{{ config_file_dir }}/csv.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['csv']) | unique }}"
   tags:
     - csv
 
index 5ae05cb..a022de9 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -31,8 +31,7 @@
     - dpdkevents
 
 - name: enable dpdk_telemetry plugin
-  template:
-    src: dpdk_telemetry.conf.j2
-    dest: "{{ config_file_dir }}/dpdk_telemetry.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['dpdk_telemetry']) | unique }}"
   tags:
     - dpdk_telemetry
index b738970..956e3a8 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # See the License for the specific language governing permissions and
 # limitations under the License.
 ---
-
 - name: enable exec plugin
-  template:
-    src: exec.conf.j2
-    dest: "{{ config_file_dir }}/exec.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['exec']) | unique }}"
   tags:
     - exec
index 43dca50..5b4ec0b 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -25,9 +25,8 @@
     - hugepages
 
 - name: enable hugepages plugin
-  template:
-    src: hugepages.conf.j2
-    dest: "{{ config_file_dir }}//hugepages.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['hugepages']) | unique }}"
   when: hugepages_result is succeeded
   tags:
     - hugepages
index 558d539..12913a8 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -52,9 +52,8 @@
      - ipmi
 
 - name: enable ipmi plugin
-  template:
-    src: ipmi.conf.j2
-    dest: "{{ config_file_dir }}/0_ipmi.conf"
+  set_fact:
+    collectd_plugins: '{{ collectd_plugins | union(["ipmi"]) | unique }}'
   when: (ipmi0_exists is succeeded) and (ipmi_devintf is succeeded) and (ipmi_devsi is succeeded)
   tags:
     - ipmi
index d7639cb..6fb3f05 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -13,9 +13,8 @@
 # limitations under the License.
 ---
 
-- name: enable kafka plugin
-  template:
-    src: kafka.conf.j2
-    dest: "{{ config_file_dir }}/kafka.conf"
+- name: enable kafka plugin with collectd_config
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['write_kafka']) | unique }}"
   tags:
     - kafka
index b270059..cd1c104 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 ---
 
 - name: enable logfile plugin
-  template:
-    src: logfile.conf.j2
-    dest: "{{ config_file_dir }}/logfile.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['logfile']) | unique }}"
   tags:
     - logfile
 
-
-
-
index 4a25e4e..eab356d 100644 (file)
@@ -83,6 +83,9 @@
 - name: enable syslog plugin
   import_tasks: syslog.yml
 
+- name: enable ovs plugins
+  import_tasks: ovs.yml
+
 - name: enable virt plugin
   import_tasks: virt.yml
 
     - always
     - en_default_all
 
-- name: "Copy the generated plugin configs"
-  shell:
-    sudo cp /tmp/collectd.conf.d/*.conf {{ config_file_dir }} && sudo cp /tmp/collectd.conf {{ config_file_dir }}/../collectd.conf
+- 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"
index 52902d4..0af6a71 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 ---
 
 - name: Enable network plugin
-  template:
-    src: network.conf.j2
-    dest: "{{ config_file_dir }}/network.conf"
+  set_fact:
+    collectd_plugins: '{{ collectd_plugins | union (["network"]) | unique }}'
   tags:
      - network
 
 - name: Add network port if defined
-  lineinfile:
-    dest: "{{ config_file_dir }}/network.conf"
-    insertafter: Plugin network
-    line: "    Server \"{{ network_ip_addr }}\" \"{{ network_port }}\""
+  set_fact:
+    collectd_plugin_network_server: "{{ collectd_plugin_network_server | default([]) | union([{
+        'name': network_ip_addr,
+        'port': network_port,
+      }]) }}"
   when: network_ip_addr is defined
   tags:
    - network
 
 - name: Modify network.conf to add influxdb_hosts
-  lineinfile:
-    dest: "{{ config_file_dir }}/network.conf"
-    insertafter: Plugin network
-    line: "    Server \"{{ item }}\" \"{{ influx_network_port }}\""
+  set_fact:
+    collectd_plugin_network_server: "{{ collectd_plugin_network_server | default([]) | union([{ 'name': item, 'port': influx_network_port }]) }}"
   with_items: "{{ groups['influxdb_hosts'] }}"
   tags:
    - network
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
      - ovs_events
 
 - name: enable ovs_stats plugin
-  template:
-    src: "ovs_stats.conf.j2"
-    dest: "{{ config_file_dir }}/ovs_stats.conf"
+  set_fact:
+    collectd_plugins: '{{ collectd_plugins | union(["ovs_stats"]) | unique }}'
+    collectd_plugin_ovs_stats_port: "{{ ovs_stats_port if ovs_stats_port is defined else omit }}"
+    collectd_plugin_ovs_stats_address: "{{ ovs_stats_ip_addr if ovs_stats_ip_addr is defined else omit }}"
+    collectd_plugin_ovs_stats_interval: "{{ ovs_stats_interval if ovs_stats_interval is defined else omit }}"
   when: (vswitchd_running is succeeded) and (dbsock_exists is succeeded)
   tags:
-   - ovs_stats
+    - ovs_stats
 
 - name: enable ovs_events plugin
-  template:
-    src: "ovs_events.conf.j2"
-    dest: "{{ config_file_dir }}/ovs_events.conf"
+  set_fact:
+    collectd_plugins: '{{ collectd_plugins | union(["ovs_events"]) | unique }}'
+    collectd_plugin_ovs_events_interval: "{{ ovs_events_interval if ovs_events_interval is defined else omit }}"
+    collectd_plugin_ovs_events_address: "{{ ovs_events_ip_addr if ovs_events_ip_addr is defined else omit }}"
+    collectd_plugin_ovs_events_port: "{{ ovs_events_port if ovs_events_port is defined else omit }}"
   when: (vswitchd_running is succeeded) and (dbsock_exists is succeeded)
   tags:
     - ovs_events
index 20e3034..c5820f9 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,8 +14,7 @@
 ---
 
 - name: enable intel_pmu plugin
-  template:
-    src: intel_pmu.conf.j2
-    dest: "{{ config_file_dir }}/intel_pmu.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['intel_pmu']) | unique }}"
   tags:
     - pmu
index 51f2b1f..c0e7e79 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,8 +14,7 @@
 ---
 
 - name: enable prometheus plugin
-  template:
-    src: prometheus.conf.j2
-    dest: "{{ config_file_dir }}/prometheus.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['write_prometheus']) | unique }}"
   tags:
-     - prometheus
\ No newline at end of file
+     - prometheus
index 97864a5..e9ab06f 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,9 +14,8 @@
 ---
 
 - name: enable syslog plugin
-  template:
-    src: syslog.conf.j2
-    dest: "{{ config_file_dir }}/syslog.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['syslog']) | unique }}"
   tags:
     - syslog
 
index 25cfa12..df669e1 100644 (file)
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+# Copyright 2018-21 Anuket, Intel Corporation and others
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,8 +14,7 @@
 ---
 
 - name: enable uuid plugin
-  template:
-    src: uuid.conf.j2
-    dest: "{{ config_file_dir }}/uuid.conf"
+  set_fact:
+    collectd_plugins: "{{ collectd_plugins | union(['uuid']) | unique }}"
   tags:
     - uuid
diff --git a/docker/ansible/roles/config_files/templates/capabilities.conf.j2 b/docker/ansible/roles/config_files/templates/capabilities.conf.j2
deleted file mode 100644 (file)
index a422b70..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-LoadPlugin capabilities
-
-<Plugin capabilities>
-  Port "9564"
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/csv.conf.j2 b/docker/ansible/roles/config_files/templates/csv.conf.j2
deleted file mode 100644 (file)
index 3e35193..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin csv
-
-<Plugin csv>
-        DataDir "{{ csv_log_dir }}"
-        StoreRates false
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/dpdk_telemetry.conf.j2 b/docker/ansible/roles/config_files/templates/dpdk_telemetry.conf.j2
deleted file mode 100644 (file)
index d85a3dd..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#Copyright 2020 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 dpdk_telemetry
-
-<Plugin dpdk_telemetry>
-       ClientSocketPath "/var/run/.client"
-       DpdkSocketPath "/var/run/dpdk/rte/telemetry"
-</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/exec.conf.j2 b/docker/ansible/roles/config_files/templates/exec.conf.j2
deleted file mode 100644 (file)
index 2467606..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin exec
-
-<Plugin exec>
-     # For OVS PMD stats plugin
-     Exec "collectd_exec" "/src/barometer/src/collectd/collectd_sample_configs/ovs_pmd_stats.sh"
-     NotificationExec "collectd_exec" "/src/barometer/src/collectd/collectd_sample_configs/write_notification.sh"
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/hugepages.conf.j2 b/docker/ansible/roles/config_files/templates/hugepages.conf.j2
deleted file mode 100644 (file)
index b391a39..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin hugepages
-
-<Plugin hugepages>
-    ReportPerNodeHP  true
-    ReportRootHP     true
-    ValuesPages      true
-    ValuesBytes      false
-    ValuesPercentage false
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/intel_pmu.conf.j2 b/docker/ansible/roles/config_files/templates/intel_pmu.conf.j2
deleted file mode 100644 (file)
index 564898d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#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.
-
-LoadPlugin intel_pmu
-
-<Plugin intel_pmu>
-  ReportHardwareCacheEvents true
-  ReportKernelPMUEvents true
-  ReportSoftwareEvents true
-#  EventList "/var/cache/pmu/GenuineIntel-6-2D-core.json"
-#  HardwareEvents "L2_RQSTS.CODE_RD_HIT,L2_RQSTS.CODE_RD_MISS" "L2_RQSTS.ALL_CODE_RD"
-  Cores "[0-4]"
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/ipmi.conf.j2 b/docker/ansible/roles/config_files/templates/ipmi.conf.j2
deleted file mode 100644 (file)
index 54554d2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin ipmi
-
-#<Plugin ipmi>
-#       <Instance "local">
-#               Sensor "some_sensor"
-#               Sensor "another_one"
-#               IgnoreSelected false
-#               NotifySensorAdd false
-#               NotifySensorRemove true
-#               NotifySensorNotPresent false
-#               NotifyIPMIConnectionState false
-#               SELEnabled false
-#               SELClearEvent false
-#       </Instance>
-#       <Instance "remote">
-#               Host "server.example.com"
-#               Address  "1.2.3.4"
-#               Username "user"
-#               Password "secret"
-#               #AuthType "md5"
-#               Sensor "some_sensor"
-#               Sensor "another_one"
-#               IgnoreSelected false
-#               NotifySensorAdd false
-#               NotifySensorRemove true
-#               NotifySensorNotPresent false
-#               NotifyIPMIConnectionState false
-#               SELEnabled false
-#               SELClearEvent false
-#       </Instance>
-#</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/kafka.conf.j2 b/docker/ansible/roles/config_files/templates/kafka.conf.j2
deleted file mode 100644 (file)
index 3e4bc24..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin write_kafka
-
-<Plugin write_kafka>
-  Property "metadata.broker.list" "{{ kafka_ip_addr }}:{{ kafka_port }}"
-  <Topic "{{ kafka_topic }}">
-    Format JSON
-  </Topic>
-</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/logfile.conf.j2 b/docker/ansible/roles/config_files/templates/logfile.conf.j2
deleted file mode 100644 (file)
index 8bc96ff..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin logfile
-
-<Plugin logfile>
-  LogLevel "{{ logfile_log_level }}"
-  File "{{ logfile_dir }}/collectd.log"
-  Timestamp true
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/network.conf.j2 b/docker/ansible/roles/config_files/templates/network.conf.j2
deleted file mode 100644 (file)
index c89a18e..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin  network
-
-#this is auto-filled using ansible script
-<Plugin network>
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/ovs_events.conf.j2 b/docker/ansible/roles/config_files/templates/ovs_events.conf.j2
deleted file mode 100644 (file)
index 4fbea5a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-<LoadPlugin ovs_events>
-   Interval "{{ ovs_events_interval }}"
-</LoadPlugin>
-
-<Plugin ovs_events>
-#   Port "{{ ovs_event_port }}"
-#   Address "{{ ovs_event_ip_addr }}"
-#   Socket "/var/run/openvswitch/db.sock"
-#  Interfaces "br0" "veth0"
-   SendNotification true
-   DispatchValues true
-</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/ovs_stats.conf.j2 b/docker/ansible/roles/config_files/templates/ovs_stats.conf.j2
deleted file mode 100644 (file)
index fc26e4b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-<LoadPlugin ovs_stats>
-   Interval "{{ ovs_stats_interval }}"
-</LoadPlugin>
-
-<Plugin ovs_stats>
-#   Port "{{ ovs_stats_port }}"
-#   Address "{{ ovs_stats_ip_addr }}"
-#   Socket "/var/run/openvswitch/db.sock"
-#   Bridges "br0" "br_ext"
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/prometheus.conf.j2 b/docker/ansible/roles/config_files/templates/prometheus.conf.j2
deleted file mode 100644 (file)
index bb94786..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin  write_prometheus
-
-<Plugin "write_prometheus">
-  Port "{{ prometheus_port }}"
-</Plugin>
diff --git a/docker/ansible/roles/config_files/templates/syslog.conf.j2 b/docker/ansible/roles/config_files/templates/syslog.conf.j2
deleted file mode 100644 (file)
index f9d7781..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin syslog
-
-# Decrease syslog verbosity, to avoid duplicate logging
-<Plugin syslog>
-  LogLevel "{{ syslog_log_level }}"
-</Plugin>
-
diff --git a/docker/ansible/roles/config_files/templates/uuid.conf.j2 b/docker/ansible/roles/config_files/templates/uuid.conf.j2
deleted file mode 100644 (file)
index a9a84e7..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#Copyright 2018 OPNFV and Intel Corporation
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-LoadPlugin uuid
-
-#<Plugin uuid>
-#  UUIDFile "/etc/uuid"
-#</Plugin>
-
index 5af4d7a..4e42791 100644 (file)
 collectd_plugins: []
 collectd_interval: "{{ interval_value }}"
 collectd_hostname: "{{ inventory_hostname }}"
+
+collectd_plugin_capabilities_port: "9564"
+
+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_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_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 }}"