From b20fa77aef9d184afa2dadba619afc12878ae67b Mon Sep 17 00:00:00 2001 From: Radoslaw Jablonski Date: Fri, 27 Jul 2018 15:32:54 +0100 Subject: Add support for 'collectd-master' container 'collectd-master' contains development versions of collectd with the latest features. It is based on master branch from collect repository. Change-Id: I720b5e5938b402281674ee73851c5f611e4d1178 Signed-off-by: Radoslaw Jablonski --- docker/README_collectd | 135 +++ docker/barometer-collectd-master/Dockerfile | 29 + docker/barometer-collectd-master/run_collectd.sh | 15 + docker/barometer-collectd/README | 106 --- mibs/LIBVIRT-HYPERVISOR-MIB.txt | 903 +++++++++++++++++++++ src/collectd/Makefile | 10 +- .../collectd_sample_configs-master/csv.conf | 19 + .../default_plugins.conf | 31 + .../collectd_sample_configs-master/dpdkevents.conf | 35 + .../collectd_sample_configs-master/dpdkstat.conf | 23 + .../collectd_sample_configs-master/exec.conf | 20 + .../collectd_sample_configs-master/hugepages.conf | 22 + .../collectd_sample_configs-master/intel_pmu.conf | 23 + .../collectd_sample_configs-master/kafka.conf | 21 + .../collectd_sample_configs-master/mcelog.conf | 24 + .../collectd_sample_configs-master/network.conf | 18 + .../collectd_sample_configs-master/ovs_events.conf | 24 + .../ovs_pmd_stats.sh | 15 + .../collectd_sample_configs-master/ovs_stats.conf | 23 + .../collectd_sample_configs-master/rdt.conf | 20 + .../collectd_sample_configs-master/snmp_agent.conf | 785 ++++++++++++++++++ .../collectd_sample_configs-master/virt.conf | 30 + .../write_notification.sh | 19 + src/collectd/include_config.sh | 24 +- src/package-list.mk | 9 +- 25 files changed, 2273 insertions(+), 110 deletions(-) create mode 100644 docker/README_collectd create mode 100644 docker/barometer-collectd-master/Dockerfile create mode 100644 docker/barometer-collectd-master/run_collectd.sh delete mode 100644 docker/barometer-collectd/README create mode 100644 mibs/LIBVIRT-HYPERVISOR-MIB.txt create mode 100644 src/collectd/collectd_sample_configs-master/csv.conf create mode 100644 src/collectd/collectd_sample_configs-master/default_plugins.conf create mode 100644 src/collectd/collectd_sample_configs-master/dpdkevents.conf create mode 100644 src/collectd/collectd_sample_configs-master/dpdkstat.conf create mode 100644 src/collectd/collectd_sample_configs-master/exec.conf create mode 100644 src/collectd/collectd_sample_configs-master/hugepages.conf create mode 100644 src/collectd/collectd_sample_configs-master/intel_pmu.conf create mode 100644 src/collectd/collectd_sample_configs-master/kafka.conf create mode 100644 src/collectd/collectd_sample_configs-master/mcelog.conf create mode 100644 src/collectd/collectd_sample_configs-master/network.conf create mode 100644 src/collectd/collectd_sample_configs-master/ovs_events.conf create mode 100755 src/collectd/collectd_sample_configs-master/ovs_pmd_stats.sh create mode 100644 src/collectd/collectd_sample_configs-master/ovs_stats.conf create mode 100644 src/collectd/collectd_sample_configs-master/rdt.conf create mode 100644 src/collectd/collectd_sample_configs-master/snmp_agent.conf create mode 100644 src/collectd/collectd_sample_configs-master/virt.conf create mode 100755 src/collectd/collectd_sample_configs-master/write_notification.sh diff --git a/docker/README_collectd b/docker/README_collectd new file mode 100644 index 00000000..c922ab64 --- /dev/null +++ b/docker/README_collectd @@ -0,0 +1,135 @@ +============================================================================== +Readme for collectd docker container in barometer project +============================================================================== + +This text file includes information about environment preparation and +deployment collectd in docker container + +Table of content: +1. DESCRIPTION +2. SYSTEM REQUIREMENTS +3. INSTALLATION NOTES - barometer-collectd +4. INSTALLATION NOTES - barometer-collectd-master +5. ADDITIONAL STEPS + +------------------------------------------------------------------------------ +1. DESCRIPTION + +This Dockerfile provides instruction for building collect in isolated container. +There are currently two variants of collectd container: + - barometer-collectd - it is based on stable collect release + - barometer-collectd-master - development container that is based on + latest 'master' branch for collectd project. It contains all available + collectd plugins and features that are available on 'master' branch but + some issues with configuration or stability may occur + +------------------------------------------------------------------------------ +2. SYSTEM REQUIREMENTS + + Docker >= 17.06.0-ce + +------------------------------------------------------------------------------ +3. INSTALLATION NOTES: barometer-collectd (stable container) + +To build docker container, that is based on stable collectd release, run: +sudo docker build -f ./docker/barometer-collectd/Dockerfile ./docker/barometer-collectd +from barometer folder. + +sudo docker images # get docker image id +sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \ +-v /var/run:/var/run -v /tmp:/tmp --privileged + +To make some changes run +sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs:/opt/collectd/etc/collectd.conf.d \ +-v /var/run:/var/run -v /tmp:/tmp --privileged --entrypoint=/bin/bash + +/opt/collectd/sbin/collectd -f + +------------------------------------------------------------------------------ +4. INSTALLATION NOTES: barometer-collectd-master (development container) + +To build docker barometer-collectd-master container run (it is based on master branch from collectd): +sudo docker build -f ./docker/barometer-collectd-master/Dockerfile . +from root barometer folder. + +To run builded image run +sudo docker images # get docker image id +sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs-master:/opt/collectd/etc/collectd.conf.d \ +-v /var/run:/var/run -v /tmp:/tmp --privileged + +NOTE: barometer-collectd-master container uses a different sample configurations files +compared to regular barometer-collectd container (src/collectd/collectd_sample_configs-master) + +To make some changes run +sudo docker run -ti --net=host -v `pwd`/src/collectd/collectd_sample_configs-master:/opt/collectd/etc/collectd.conf.d \ +-v /var/run:/var/run -v /tmp:/tmp --privileged --entrypoint=/bin/bash + +/opt/collectd/sbin/collectd -f + +------------------------------------------------------------------------------ +5. ADDITIONAL STEPS + +To check if container works properly additional packages should be installed +on host system. + +DEVELOPMENT TOOLS +sudo yum group install "Development Tools" + +MCELOG +To simulate mcelog message use instruction in http://artifacts.opnfv.org/barometer/docs/index.html#mcelog-plugin + +git clone https://github.com/andikleen/mce-inject +cd mce-inject/ +make +sudo make install +modprobe mce-inject + +go to mcelog folder +sudo make test + +if runs multiple times mcelog service shoud be restarted(cause mcelog make test exits closes mcelog) + +VIRT +http://artifacts.opnfv.org/barometer/docs/index.html#virt-plugin +Check that libvirtd is running on the remote host +systemctl status libvirtd +virsh list +virsh perf instance-00000003 +sudo virsh perf instance-00000003 --enable cpu_cycles --live +sudo virsh perf instance-00000003 --enable cmt --live +sudo virsh perf instance-00000003 --enable mbmt --live +sudo virsh perf instance-00000003 --enable mbml --live +sudo virsh perf instance-00000003 --enable instructions --live +sudo virsh perf instance-00000003 --enable cache_references --live +sudo virsh perf instance-00000003 --enable cache_mises --live +sudo virsh perf instance-00000003 --enable cache_misses --live + +OVS +To successfuly run ovs plugins in Docker you need an ovs instance to connect to + +sudo yum install -y openvswitch-switch +sudo service openvswitch-switch start +sudo ovs-vsctl set-manager ptcp:6640 + +Alternatively you can build ovs from source +yum -y install make gcc openssl-devel autoconf automake rpm-build \ + redhat-rpm-config python-devel openssl-devel kernel-devel \ + kernel-debug-devel libtool wget python-six selinux-policy-devel +mkdir -p ~/rpmbuild/SOURCES +cd ~/rpmbuild/SOURCES +wget http://openvswitch.org/releases/openvswitch-2.5.3.tar.gz +tar xfz openvswitch-2.5.3.tar.gz +sed 's/openvswitch-kmod, //g' rhel/openvswitch.spec > rhel/openvswitch_no_kmod.spec +rpmbuild -bb --nocheck rhel/openvswitch_no_kmod.spec +cd ../RPMS/x86_64/ +yum install -y openvswitch-2.5.3-1.x86_64.rpm +sudo systemctl start openvswitch.service +sudo ovs-vsctl set-manager ptcp:6640 + +To check if connection is successfull please check +sudo ovs-vsctl show +319efc53-b321-49a9-b628-e8d70f9bd8a9 + Manager "ptcp:6640" + is_connected: true - can be a marker that ovs plugins successfully connected + ovs_version: "2.5.3" +on the host. diff --git a/docker/barometer-collectd-master/Dockerfile b/docker/barometer-collectd-master/Dockerfile new file mode 100644 index 00000000..a1c957f3 --- /dev/null +++ b/docker/barometer-collectd-master/Dockerfile @@ -0,0 +1,29 @@ +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_USE_MASTER 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 + +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-master/run_collectd.sh /run_collectd.sh +RUN chmod +x /run_collectd.sh + +ENTRYPOINT ["/run_collectd.sh"] diff --git a/docker/barometer-collectd-master/run_collectd.sh b/docker/barometer-collectd-master/run_collectd.sh new file mode 100644 index 00000000..001cce1a --- /dev/null +++ b/docker/barometer-collectd-master/run_collectd.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright 2017 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/README b/docker/barometer-collectd/README deleted file mode 100644 index 4936ad8c..00000000 --- a/docker/barometer-collectd/README +++ /dev/null @@ -1,106 +0,0 @@ -============================================================================== -Readme for collectd docker container in barometer project -============================================================================== - -This text file includes information about environment preparation and -deployment collectd in docker container - -Table of content: -1. DESCRIPTION -2. SYSTEM REQUIREMENTS -3. INSTALLATION NOTES -4. ADDITIONAL STEPS - ------------------------------------------------------------------------------- -1. DESCRIPTION - -This Dockerfile provides instruction for building collect in isolated container - ------------------------------------------------------------------------------- -2. SYSTEM REQUIREMENTS - - Docker >= 17.06.0-ce - ------------------------------------------------------------------------------- -3. INSTALLATION NOTES - -To build docker container run -sudo docker build -f ./docker/barometer-collectd/Dockerfile . -from barometer folder. - -To run builded image run -sudo docker images -Get docker image id -sudo docker run -ti --net=host -v `pwd`/../src/collectd_sample_configs:/opt/collectd/etc/collectd.d \ --v /var/run:/var/run -v /tmp:/tmp --privileged /run_collectd.sh - -To make some changes run -sudo docker run -ti --net=host -v `pwd`/../collectd_sample_configs:/opt/collectd/etc/collectd.d \ - -v /var/run:/var/run --privileged /bin/bash - -/opt/collectd/sbin/collectd -f - ------------------------------------------------------------------------------- -4. ADDITIONAL STEPS - -To check if container works properly additional packages should be installed -on host system. - -MCELOG -To simulate mcelog message use instruction in http://artifacts.opnfv.org/barometer/docs/index.html#mcelog-plugin - -git clone https://github.com/andikleen/mce-inject -cd mce-inject/ -make -sudo make install -modprobe mce-inject - -go to mcelog folder -sudo make test - -if runs multiple times mcelog service shoud be restarted(cause mcelog make test exits closes mcelog) - -VIRT -http://artifacts.opnfv.org/barometer/docs/index.html#virt-plugin -Check that libvirtd is running on the remote host -systemctl status libvirtd -virsh list -virsh perf instance-00000003 -sudo virsh perf instance-00000003 --enable cpu_cycles --live -sudo virsh perf instance-00000003 --enable cmt --live -sudo virsh perf instance-00000003 --enable mbmt --live -sudo virsh perf instance-00000003 --enable mbml --live -sudo virsh perf instance-00000003 --enable instructions --live -sudo virsh perf instance-00000003 --enable cache_references --live -sudo virsh perf instance-00000003 --enable cache_mises --live -sudo virsh perf instance-00000003 --enable cache_misses --live - -OVS -To successfuly run ovs plugins in Docker you need an ovs instance to connect to - -sudo yum install -y openvswitch-switch -sudo service openvswitch-switch start -sudo ovs-vsctl set-manager ptcp:6640 - -Alternatively you can build ovs from source -yum -y install make gcc openssl-devel autoconf automake rpm-build \ - redhat-rpm-config python-devel openssl-devel kernel-devel \ - kernel-debug-devel libtool wget python-six selinux-policy-devel -mkdir -p ~/rpmbuild/SOURCES -cd ~/rpmbuild/SOURCES -wget http://openvswitch.org/releases/openvswitch-2.5.3.tar.gz -tar xfz openvswitch-2.5.3.tar.gz -sed 's/openvswitch-kmod, //g' rhel/openvswitch.spec > rhel/openvswitch_no_kmod.spec -rpmbuild -bb --nocheck rhel/openvswitch_no_kmod.spec -cd ../RPMS/x86_64/ -yum install -y openvswitch-2.5.3-1.x86_64.rpm -sudo systemctl start openvswitch.service -sudo ovs-vsctl set-manager ptcp:6640 - -To check if connection is successfull please check -sudo ovs-vsctl show -319efc53-b321-49a9-b628-e8d70f9bd8a9 - Manager "ptcp:6640" - is_connected: true - can be a marker that ovs plugins successfully connected - ovs_version: "2.5.3" -on the host. diff --git a/mibs/LIBVIRT-HYPERVISOR-MIB.txt b/mibs/LIBVIRT-HYPERVISOR-MIB.txt new file mode 100644 index 00000000..aa71481d --- /dev/null +++ b/mibs/LIBVIRT-HYPERVISOR-MIB.txt @@ -0,0 +1,903 @@ +LIBVIRT-HYPERVISOR-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, Integer32, Unsigned32, Counter64 + FROM SNMPv2-SMI + + hostAssist + FROM Intel-SA-MIB + + DisplayString + FROM SNMPv2-TC; + +--***************************************************************************** +-- +-- MODULE IDENTITY AND REVISION GROUP +-- +--***************************************************************************** + +libvirtHypervisor MODULE-IDENTITY + LAST-UPDATED "201710061110Z" -- coordinated universal time UTC format is YYMMDDHHmmZ + ORGANIZATION "Intel, Server Management Software" + CONTACT-INFO + "" + DESCRIPTION + "This SNMP MIB module supports the libvirt SNMP subagent + for monitoring information provided by monitoring metrics + of virtualized guests, their attached block devices and + network interfaces such as performance statistics, domain + state, file system information, CPU pinning and CPU + utilization, disk errors. + + Version: 1.0 09/08/2017 + + Intel copyright information 2017" + REVISION + "201710061110Z" + DESCRIPTION + "Fixing types and units in MemoryTable" + ::= { hostAssist 6 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor Domain Statistics Table +------------------------------------------------------------------------------- + +lvhDomainTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhDomainTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Domain Stats Table." + ::= { libvirtHypervisor 1 } + +lvhDomainTableEntry OBJECT-TYPE + SYNTAX LvhDomainTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Domain Stats Table Entry." + INDEX { lvhDomainName } + ::= { lvhDomainTable 1 } + +LvhDomainTableEntry ::= SEQUENCE { + lvhDomainName DisplayString, + lvhDomainStateState INTEGER, + lvhDomainStateReason INTEGER, + lvhCPUTotalTimeUser Counter64, + lvhCPUTotalTimeSystem Counter64, + lvhVirtCPUTotal Integer32, + lvhMemoryTotal Integer32 +} + +lvhDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Textual string containing a VM name." + ::= { lvhDomainTableEntry 1 } + +lvhDomainStateState OBJECT-TYPE + SYNTAX INTEGER { + unknown(0), + running(1), + blocked(2), + paused(3), + shutdown(4), + shutoff(5), + crashed(6), + pmususpended(7) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "State of the VM, returned as number from virDomainState enum." + ::= { lvhDomainTableEntry 2 } + +lvhDomainStateReason OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Reason for entering given state, returned as int from + virDomain*Reason enum corresponding to given state." + ::= { lvhDomainTableEntry 3 } + +lvhCPUTotalTimeUser OBJECT-TYPE + SYNTAX Counter64 + UNITS "nanoseconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "User CPU time spent in nanoseconds." + ::= { lvhDomainTableEntry 4 } + +lvhCPUTotalTimeSystem OBJECT-TYPE + SYNTAX Counter64 + UNITS "nanoseconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "System CPU time spent in nanoseconds." + ::= { lvhDomainTableEntry 5 } + +lvhVirtCPUTotal OBJECT-TYPE + SYNTAX Integer32 + UNITS "percent" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "CPU utilization in percentage." + ::= { lvhDomainTableEntry 6 } + +lvhMemoryTotal OBJECT-TYPE + SYNTAX Integer32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Memory in bytes used by the domain." + ::= { lvhDomainTableEntry 7 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor Memory Statistics Table +------------------------------------------------------------------------------- + +lvhMemoryTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhMemoryTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Memory Table." + ::= { libvirtHypervisor 2 } + +lvhMemoryTableEntry OBJECT-TYPE + SYNTAX LvhMemoryTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Memory Table Entry." + INDEX { lvhMemoryDomainName } + ::= { lvhMemoryTable 1 } + +LvhMemoryTableEntry ::= SEQUENCE { + lvhMemoryDomainName DisplayString, + lvhMemorySwapIn Unsigned32, + lvhMemorySwapOut Unsigned32, + lvhMemoryMajorFault Unsigned32, + lvhMemoryMinorFault Unsigned32, + lvhMemoryUnused Unsigned32, + lvhMemoryAvailable Unsigned32, + lvhMemoryActualBalloon Unsigned32, + lvhMemoryRss Unsigned32, + lvhMemoryUsable Unsigned32, + lvhMemoryLastUpdate Counter64 +} + +lvhMemoryDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Textual string containing a VM name." + ::= { lvhMemoryTableEntry 1 } + +lvhMemorySwapIn OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Amount of data read from swap space." + ::= { lvhMemoryTableEntry 2 } + +lvhMemorySwapOut OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Amount of memory written out to swap space." + ::= { lvhMemoryTableEntry 3 } + +lvhMemoryMajorFault OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "in 24h (x1024)" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of page faults when disk IO was required." + ::= { lvhMemoryTableEntry 4 } + +lvhMemoryMinorFault OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "in 24h (x1024)" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Number of other page faults." + ::= { lvhMemoryTableEntry 5 } + +lvhMemoryUnused OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Amount of memory left unused by the system." + ::= { lvhMemoryTableEntry 6 } + +lvhMemoryAvailable OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Amount of usable memory as seen by the domain." + ::= { lvhMemoryTableEntry 7 } + +lvhMemoryActualBalloon OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Memory currently used." + ::= { lvhMemoryTableEntry 8 } + +lvhMemoryRss OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Resident Set Size of running domain's process." + ::= { lvhMemoryTableEntry 9 } + +lvhMemoryUsable OBJECT-TYPE + SYNTAX Unsigned32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Amount of memory which can be reclaimed by + balloon without causing host swapping." + ::= { lvhMemoryTableEntry 10 } + +lvhMemoryLastUpdate OBJECT-TYPE + SYNTAX Counter64 + UNITS "seconds (x1024)" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "Timestamp of the last update of statistics." + ::= { lvhMemoryTableEntry 11 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor Perf Statistics Table +------------------------------------------------------------------------------- + +lvhPerfTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhPerfTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Perf Table." + ::= { libvirtHypervisor 3 } + +lvhPerfTableEntry OBJECT-TYPE + SYNTAX LvhPerfTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Perf Table Entry." + INDEX { lvhPerfDomainName } + ::= { lvhPerfTable 1 } + +LvhPerfTableEntry ::= SEQUENCE { + lvhPerfDomainName DisplayString, + lvhPerfAlignmentFaults Integer32, + lvhPerfBranchInstructions Integer32, + lvhPerfBranchMisses Integer32, + lvhPerfBusCycles Integer32, + lvhPerfCacheMisses Integer32, + lvhPerfCacheReferences Integer32, + lvhPerfCmt Integer32, + lvhPerfContextSwitches Integer32, + lvhPerfCPUClock Counter64, + lvhPerfCPUCycles Counter64, + lvhPerfCPUMigrations Integer32, + lvhPerfEmulationFaults Integer32, + lvhPerfInstructions Integer32, + lvhPerfMbml Integer32, + lvhPerfMbmt Integer32, + lvhPerfPageFaults Integer32, + lvhPerfPageFaultsMaj Integer32, + lvhPerfPageFaultsMin Integer32, + lvhPerfRefCPUCycles Counter64, + lvhPerfTaskClock Counter64 +} + +lvhPerfDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a VM name." + ::= { lvhPerfTableEntry 1 } + +lvhPerfAlignmentFaults OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of alignment faults." + ::= { lvhPerfTableEntry 2 } + +lvhPerfBranchInstructions OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of branch instructions." + ::= { lvhPerfTableEntry 3 } + +lvhPerfBranchMisses OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of branch misses." + ::= { lvhPerfTableEntry 4 } + +lvhPerfBusCycles OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of bus cycles." + ::= { lvhPerfTableEntry 5 } + +lvhPerfCacheMisses OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of cache misses." + ::= { lvhPerfTableEntry 6 } + +lvhPerfCacheReferences OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of cache hits." + ::= { lvhPerfTableEntry 7 } + +lvhPerfCmt OBJECT-TYPE + SYNTAX Integer32 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Cache usage in bytes." + ::= { lvhPerfTableEntry 8 } + +lvhPerfContextSwitches OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of context switches." + ::= { lvhPerfTableEntry 9 } + +lvhPerfCPUClock OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of CPU clock time." + ::= { lvhPerfTableEntry 10 } + +lvhPerfCPUCycles OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of CPU cycles (total/elapsed)." + ::= { lvhPerfTableEntry 11 } + +lvhPerfCPUMigrations OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of CPU migrations." + ::= { lvhPerfTableEntry 12 } + +lvhPerfEmulationFaults OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of emulation faults." + ::= { lvhPerfTableEntry 13 } + +lvhPerfInstructions OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of instructions." + ::= { lvhPerfTableEntry 14 } + +lvhPerfMbml OBJECT-TYPE + SYNTAX Integer32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Traffic bandwidth for a memory controller." + ::= { lvhPerfTableEntry 15 } + +lvhPerfMbmt OBJECT-TYPE + SYNTAX Integer32 + UNITS "bytes/s" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Total system bandwidth from one cache level." + ::= { lvhPerfTableEntry 16 } + +lvhPerfPageFaults OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of page faults." + ::= { lvhPerfTableEntry 17 } + +lvhPerfPageFaultsMaj OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of major page faults." + ::= { lvhPerfTableEntry 18 } + +lvhPerfPageFaultsMin OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of minor page faults." + ::= { lvhPerfTableEntry 19 } + +lvhPerfRefCPUCycles OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The count of ref CPU cycles." + ::= { lvhPerfTableEntry 20 } + +lvhPerfTaskClock OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Count of task clock time." + ::= { lvhPerfTableEntry 21 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor CPUAffinity Table +------------------------------------------------------------------------------- + +lvhCPUAffinityTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhCPUAffinityTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the CPUAffinity Table Entry." + ::= { libvirtHypervisor 4 } + +lvhCPUAffinityTableEntry OBJECT-TYPE + SYNTAX LvhCPUAffinityTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Libvirt Hypervisor CPU Affinity Table Entry." + INDEX { lvhAffinityDomainName, lvhCPUIndex, lvhVCPUIndex } + ::= { lvhCPUAffinityTable 1 } + +LvhCPUAffinityTableEntry ::= SEQUENCE { + lvhAffinityDomainName DisplayString, + lvhCPUIndex Integer32, + lvhVCPUIndex Integer32, + lvhCPUAffinity Integer32 +} + +lvhAffinityDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing the VM name." + ::= { lvhCPUAffinityTableEntry 1 } + +lvhCPUIndex OBJECT-TYPE + SYNTAX Integer32 (0..999) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "CPU index." + ::= { lvhCPUAffinityTableEntry 2 } + +lvhVCPUIndex OBJECT-TYPE + SYNTAX Integer32 (0..999) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Virtual CPU index." + ::= { lvhCPUAffinityTableEntry 3 } + +lvhCPUAffinity OBJECT-TYPE + SYNTAX Integer32 (0..1) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Pinning of domain VCPU to host physical CPU." + ::= { lvhCPUAffinityTableEntry 4 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor VCPU Table +------------------------------------------------------------------------------- + +lvhVirtVCPUTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhVirtVCPUTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the VirtVCPU Table Entry." + ::= { libvirtHypervisor 5 } + +lvhVirtVCPUTableEntry OBJECT-TYPE + SYNTAX LvhVirtVCPUTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Libvirt Hypervisor VirtVCPU Table Entry." + INDEX { lvhVCPUDomainName, lvhVCPUVCPUIndex } + ::= { lvhVirtVCPUTable 1 } + +LvhVirtVCPUTableEntry ::= SEQUENCE { + lvhVCPUDomainName DisplayString, + lvhVCPUVCPUIndex Integer32, + lvhVirtVCPU Counter64 +} + +lvhVCPUDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing the VM name." + ::= { lvhVirtVCPUTableEntry 1 } + +lvhVCPUVCPUIndex OBJECT-TYPE + SYNTAX Integer32 (0..999) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Virtual CPU index." + ::= { lvhVirtVCPUTableEntry 2 } + +lvhVirtVCPU OBJECT-TYPE + SYNTAX Counter64 + UNITS "nanoseconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Time spent by virtual CPU." + ::= { lvhVirtVCPUTableEntry 3 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor DiskError Table +------------------------------------------------------------------------------- + +lvhDiskErrorTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhDiskErrorTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Libvirt Hypervisor DiskError Table." + ::= { libvirtHypervisor 6 } + +lvhDiskErrorTableEntry OBJECT-TYPE + SYNTAX LvhDiskErrorTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Libvirt Hypervisor DiskEror Table Entry." + INDEX { lvhDiskDomainName, lvhDiskName } + ::= { lvhDiskErrorTable 1 } + +LvhDiskErrorTableEntry ::= SEQUENCE { + lvhDiskDomainName DisplayString, + lvhDiskName DisplayString, + lvhDiskError INTEGER +} + +lvhDiskDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a VM name." + ::= { lvhDiskErrorTableEntry 1 } + +lvhDiskName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..20)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a disk name." + ::= { lvhDiskErrorTableEntry 2 } + +lvhDiskError OBJECT-TYPE + SYNTAX INTEGER { + none(0), + unspec(1), + nospace(2) + } + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Disk error code." + ::= { lvhDiskErrorTableEntry 3 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor Block Device Statistics Table +------------------------------------------------------------------------------- + +lvhBlockDeviceTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhBlockDeviceTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Block Device Table." + ::= { libvirtHypervisor 7 } + +lvhBlockDeviceTableEntry OBJECT-TYPE + SYNTAX LvhBlockDeviceTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Block Device Table Entry." + INDEX { lvhBlockDomainName, lvhBlockDeviceName } + ::= { lvhBlockDeviceTable 1 } + +LvhBlockDeviceTableEntry ::= SEQUENCE { + lvhBlockDomainName DisplayString, + lvhBlockDeviceName DisplayString, + lvhDiskOpsRead Integer32, + lvhDiskOpsWrite Integer32, + lvhDiskOctetsRead Integer32, + lvhDiskOctetsWrite Integer32, + lvhDiskTimeCacheRead Counter64, + lvhDiskTimeCacheWrite Counter64 +} + +lvhBlockDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a VM name." + ::= { lvhBlockDeviceTableEntry 1 } + +lvhBlockDeviceName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..20)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a block device name." + ::= { lvhBlockDeviceTableEntry 2 } + +lvhDiskOpsRead OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of read requests." + ::= { lvhBlockDeviceTableEntry 3 } + +lvhDiskOpsWrite OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of write requests." + ::= { lvhBlockDeviceTableEntry 4 } + +lvhDiskOctetsRead OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of read bytes." + ::= { lvhBlockDeviceTableEntry 5 } + +lvhDiskOctetsWrite OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of write bytes." + ::= { lvhBlockDeviceTableEntry 6 } + +lvhDiskTimeCacheRead OBJECT-TYPE + SYNTAX Counter64 + UNITS "nanoseconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Total time spent on cache reads." + ::= { lvhBlockDeviceTableEntry 7 } + +lvhDiskTimeCacheWrite OBJECT-TYPE + SYNTAX Counter64 + UNITS "nanoseconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Total times spent on cache writes." + ::= { lvhBlockDeviceTableEntry 8 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor Block Device Flush Statistics Table +------------------------------------------------------------------------------- + +lvhBlockDevFlushTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhBlockDevFlushTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Block Device Table." + ::= { libvirtHypervisor 8 } + +lvhBlockDevFlushTableEntry OBJECT-TYPE + SYNTAX LvhBlockDevFlushTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Block Device Table Entry." + INDEX { lvhBlockDevFlushDomainName, lvhBlockDevFlushDeviceName } + ::= { lvhBlockDevFlushTable 1 } + +LvhBlockDevFlushTableEntry ::= SEQUENCE { + lvhBlockDevFlushDomainName DisplayString, + lvhBlockDevFlushDeviceName DisplayString, + lvhTotalRequestsFlush Integer32, + lvhTotalTimeInMsFlush Integer32 +} + +lvhBlockDevFlushDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a VM name." + ::= { lvhBlockDevFlushTableEntry 1 } + +lvhBlockDevFlushDeviceName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..20)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a block device name." + ::= { lvhBlockDevFlushTableEntry 2 } + +lvhTotalRequestsFlush OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Total number of flush requests." + ::= { lvhBlockDevFlushTableEntry 3 } + +lvhTotalTimeInMsFlush OBJECT-TYPE + SYNTAX Integer32 + UNITS "milliseconds" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "The total time spent on cache flushing." + ::= { lvhBlockDevFlushTableEntry 4 } + +------------------------------------------------------------------------------- +-- Libvirt Hypervisor Network Interface Statistics Table +------------------------------------------------------------------------------- + +lvhNetworkIfaceTable OBJECT-TYPE + SYNTAX SEQUENCE OF LvhNetworkIfaceTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Libvirt Hypervisor Network Interface + Table." + ::= { libvirtHypervisor 9 } + +lvhNetworkIfaceTableEntry OBJECT-TYPE + SYNTAX LvhNetworkIfaceTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Libvirt Hypervisor Network Interface Table Entry." + INDEX { lvhNetIfDomainName, lvhInterfaceName } + ::= { lvhNetworkIfaceTable 1 } + +LvhNetworkIfaceTableEntry ::= SEQUENCE { + lvhNetIfDomainName DisplayString, + lvhInterfaceName DisplayString, + lvhIfBytesReceived Counter64, + lvhIfBytesTransmitted Counter64, + lvhIfPacketsReceived Counter64, + lvhIfPacketsTransmitted Counter64, + lvhIfErrorsReceive Counter64, + lvhIfErrorsTransmission Counter64, + lvhIfDroppedReceive Counter64, + lvhIfDroppedTransmit Counter64 +} + +lvhNetIfDomainName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..50)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a VM name." + ::= { lvhNetworkIfaceTableEntry 1 } + +lvhInterfaceName OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..20)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Textual string containing a network interface name." + ::= { lvhNetworkIfaceTableEntry 2 } + +lvhIfBytesReceived OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of bytes received." + ::= { lvhNetworkIfaceTableEntry 3 } + +lvhIfBytesTransmitted OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of bytes transmitted." + ::= { lvhNetworkIfaceTableEntry 4 } + +lvhIfPacketsReceived OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of packets received." + ::= { lvhNetworkIfaceTableEntry 5 } + +lvhIfPacketsTransmitted OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of packets transmitted." + ::= { lvhNetworkIfaceTableEntry 6 } + +lvhIfErrorsReceive OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of receive errors." + ::= { lvhNetworkIfaceTableEntry 7 } + +lvhIfErrorsTransmission OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of transmission errors." + ::= { lvhNetworkIfaceTableEntry 8 } + +lvhIfDroppedReceive OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of receive packets dropped." + ::= { lvhNetworkIfaceTableEntry 9 } + +lvhIfDroppedTransmit OBJECT-TYPE + SYNTAX Counter64 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Number of transmit packets dropped." + ::= { lvhNetworkIfaceTableEntry 10 } + +END diff --git a/src/collectd/Makefile b/src/collectd/Makefile index 670c14fa..13121700 100644 --- a/src/collectd/Makefile +++ b/src/collectd/Makefile @@ -39,6 +39,11 @@ ifeq ($(XDG_CACHE_HOME_DIR),) XDG_CACHE_HOME_DIR = $(shell echo $$HOME) endif +SAMPLE_CONF_VARIANT_NAME = collectd_sample_configs +ifdef COLLECTD_USE_MASTER +SAMPLE_CONF_VARIANT_NAME = collectd_sample_configs-master +endif + CONFIG_CMD += --enable-syslog CONFIG_CMD += --enable-logfile CONFIG_CMD += --with-libpqos=$(LIBPQOS_DIR) @@ -82,7 +87,9 @@ ifndef DOCKER endif $(AT)sudo ./ovs_pmd_stats_config.sh $(AT)sudo ./snmp_mib_config.sh - $(AT)sudo ./include_config.sh + + @echo "Using sample configs: $(SAMPLE_CONF_VARIANT_NAME)" + $(AT)sudo ./include_config.sh $(SAMPLE_CONF_VARIANT_NAME) @echo "Make install done" install: force_install @@ -118,6 +125,7 @@ $(WORK_DIR): $(AT)git clone $(COLLECTD_URL) $(TAG_DONE_FLAG): $(WORK_DIR) + @echo "Checking out collectd from tag: $(COLLECTD_TAG)" $(AT)cd collectd; git checkout $(COLLECTD_TAG) ifneq ($(PATCH_FILE),) $(AT)cd $(WORK_DIR); patch -p1 < ../$(PATCH_FILE) diff --git a/src/collectd/collectd_sample_configs-master/csv.conf b/src/collectd/collectd_sample_configs-master/csv.conf new file mode 100644 index 00000000..99a8498d --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/csv.conf @@ -0,0 +1,19 @@ +# Copyright 2017 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 csv + + DataDir "/tmp/collectd/csv" + StoreRates false + diff --git a/src/collectd/collectd_sample_configs-master/default_plugins.conf b/src/collectd/collectd_sample_configs-master/default_plugins.conf new file mode 100644 index 00000000..c96b0076 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/default_plugins.conf @@ -0,0 +1,31 @@ +# Copyright 2017 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. +#Hostname "" + +LoadPlugin cpufreq +LoadPlugin disk +LoadPlugin ethstat +LoadPlugin ipc +LoadPlugin ipmi +LoadPlugin load +LoadPlugin memory +LoadPlugin numa +LoadPlugin processes +LoadPlugin df +LoadPlugin turbostat +LoadPlugin uptime +LoadPlugin contextswitch +LoadPlugin irq +LoadPlugin df +LoadPlugin swap diff --git a/src/collectd/collectd_sample_configs-master/dpdkevents.conf b/src/collectd/collectd_sample_configs-master/dpdkevents.conf new file mode 100644 index 00000000..fdb6f3db --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/dpdkevents.conf @@ -0,0 +1,35 @@ +# Copyright 2017 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. + + Interval 1 + + + + +# Coremask "0x1" +# MemoryChannels "4" +# FilePrefix "rte" + + + SendEventsOnUpdate false + EnabledPortMask 0xffff + SendNotification true + + + SendEventsOnUpdate false + LCoreMask "0xf" + KeepAliveShmName "/dpdk_keepalive_shm_name" + SendNotification true + + diff --git a/src/collectd/collectd_sample_configs-master/dpdkstat.conf b/src/collectd/collectd_sample_configs-master/dpdkstat.conf new file mode 100644 index 00000000..59906d4e --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/dpdkstat.conf @@ -0,0 +1,23 @@ +# Copyright 2017 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 dpdkstat + + +# Coremask "0xf" +# ProcessType "secondary" +# FilePrefix "rte" + EnabledPortMask 0xffff +# PortName "interface1" +# PortName "interface2" + diff --git a/src/collectd/collectd_sample_configs-master/exec.conf b/src/collectd/collectd_sample_configs-master/exec.conf new file mode 100644 index 00000000..0a291bdb --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/exec.conf @@ -0,0 +1,20 @@ +# Copyright 2017 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 exec + + + # For OVS PMD stats plugin + Exec "collectd_exec" "/opt/collectd/etc/collectd.conf.d/ovs_pmd_stats.sh" + NotificationExec "collectd_exec" "/opt/collectd/etc/collectd.conf.d/write_notification.sh" + diff --git a/src/collectd/collectd_sample_configs-master/hugepages.conf b/src/collectd/collectd_sample_configs-master/hugepages.conf new file mode 100644 index 00000000..97cd2d17 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/hugepages.conf @@ -0,0 +1,22 @@ +# Copyright 2017 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 hugepages + + + ReportPerNodeHP true + ReportRootHP true + ValuesPages true + ValuesBytes false + ValuesPercentage false + diff --git a/src/collectd/collectd_sample_configs-master/intel_pmu.conf b/src/collectd/collectd_sample_configs-master/intel_pmu.conf new file mode 100644 index 00000000..959fb8a1 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/intel_pmu.conf @@ -0,0 +1,23 @@ +# Copyright 2017 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 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]" + diff --git a/src/collectd/collectd_sample_configs-master/kafka.conf b/src/collectd/collectd_sample_configs-master/kafka.conf new file mode 100644 index 00000000..f81e87fd --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/kafka.conf @@ -0,0 +1,21 @@ +# Copyright 2017 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 write_kafka + + + Property "metadata.broker.list" "localhost:9092" + + Format JSON + + diff --git a/src/collectd/collectd_sample_configs-master/mcelog.conf b/src/collectd/collectd_sample_configs-master/mcelog.conf new file mode 100644 index 00000000..633a3bcd --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/mcelog.conf @@ -0,0 +1,24 @@ +# Copyright 2017 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. + + Interval 1 + + + + + McelogClientSocket "/var/run/mcelog-client" + PersistentNotification false + +## McelogLogfile "/var/log/mcelog" + diff --git a/src/collectd/collectd_sample_configs-master/network.conf b/src/collectd/collectd_sample_configs-master/network.conf new file mode 100644 index 00000000..4309ed86 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/network.conf @@ -0,0 +1,18 @@ +# Copyright 2017 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 network + + Server "127.0.0.1" "25826" + diff --git a/src/collectd/collectd_sample_configs-master/ovs_events.conf b/src/collectd/collectd_sample_configs-master/ovs_events.conf new file mode 100644 index 00000000..250e1e43 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/ovs_events.conf @@ -0,0 +1,24 @@ +# Copyright 2017 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. + + Interval 1 + + + +# Port "6640" +# Address "127.0.0.1" +# Socket "/var/run/openvswitch/db.sock" +# Interfaces "br0" "veth0" + SendNotification true + diff --git a/src/collectd/collectd_sample_configs-master/ovs_pmd_stats.sh b/src/collectd/collectd_sample_configs-master/ovs_pmd_stats.sh new file mode 100755 index 00000000..0517717f --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/ovs_pmd_stats.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# Copyright 2017 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. +sudo python /usr/local/src/ovs_pmd_stats.py --socket-pid-file /var/run/openvswitch/ovs-vswitchd.pid diff --git a/src/collectd/collectd_sample_configs-master/ovs_stats.conf b/src/collectd/collectd_sample_configs-master/ovs_stats.conf new file mode 100644 index 00000000..2a6d2fb2 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/ovs_stats.conf @@ -0,0 +1,23 @@ +# Copyright 2017 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 + + + Interval 1 + + +# Port "6640" +# Address "127.0.0.1" +# Socket "/var/run/openvswitch/db.sock" +# Bridges "br0" + diff --git a/src/collectd/collectd_sample_configs-master/rdt.conf b/src/collectd/collectd_sample_configs-master/rdt.conf new file mode 100644 index 00000000..ae983dc0 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/rdt.conf @@ -0,0 +1,20 @@ +# Copyright 2017 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. + + Interval 1 + + + + Cores "" + diff --git a/src/collectd/collectd_sample_configs-master/snmp_agent.conf b/src/collectd/collectd_sample_configs-master/snmp_agent.conf new file mode 100644 index 00000000..7cbde816 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/snmp_agent.conf @@ -0,0 +1,785 @@ +# Copyright 2017 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 + +# Intel PMU MIB + + IndexOID "INTEL-PMU-MIB::pmuGroupIndex" + + + Source "PluginInstance" + + Plugin "intel_pmu" + OIDs "INTEL-PMU-MIB::pmuGroupDescr" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-dcache-loads" + OIDs "INTEL-PMU-MIB::pmuL1DCacheLoads" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-dcache-load-misses" + OIDs "INTEL-PMU-MIB::pmuL1DCacheLoadMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-dcache-stores" + OIDs "INTEL-PMU-MIB::pmuL1DCacheStores" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-dcache-store-misses" + OIDs "INTEL-PMU-MIB::pmuL1DCacheStoreMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-dcache-prefetches" + OIDs "INTEL-PMU-MIB::pmuL1DCachePrefetches" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-dcache-prefetch-misses" + OIDs "INTEL-PMU-MIB::pmuL1DCachePrefetchMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-icache-loads" + OIDs "INTEL-PMU-MIB::pmuL1ICacheLoads" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-icache-load-misses" + OIDs "INTEL-PMU-MIB::pmuL1ICacheLoadMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-icache-prefetches" + OIDs "INTEL-PMU-MIB::pmuL1ICachePrefetches" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "L1-icache-prefetch-misses" + OIDs "INTEL-PMU-MIB::pmuL1ICachePrefetchMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "LLC-loads" + OIDs "INTEL-PMU-MIB::pmuLLCLoads" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "LLC-load-misses" + OIDs "INTEL-PMU-MIB::pmuLLCLoadMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "LLC-stores" + OIDs "INTEL-PMU-MIB::pmuLLCStores" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "LLC-store-misses" + OIDs "INTEL-PMU-MIB::pmuLLCStoreMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "LLC-prefetches" + OIDs "INTEL-PMU-MIB::pmuLLCPrefetches" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "LLC-prefetch-misses" + OIDs "INTEL-PMU-MIB::pmuLLCPrefetchMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "dTLB-loads" + OIDs "INTEL-PMU-MIB::pmuDTLBLoads" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "dTLB-load-misses" + OIDs "INTEL-PMU-MIB::pmuDTLBLoadMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "dTLB-stores" + OIDs "INTEL-PMU-MIB::pmuDTLBStores" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "dTLB-store-misses" + OIDs "INTEL-PMU-MIB::pmuDTLBStoreMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "dTLB-prefetches" + OIDs "INTEL-PMU-MIB::pmuDTLBPrefetches" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "dTLB-prefetch-misses" + OIDs "INTEL-PMU-MIB::pmuDTLBPrefetchMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "iTLB-loads" + OIDs "INTEL-PMU-MIB::pmuITLBLoads" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "iTLB-load-misses" + OIDs "INTEL-PMU-MIB::pmuITLBLoadMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "branch-loads" + OIDs "INTEL-PMU-MIB::pmuBranchLoads" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "branch-load-misses" + OIDs "INTEL-PMU-MIB::pmuBranchLoadMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "cpu-cycles" + OIDs "INTEL-PMU-MIB::pmuCpuCycles" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "instructions" + OIDs "INTEL-PMU-MIB::pmuInstructions" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "cache-references" + OIDs "INTEL-PMU-MIB::pmuCacheReferences" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "cache-misses" + OIDs "INTEL-PMU-MIB::pmuCacheMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "branches" + OIDs "INTEL-PMU-MIB::pmuBranches" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "branch-misses" + OIDs "INTEL-PMU-MIB::pmuBranchMisses" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "bus-cycles" + OIDs "INTEL-PMU-MIB::pmuBusCycles" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "cpu-clock" + OIDs "INTEL-PMU-MIB::pmuCpuClock" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "task-clock" + OIDs "INTEL-PMU-MIB::pmuTaskClock" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "context-switches" + OIDs "INTEL-PMU-MIB::pmuContextSwitches" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "cpu-migrations" + OIDs "INTEL-PMU-MIB::pmuCpuMigrations" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "page-faults" + OIDs "INTEL-PMU-MIB::pmuPageFaults" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "minor-faults" + OIDs "INTEL-PMU-MIB::pmuMinorFaults" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "major-faults" + OIDs "INTEL-PMU-MIB::pmuMajorFaults" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "alignment-faults" + OIDs "INTEL-PMU-MIB::pmuAlignmentFaults" + + + Plugin "intel_pmu" + Type "counter" + TypeInstance "emulation-faults" + OIDs "INTEL-PMU-MIB::pmuEmulationFaults" + +
+# Intel RDT MIB + + IndexOID "INTEL-RDT-MIB::rdtGroupIndex" + SizeOID "INTEL-RDT-MIB::rdtGroupNumber" + + + Source "PluginInstance" + + Plugin "intel_rdt" + OIDs "INTEL-RDT-MIB::rdtGroupDescr" + + + Plugin "intel_rdt" + Type "bytes" + TypeInstance "llc" + OIDs "INTEL-RDT-MIB::rdtLlc" + + + Plugin "intel_rdt" + Type "ipc" + OIDs "INTEL-RDT-MIB::rdtIpc" + + + Plugin "intel_rdt" + Type "memory_bandwidth" + TypeInstance "remote" + OIDs "INTEL-RDT-MIB::rdtMbmRemote" + + + Plugin "intel_rdt" + Type "memory_bandwidth" + TypeInstance "local" + OIDs "INTEL-RDT-MIB::rdtMbmLocal" + +
+# Intel Mcelog MIB + + IndexOID "INTEL-MCELOG-MIB::memoryGroupIndex" + + + Source "PluginInstance" + + Plugin "mcelog" + OIDs "INTEL-MCELOG-MIB::memoryGroupDescr" + + + Plugin "mcelog" + Type "errors" + TypeInstance "corrected_memory_errors" + OIDs "INTEL-MCELOG-MIB::memoryCorrectedErrors" + + + Plugin "mcelog" + Type "errors" + TypeInstance "corrected_memory_errors_in_24h" + OIDs "INTEL-MCELOG-MIB::memoryCorrectedTimedErrors" + + + Plugin "mcelog" + Type "errors" + TypeInstance "uncorrected_memory_errors" + OIDs "INTEL-MCELOG-MIB::memoryUncorrectedErrors" + + + Plugin "mcelog" + Type "errors" + TypeInstance "uncorrected_memory_errors_in_24h" + OIDs "INTEL-MCELOG-MIB::memoryUncorrectedTimedErrors" + +
+# Hugepages + + + + Source "PluginInstance" + + Plugin "hugepages" + OIDs "INTEL-HUGEPAGES-MIB::hugepagesNode" + + + Plugin "hugepages" + Type "memory" + TypeInstance "free" + OIDs "INTEL-HUGEPAGES-MIB::hugepagesMemoryFree" + + + Plugin "hugepages" + Type "memory" + TypeInstance "used" + OIDs "INTEL-HUGEPAGES-MIB::hugepagesMemoryUsed" + + + Plugin "hugepages" + Type "vmpage_number" + TypeInstance "free" + OIDs "INTEL-HUGEPAGES-MIB::hugepagesPagesFree" + + + Plugin "hugepages" + Type "vmpage_number" + TypeInstance "used" + OIDs "INTEL-HUGEPAGES-MIB::hugepagesPagesUsed" + + + Plugin "hugepages" + Type "percent" + TypeInstance "free" + OIDs "INTEL-HUGEPAGES-MIB::hugepagesPercentFree" + + + Plugin "hugepages" + Type "percent" + TypeInstance "used" + OIDs "INTEL-HUGEPAGES-MIB::hugepagesPercentUsed" + +
+ # Libvirt MIB + + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhDomainName" + + + Plugin "virt" + Type "ps_cputime" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhCPUTotalTimeUser" "LIBVIRT-HYPERVISOR-MIB::lvhCPUTotalTimeSystem" + + + Plugin "virt" + Type "percent" + TypeInstance "virt_cpu_total" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhVirtCPUTotal" + + + Plugin "virt" + Type "memory" + TypeInstance "total" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryTotal" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryDomainName" + + + Plugin "virt" + Type "memory" + TypeInstance "swap_in" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemorySwapIn" + + + Plugin "virt" + Type "memory" + TypeInstance "swap_out" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemorySwapOut" + + + Plugin "virt" + Type "memory" + TypeInstance "major_fault" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryMajorFault" + + + Plugin "virt" + Type "memory" + TypeInstance "minor_fault" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryMinorFault" + + + Plugin "virt" + Type "memory" + TypeInstance "unused" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryUnused" + + + Plugin "virt" + Type "memory" + TypeInstance "available" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryAvailable" + + + Plugin "virt" + Type "memory" + TypeInstance "actual_balloon" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryActualBalloon" + + + Plugin "virt" + Type "memory" + TypeInstance "rss" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryRss" + + + Plugin "virt" + Type "memory" + TypeInstance "last_update" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhMemoryLastUpdate" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfDomainName" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_alignment_faults" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfAlignmentFaults" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_branch_instructions" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfBranchInstructions" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_branch_misses" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfBranchMisses" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_bus_cycles" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfBusCycles" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_cache_misses" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfCacheMisses" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_cache_references" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfCacheReferences" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_cmt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfCmt" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_context_switches" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfContextSwitches" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_cpu_clock" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfCPUClock" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_cpu_cycles" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfCPUCycles" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_cpu_migrations" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfCPUMigrations" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_emulation_faults" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfEmulationFaults" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_instructions" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfInstructions" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_mbml" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfMbml" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_mbmt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfMbmt" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_page_faults" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfPageFaults" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_page_faults_maj" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfPageFaultsMaj" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_page_faults_min" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfPageFaultsMin" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_ref_cpu_cycles" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfRefCPUCycles" + + + Plugin "virt" + Type "perf" + TypeInstance "perf_task_clock" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhPerfTaskClock" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhAffinityDomainName" + + + Plugin "virt" + + Source "TypeInstance" + Regex "^vcpu_([0-9]{1,3})-cpu_[0-9]{1,3}$" + Group 1 + + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhVCPUIndex" + + + Plugin "virt" + + Source "TypeInstance" + Regex "^vcpu_[0-9]{1,3}-cpu_([0-9]{1,3})$" + Group 1 + + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhCPUIndex" + + + Plugin "virt" + Type "cpu_affinity" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhCPUAffinity" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhVCPUDomainName" + + + + Source "TypeInstance" + Regex "^([0-9]{1,3})$" + Group 1 + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhVCPUVCPUIndex" + + + Plugin "virt" + Type "virt_vcpu" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhVirtVCPU" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhDiskDomainName" + + + + Source "TypeInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhDiskName" + + + Plugin "virt" + Type "disk_error" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhDiskError" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhBlockDomainName" + + + + Source "TypeInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhBlockDeviceName" + + + Plugin "virt" + Type "disk_ops" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhDiskOpsRead" "LIBVIRT-HYPERVISOR-MIB::lvhDiskOpsWrite" + + + Plugin "virt" + Type "disk_octets" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhDiskOctetsRead" "LIBVIRT-HYPERVISOR-MIB::lvhDiskOctetsWrite" + + + Plugin "virt" + Type "disk_time" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhDiskTimeCacheRead" "LIBVIRT-HYPERVISOR-MIB::lvhDiskTimeCacheWrite" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhBlockDevFlushDomainName" + + + + Source "TypeInstance" + Regex "^flush-(.*)$" + Group 1 + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhBlockDevFlushDeviceName" + + + Plugin "virt" + Type "total_requests" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhTotalRequestsFlush" + + + Plugin "virt" + Type "total_time_in_ms" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhTotalTimeInMsFlush" + +
+ + + + Source "PluginInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhNetIfDomainName" + + + + Source "TypeInstance" + + Plugin "virt" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhInterfaceName" + + + Plugin "virt" + Type "if_octets" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhIfBytesReceived" "LIBVIRT-HYPERVISOR-MIB::lvhIfBytesTransmitted" + + + Plugin "virt" + Type "if_packets" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhIfPacketsReceived" "LIBVIRT-HYPERVISOR-MIB::lvhIfPacketsTransmitted" + + + Plugin "virt" + Type "if_errors" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhIfErrorsReceive" "LIBVIRT-HYPERVISOR-MIB::lvhIfErrorsTransmission" + + + Plugin "virt" + Type "if_dropped" + OIDs "LIBVIRT-HYPERVISOR-MIB::lvhIfDroppedReceive" "LIBVIRT-HYPERVISOR-MIB::lvhIfDroppedTransmit" + +
+
diff --git a/src/collectd/collectd_sample_configs-master/virt.conf b/src/collectd/collectd_sample_configs-master/virt.conf new file mode 100644 index 00000000..88229e3c --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/virt.conf @@ -0,0 +1,30 @@ +# Copyright 2017 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 virt + +# Connection "xen:///" + RefreshInterval 60 +# Domain "name" +# BlockDevice "name:device" +# BlockDeviceFormat target +# BlockDeviceFormatBasename false +# InterfaceDevice "name:device" +# IgnoreSelected false +# HostnameFormat name +# InterfaceFormat name +# PluginInstanceFormat name +# Instances 1 + ExtraStats "cpu_util disk disk_err domain_state fs_info job_stats_background pcpu perf vcpupin" + diff --git a/src/collectd/collectd_sample_configs-master/write_notification.sh b/src/collectd/collectd_sample_configs-master/write_notification.sh new file mode 100755 index 00000000..ed6ed9e2 --- /dev/null +++ b/src/collectd/collectd_sample_configs-master/write_notification.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# Copyright 2017 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. +rm -f /tmp/notifications +while read x y +do + echo $x$y >> /tmp/notifications +done diff --git a/src/collectd/include_config.sh b/src/collectd/include_config.sh index dd20893d..4f91a453 100755 --- a/src/collectd/include_config.sh +++ b/src/collectd/include_config.sh @@ -13,12 +13,31 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Config file options are changing between releases so we have to store both +# configurations variants and choose correct one for target collectd version + +if [ -z "$1" ]; then + echo "Error! Please sample configs variant name as a param!"\ + "(name of directory with sample-configs)" + echo "Usage:" + echo "$0 SAMPLE_CONFIGS_VARIANT_NAME" + echo "e.g. $0 'collectd_sample_configs'" + exit 1 +fi + +SAMPLE_CONF_VARIANT="$1" COLLECTD_CONF_FILE=/opt/collectd/etc/collectd.conf COLLECTD_CONF_DIR=/opt/collectd/etc/collectd.conf.d INCLUDE_CONF="" CURR_DIR=`pwd` HOSTNAME=`hostname` -SAMPLE_CONF_DIR=$CURR_DIR/collectd_sample_configs/* +SAMPLE_CONF_DIR=$CURR_DIR/$SAMPLE_CONF_VARIANT + +if [ ! -d "$SAMPLE_CONF_DIR" ]; then + echo "$SAMPLE_CONF_DIR does not exits!"\ + "Probably passed bad variant name as a param: $SAMPLE_CONF_VARIANT" + exit 1 +fi function write_include { echo "Hostname \"$HOSTNAME\"" | sudo tee -a $COLLECTD_CONF_FILE; @@ -31,7 +50,8 @@ grep -qe '' $COLLECTD_CONF_FILE; [ `mkdir -p $COLLECTD_CONF_DIR` -for F in $SAMPLE_CONF_DIR; do +SAMPLE_CONF_FILES=$SAMPLE_CONF_DIR/* +for F in $SAMPLE_CONF_FILES; do FILE=$(basename $F) [ -f $COLLECTD_CONF_DIR/$FILE ] && echo "File $COLLECTD_CONF_DIR/$FILE exists" || cp $F $COLLECTD_CONF_DIR done diff --git a/src/package-list.mk b/src/package-list.mk index 975a79e8..b58e092a 100644 --- a/src/package-list.mk +++ b/src/package-list.mk @@ -19,7 +19,14 @@ KAFKA_TAG ?= v0.9.5 # collectd section COLLECTD_URL ?= https://github.com/collectd/collectd -COLLECTD_TAG ?= collectd-5.8 +# there are 2 collectd flavors: +# -"collectd" - based on stable collect release +# -"collectd-master" - development version, based on master branch +ifdef COLLECTD_USE_MASTER + COLLECTD_TAG ?= master +else + COLLECTD_TAG ?= collectd-5.8 +endif COLLECTD_OPENSTACK_URL ?= https://github.com/openstack/collectd-openstack-plugins COLLECTD_OPENSTACK_TAG ?= stable/pike -- cgit 1.2.3-korg