aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/ansible/collectd_ves.yml8
-rw-r--r--docker/ansible/default.inv7
-rw-r--r--docker/ansible/roles/config_files/tasks/logparser.yml23
-rw-r--r--docker/ansible/roles/config_files/tasks/main.yml3
-rw-r--r--docker/ansible/roles/config_files/tasks/snmp_agent.yml11
-rw-r--r--docker/ansible/roles/config_files/templates/experimental/logparser.conf.j274
-rw-r--r--docker/ansible/roles/config_files/templates/intel_pmu.conf.j23
-rw-r--r--docker/ansible/roles/config_files/templates/master/snmp_agent.conf.j2397
-rw-r--r--docker/ansible/roles/run_collectd/tasks/main.yml6
-rw-r--r--docker/ansible/roles/run_collectd/vars/main.yml21
-rw-r--r--docker/ansible/roles/run_kafka/vars/main.yml6
-rw-r--r--docker/ansible/roles/run_zookeeper/tasks/main.yml41
-rw-r--r--docker/barometer-collectd-experimental/Dockerfile37
-rwxr-xr-xdocker/barometer-collectd-experimental/collectd_apply_pull_request.sh39
-rw-r--r--docker/barometer-collectd-experimental/experimental-configs/README1
-rw-r--r--docker/barometer-collectd-experimental/experimental-configs/logparser.conf74
-rw-r--r--docker/barometer-collectd-experimental/run_collectd.sh15
-rw-r--r--docker/barometer-collectd-master/Dockerfile2
-rw-r--r--docker/barometer-collectd/Dockerfile1
19 files changed, 759 insertions, 10 deletions
diff --git a/docker/ansible/collectd_ves.yml b/docker/ansible/collectd_ves.yml
index f6140a5f..9e3bf463 100644
--- a/docker/ansible/collectd_ves.yml
+++ b/docker/ansible/collectd_ves.yml
@@ -13,7 +13,7 @@
# limitations under the License.
---
-- hosts: collectd_hosts kafka_hosts ves_hosts
+- hosts: collectd_hosts kafka_hosts ves_hosts zookeeper_hosts
become: true
become_user: root
gather_facts: true
@@ -27,6 +27,12 @@
- config_files
- run_collectd
+- hosts: zookeeper_hosts
+ become: true
+ become_user: root
+ roles:
+ - run_zookeeper
+
- hosts: kafka_hosts
become: true
become_user: root
diff --git a/docker/ansible/default.inv b/docker/ansible/default.inv
index 9319b9ea..fb366577 100644
--- a/docker/ansible/default.inv
+++ b/docker/ansible/default.inv
@@ -13,6 +13,9 @@ localhost
[collectd_hosts:vars]
install_mcelog=true
insert_ipmi_modules=true
+#to use master or experimental container set the collectd flavor below
+#possible values: stable|master|experimental
+flavor=stable
[influxdb_hosts]
#hostname or ip must be used.
@@ -25,6 +28,10 @@ insert_ipmi_modules=true
[prometheus_hosts]
#localhost
+[zookeeper_hosts]
+#NOTE: currently one zookeeper host is supported
+#hostname
+
[kafka_hosts]
#hostname
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..615d2e2b
--- /dev/null
+++ b/docker/ansible/roles/config_files/tasks/logparser.yml
@@ -0,0 +1,23 @@
+#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: enable logparser plugin
+ template:
+ src: experimental/logparser.conf.j2
+ dest: "{{ config_file_dir }}/logparser.conf"
+ when: flavor|default('stable')|string == 'experimental'
+ tags:
+ - logparser
+
diff --git a/docker/ansible/roles/config_files/tasks/main.yml b/docker/ansible/roles/config_files/tasks/main.yml
index 1bf66985..58cfec63 100644
--- a/docker/ansible/roles/config_files/tasks/main.yml
+++ b/docker/ansible/roles/config_files/tasks/main.yml
@@ -50,6 +50,9 @@
- name: enable logfile plugin
import_tasks: logfile.yml
+- name: enable logparser plugin
+ import_tasks: logparser.yml
+
- name: enable mcelog plugin
import_tasks: mcelog.yml
diff --git a/docker/ansible/roles/config_files/tasks/snmp_agent.yml b/docker/ansible/roles/config_files/tasks/snmp_agent.yml
index 603dc122..c72aee48 100644
--- a/docker/ansible/roles/config_files/tasks/snmp_agent.yml
+++ b/docker/ansible/roles/config_files/tasks/snmp_agent.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+#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.
@@ -17,5 +17,14 @@
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 master container
+ template:
+ src: master/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/templates/experimental/logparser.conf.j2 b/docker/ansible/roles/config_files/templates/experimental/logparser.conf.j2
new file mode 100644
index 00000000..3802768b
--- /dev/null
+++ b/docker/ansible/roles/config_files/templates/experimental/logparser.conf.j2
@@ -0,0 +1,74 @@
+# Copyright 2019 OPNFV
+#
+# 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/intel_pmu.conf.j2 b/docker/ansible/roles/config_files/templates/intel_pmu.conf.j2
index 067a3e82..564898da 100644
--- a/docker/ansible/roles/config_files/templates/intel_pmu.conf.j2
+++ b/docker/ansible/roles/config_files/templates/intel_pmu.conf.j2
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+#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.
@@ -20,5 +20,6 @@ LoadPlugin intel_pmu
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/master/snmp_agent.conf.j2 b/docker/ansible/roles/config_files/templates/master/snmp_agent.conf.j2
new file mode 100644
index 00000000..97a4ce40
--- /dev/null
+++ b/docker/ansible/roles/config_files/templates/master/snmp_agent.conf.j2
@@ -0,0 +1,397 @@
+# Copyright 2019 OPNFV
+#
+# 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/run_collectd/tasks/main.yml b/docker/ansible/roles/run_collectd/tasks/main.yml
index c77aad58..744c7a77 100644
--- a/docker/ansible/roles/run_collectd/tasks/main.yml
+++ b/docker/ansible/roles/run_collectd/tasks/main.yml
@@ -1,4 +1,4 @@
-#Copyright 2018 OPNFV and Intel Corporation
+#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.
@@ -24,7 +24,7 @@
- name: Remove bar-collectd image
docker_image:
- name: opnfv/barometer-collectd
+ name: "{{ collectd_image_name }}"
state: absent
tags:
- rm_images
@@ -34,7 +34,7 @@
- name: launch collectd container
docker_container:
name: bar-collectd
- image: opnfv/barometer-collectd
+ image: "{{ collectd_image_name }}"
volumes:
- /opt/collectd/etc/collectd.conf.d/:/opt/collectd/etc/collectd.conf.d
- /var/run:/var/run
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..cebd0f47
--- /dev/null
+++ b/docker/ansible/roles/run_collectd/vars/main.yml
@@ -0,0 +1,21 @@
+#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.
+---
+
+default_flavor: "{{ flavor|default('stable')|string }}"
+flavor_image_name: "{{
+ 'barometer-collectd-master' if (default_flavor == 'master') else
+ 'barometer-collectd-experimental' if (default_flavor == 'experimental')
+ else 'barometer-collectd' }}"
+collectd_image_name: "{{ 'opnfv/' + flavor_image_name }}"
diff --git a/docker/ansible/roles/run_kafka/vars/main.yml b/docker/ansible/roles/run_kafka/vars/main.yml
index 69f0fe0b..1fc5b528 100644
--- a/docker/ansible/roles/run_kafka/vars/main.yml
+++ b/docker/ansible/roles/run_kafka/vars/main.yml
@@ -13,7 +13,7 @@
# limitations under the License.
---
-zookeeper_hostname: zookeeper
-zookeeper_host_ip: localhost
+zookeeper_hostname: "{{ (groups['zookeeper_hosts']|default({}))[0] | default('localhost') }}"
+zookeeper_host_ip: "{{ hostvars[zookeeper_hostname].ansible_default_ipv4.address }}"
-broker_id: 0
+broker_id: "0"
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
diff --git a/docker/barometer-collectd-experimental/Dockerfile b/docker/barometer-collectd-experimental/Dockerfile
new file mode 100644
index 00000000..e505d2e2
--- /dev/null
+++ b/docker/barometer-collectd-experimental/Dockerfile
@@ -0,0 +1,37 @@
+FROM centos:7
+RUN yum update -y && \
+ yum install -y which sudo git && \
+ yum clean all && \
+ git config --global http.sslVerify false
+
+ENV DOCKER y
+ENV COLLECTD_FLAVOR experimental
+ENV WITH_DPDK y
+ENV repos_dir /src
+ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins
+
+WORKDIR ${repos_dir}
+RUN mkdir -p ${repos_dir}/barometer
+COPY . ${repos_dir}/barometer
+COPY docker/barometer-collectd-experimental/collectd_apply_pull_request.sh \
+ ${repos_dir}/barometer/src/collectd/
+
+# copying additional experimental configs on top of configs for 'master'
+# branch release
+COPY docker/barometer-collectd-experimental/experimental-configs/* \
+ ${repos_dir}/barometer/src/collectd/collectd_sample_configs-master/
+
+WORKDIR ${repos_dir}/barometer/systems
+RUN sh ./build_base_machine.sh && \
+ useradd -ms /bin/bash collectd_exec && \
+ echo "collectd_exec ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
+
+WORKDIR ${openstack_plugins}
+RUN make && \
+ pip install --upgrade pip && \
+ pip install -r ${openstack_plugins}/collectd-openstack-plugins/requirements.txt
+
+COPY docker/barometer-collectd-experimental/run_collectd.sh /run_collectd.sh
+RUN chmod +x /run_collectd.sh
+
+ENTRYPOINT ["/run_collectd.sh"]
diff --git a/docker/barometer-collectd-experimental/collectd_apply_pull_request.sh b/docker/barometer-collectd-experimental/collectd_apply_pull_request.sh
new file mode 100755
index 00000000..dcea33a3
--- /dev/null
+++ b/docker/barometer-collectd-experimental/collectd_apply_pull_request.sh
@@ -0,0 +1,39 @@
+#! /bin/bash
+# Copyright 2019 OPNFV
+#
+# 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.
+
+# This files contains list of pull requests to be applied on top
+# of master branch before building collectd included in docker
+# collectd-experimental container
+
+# Space/newline separated list of pull requests IDs
+# for example:
+# PULL_REQUESTS=(3027 #reimplement delay rate
+# 3028 #other PR
+# )
+
+PULL_REQUESTS=(
+ 3045 #logparser
+ #insert another PR ID here
+ )
+
+# during rebasing/merging git requires email & name to be set
+git config user.email "barometer-experimental@container"
+git config user.name "BarometerExperimental"
+
+for PR_ID in "${PULL_REQUESTS[@]}"
+do
+ echo "Applying pull request $PR_ID"
+ git pull --rebase origin pull/$PR_ID/head
+done
diff --git a/docker/barometer-collectd-experimental/experimental-configs/README b/docker/barometer-collectd-experimental/experimental-configs/README
new file mode 100644
index 00000000..e4386358
--- /dev/null
+++ b/docker/barometer-collectd-experimental/experimental-configs/README
@@ -0,0 +1 @@
+Place here configuration files that are required by experimental pull requests
diff --git a/docker/barometer-collectd-experimental/experimental-configs/logparser.conf b/docker/barometer-collectd-experimental/experimental-configs/logparser.conf
new file mode 100644
index 00000000..3802768b
--- /dev/null
+++ b/docker/barometer-collectd-experimental/experimental-configs/logparser.conf
@@ -0,0 +1,74 @@
+# Copyright 2019 OPNFV
+#
+# 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/barometer-collectd-experimental/run_collectd.sh b/docker/barometer-collectd-experimental/run_collectd.sh
new file mode 100644
index 00000000..b45711e1
--- /dev/null
+++ b/docker/barometer-collectd-experimental/run_collectd.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+# Copyright 2019 OPNFV
+#
+# 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.
+/opt/collectd/sbin/collectd -f
diff --git a/docker/barometer-collectd-master/Dockerfile b/docker/barometer-collectd-master/Dockerfile
index 0f890d08..da94888d 100644
--- a/docker/barometer-collectd-master/Dockerfile
+++ b/docker/barometer-collectd-master/Dockerfile
@@ -5,7 +5,7 @@ RUN yum update -y && \
git config --global http.sslVerify false
ENV DOCKER y
-ENV COLLECTD_USE_MASTER y
+ENV COLLECTD_FLAVOR master
ENV WITH_DPDK y
ENV repos_dir /src
ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins
diff --git a/docker/barometer-collectd/Dockerfile b/docker/barometer-collectd/Dockerfile
index a7a8a077..2f2f57e5 100644
--- a/docker/barometer-collectd/Dockerfile
+++ b/docker/barometer-collectd/Dockerfile
@@ -6,6 +6,7 @@ RUN yum update -y && \
ENV DOCKER y
ENV WITH_DPDK y
+ENV COLLECTD_FLAVOR stable
ENV repos_dir /src
ENV openstack_plugins /src/barometer/src/collectd-openstack-plugins