diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..486a232 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.zip filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..723ef36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/DEPENDENCIES_SOURCE_CODE_INFO.md b/DEPENDENCIES_SOURCE_CODE_INFO.md new file mode 100644 index 0000000..6490f6a --- /dev/null +++ b/DEPENDENCIES_SOURCE_CODE_INFO.md @@ -0,0 +1,3 @@ +# information on source code of dependencies + +Source code for the components released under GPL license and used in this image can be found in the project's repository: [https://github.com/intel/observability-collectd/tree/main/snapshots](https://github.com/intel/observability-collectd/tree/main/snapshots) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..082ff4a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 Intel Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb80c3c --- /dev/null +++ b/README.md @@ -0,0 +1,337 @@ +# observability-collectd + +**Observability collectd** is a containerized version of [Collectd](https://github.com/collectd/collectd). +The goal is to produce minimal size docker image based on Alpine linux that has most of collectd available plugins. + +## Minimum requirements +- [Linux kernel](https://en.wikipedia.org/wiki/Linux_kernel) version 3.13 or later. +- Docker version 20.10.6 +## Pre-configuration +Supported plugins [enabled by default](#enabled-by-default-plugins) does not require any additional configuration and run immediately after the start of the container. +By default no additional configuration is required. + +To get metrics metrics from plugins [disabled by default](#disabled-by-default-plugins) or [unsupported](#unsupported-plugins) user should provide appropriate configuration and install required dependencies on host machine. For more information on required configuration for these plugins please follow [collectd wiki](https://collectd.org/wiki/index.php/Table_of_Plugins) pages. User should remember to uncomment required configuration files located in `src/collectd/sample_configs-stable`, `src/collectd/sample_configs-latest` (depending on chosen `--flavor`) or custom location (if `--config_path` is provided) **before** container creation and also to deliver own configuration files for [unsupported plugins](#unsupported-plugins). + +--- +## Installation + +1. Install Docker 20.10.6. or newer. [Docker installation guide](https://docs.docker.com/engine/install/) +1. Clone **Observability-collectd** repository +2. `cd observability-collectd` +3. Execute `./collectd_intel_docker.sh build-run ` command to build and run Docker container in default [stable flavor](#optional-config-flags) +4. Execute `./collectd_intel_docker.sh logs ` to watch logs +5. Browse files in `/tmp/collectd/` on host to see provided metrics + +**Observability-collectd** is prepared to run single instance of image. It is not recommended to start more than one container in parallel. + +--- +## How to use it + +- See **available options** with: + +` +./collectd_intel_docker.sh +` + +- **Build and run** observability-collectd container: + +` +./collectd_intel_docker.sh build-run +` + +- **Build** observability-collectd image: + +` +./collectd_intel_docker.sh build +` + +- **Run** observability-collectd Docker image: + +` +./collectd_intel_docker.sh run +` + +- **Restart** observability-collectd container (equivalent to: `docker restart `): + +` +./collectd_intel_docker.sh restart +` + +- **Stop and remove** observability-collectd container and images linked to it: + +` +./collectd_intel_docker.sh remove +` + +- **Remove** observability-collectd images: + +` +./collectd_intel_docker.sh remove-build +` + +- **Enter** observability-collectd container via the bash: + +` +./collectd_intel_docker.sh enter +` + +- See collectd **logs** with: + +` +./collectd_intel_docker.sh logs +` + +## Other container operations + +Observability-collectd is based on Docker. When user creates, builds and runs containers everything behind the scenes is managed by Docker. This is why user can either use `collectd_intel_docker.sh` script to prepare some containers operations (restart, logs, etc.) or pure Docker commands like `docker restart `, `docker logs `. + +## Optional config flags +There are also additional **flags** that can be used for building the image or running the container. + +- **--flavor** can be used to set the collectd version for image build. It can be set to one of **stable** or **latest**. +The **stable** means most recent *stable commit* from main branch. *Stable commit* has been arbitrarily chosen as +[54f7699](https://github.com/collectd/collectd/commit/54f769929d7aafc8dd5162616af19a8e60cd5ae2). +The **latest** is the most recent code from main branch (experimental feature). By default the build is made basing on **stable** flavor. + +` +./collectd_intel_docker.sh build-run --flavor stable +` + +- **--config_path** can be used to set the alternative host directory with plugins configuration when running the container. It mounts provided path as volume for container. It is not recommended to mount potentialy insecure locations (eg. /tmp), it is better to mount something like `/home/user/collectd_configuration/`. **Do not provide here path to single configuration file. This option is intended to provide a ***directory*** with configuration files for particular plugins.** + +` +./collectd_intel_docker.sh run --config_path /opt/collectd/etc/collectd.conf.d/ +` + +- **--mount_dir** option can be used to mount custom directories and files in a container (this works as a Docker volume in `rw` mode). This option can be used multiple times to mount multiple directories or files. Format of parameter is `/path/on/host:/path/in/container`. Path on host must point to existing directory or file. Path in a container is verified by a Docker engine and also must point to accessible resource. This option is very useful for mounting resources of plugins that are [disabled by default](#supported-plugins-disabled-by-default) or [unsupported](#unsupported-plugins).\ +
It is recommended to mount into a container only those resources from the host system that are required by individual plugins.\ +**Avoid mounting the entire `/var/run/` directory to prevent inadvertent mounting hosts' docker socket file and other sensitive resources inside the container.**\ +Please refer to the collectd [documentation](https://collectd.org/wiki/index.php/Table_of_Plugins) to determine the requirements of each plugin. Details on configuring individual plugins can be found in the collectd repository file: [colectd.conf.pod](https://github.com/collectd/collectd/blob/main/src/collectd.conf.pod)\ +
Example below mounts DPDK root directory to enable DPDK plugin to access DPDK socket on host, it also mounts user-owned directory `collectd_metrics` to enable user an easy access to collectd metrics: + +` +./collectd_intel_docker.sh run --mount_dir /var/run/dpdk:/var/run/dpdk --mount_dir /home/user/collectd_metrics:/tmp/collectd +` + +### Default behavior +There are few possible combinations of **--flavor** and **--config_path** flags: +- by default if no **--flavor** or **--config_path** option is set then **stable** container is built with default **stable** configuration +- if only **--flavor** flag is set then appropriate configuration is provided for the build (**stable** or **latest**) +- if only **--config_path** is set then build is made **stable** with given path for configuration +- if both **--flavor** and **--config_path** is set then given configuration path is set for chosen flavor + +### Environment variables +For image build some of the host environmental variables are used. + +- **COLLECTD_DEBUG** - if set to *y*, the [Collectd](https://github.com/collectd/collectd) will be build with debug +logs enabled, otherwise debug is disabled. It can be set for single build, for example: + +` +COLLECTD_DEBUG=y ./collectd_intel_docker.sh build +` + +- **http_proxy** and **https_proxy** - if set on host system, the proxy will be used during image build for +network connectivity. + +--- +## collectd configuration +The main collectd configuration file is located in `src/collectd/collectd.conf`. +It loads all files with plugins configuration from default (`src/collectd/sample_configs-stable`) or specified (`--config_path`) directory. + +To modify the settings of particular plugin modify the corresponding file, for example: +`src/collectd/sample_configs-stable/mcelog.conf`. + +By default all configuration files are copied into image, so when user would like to edit and reload configuration there are two possible scenarios: + +1. rebuild and run image and container from scratch using `build`, `run` or `build-run` commands +2. use existing image and create container with `run` command and `--config_path` option provided to mount volume with new configuration files into container. See [usage examples](#usage-examples). + +To ensure everything is correct user can check collectd logs with `./collectd_intel_docker.sh logs collectd-cnt` command. + +--- +## Plugins available in observability-collectd +Observability-collectd is build with set of plugins. They are divided into two groups: [supported](#supported-plugins-enabled-by-default) and [unsupported](#unsupported-plugins). Supported ones are partialy [disabled](#supported-plugins-disabled-by-default) by configuration files. + + All of the plugins can be enabled but some of them ([disabled](#supported-plugins-disabled-by-default) and [unsupported](#unsupported-plugins)) require specific configuration and dependencies installed on host system. Unsupported plugins are normally compiled with all the others inside image but are not tested and user need to provide configuration files for them. +### Supported plugins enabled by default +1. capabilities +2. contextswitch +3. cpu +4. csv +5. df +6. disk +7. ethstat +8. exec +9. hugepages +10. intel_rdt +11. ipc +12. irq +13. load +14. logfile +15. memory +16. netlink +17. numa +18. pcie_errors +19. processes +20. smart +21. swap +22. turbostat +23. uptime +24. write_prometheus + +### Supported plugins disabled by default +1. cpufreq +2. dpdk_telemetry +3. intel_pmu +4. ipmi +5. logparser +6. mcelog +7. network +8. ovs_events +9. ovs_stats +10. python +11. ras +12. snmp_agent +13. unixsock +14. virt +15. write_http +16. write_kafka +17. write_log + +### Unsupported plugins +1. aggregation +2. amqp +3. apache +4. apcups +5. ascent +6. battery +7. bind +8. buddyinfo +9. ceph +10. cgroups +11. chrony +12. check_uptime +13. connectivity +14. conntrack +15. cpusleep +16. curl +17. curl_json +18. curl_xml +19. dbi +20. dns +21. drbd +22. email +23. entropy +24. fhcount +25. filecount +26. fscache +27. hddtemp +28. infiniband +29. interface +30. iptables +31. ipvs +32. log_logstash +33. madwifi +34. match_empty_counter +35. match_hashed +36. match_regex +37. match_timediff +38. match_value +39. mbmon +40. md +41. mdevents +42. memcachec +43. memcached +44. multimeter +45. mysql +46. nfs +47. nginx +48. notify_desktop +49. notify_nagios +50. ntpd +51. olsrd +52. openldap +53. openvpn +54. pinba +55. ping +56. postgresql +57. powerdns +58. procevent +59. protocols +60. redis +61. rrdcached +62. rrdtool +63. sensors +64. serial +65. snmp +66. statsd +67. synproxy +68. sysevent +69. syslog +70. table +71. tail_csv +72. tail +73. target_notification +74. target_replace +75. target_scale +76. target_set +77. target_v5upgrade +78. tcpconns +79. teamspeak2 +80. ted +81. thermal +82. threshold +83. ubi +84. users +85. uuid +86. vmem +87. vserver +88. wireless +89. write_graphite +90. write_influxdb_udp +91. write_mongodb +92. write_redis +93. write_sensu +94. write_stackdriver +95. write_syslog +96. write_tsdb +97. zfs_arc +98. zookeeper + +--- +## Usage examples + +- Creating and running Collectd Docker image: + +` +./collectd_intel_docker.sh build-run collectd-img collectd-cnt +` + +This command will create and run CollectD Docker image with given `collectd-img` name and run it as a `collectd-cnt` named container. + +- Building just the image and running it later with a separate command: + +` +./collectd_intel_docker.sh build collectd-img +` + +` +./collectd_intel_docker.sh run collectd-img collectd-cnt +` + +- To see logs from collectd in the container: + +` +./collectd_intel_docker.sh logs collectd-cnt +` + +To exit viewing logs press: `CTRL + C`. + + +- To load new collectd configuration files: + +` +./collectd_intel_docker.sh run collectd-img collectd-cnt --config_path /home/user/collectd_config/ +` + +This will use existing `collectd-img` image and create container with custom configuration provided. If `collectd-cnt` already exists it needs to be removed with `docker rm collectd-cnt` command. diff --git a/apps/ovs_pmd_stats/ovs_pmd_stats.py b/apps/ovs_pmd_stats/ovs_pmd_stats.py new file mode 100755 index 0000000..b706bcd --- /dev/null +++ b/apps/ovs_pmd_stats/ovs_pmd_stats.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python +# +# Copyright(c) 2017 Intel Corporation. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Authors: +# Roman Korynkevych + +import socket +import argparse +import json +import logging + +HOSTNAME = socket.gethostname() +PROG_NAME = 'ovs_pmd_stats' +TYPE = 'counter' + +MAIN_THREAD = 'main thread' +PMD_THREAD = 'pmd thread' + +REQUEST_MESSAGE = '{"id":0,"method":"dpif-netdev/pmd-stats-show","params":[]}' +RESPONSE_MESSAGE_TIMEOUT = 1.0 + +# Setup arguments +parser = argparse.ArgumentParser(prog=PROG_NAME) +parser.add_argument('--socket-pid-file', required=True, help='ovs-vswitchd.pid file location') +args = parser.parse_args() + +try: + fp = open(args.socket_pid_file, 'r') + pid = fp.readline() + fp.close() +except IOError as e: + logging.error('I/O error({}): {}'.format(e.errno, e.strerror)) + raise SystemExit() +except: + logging.error('Unexpected error:', sys.exc_info()[0]) + raise SystemExit() + +server_address = args.socket_pid_file.replace('.pid', '.{}.ctl'.format(pid.strip())) + +# open unix socket to ovs-vswitch +sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) +try: + sock.connect(server_address) +except socket.error as msg: + logging.error('Socket address: {} Error: {}'.format(server_address, msg)) + raise SystemExit() + +# set timeout +sock.settimeout(RESPONSE_MESSAGE_TIMEOUT) + +# send request +sock.sendall(REQUEST_MESSAGE) + +# listen for respnse message +rdata = '' +while True: + try: + rdata += sock.recv(4096) + + if rdata.count('{') == rdata.count('}'): + break + except socket.timeout: + logging.error('Response message has not been received in {} sec.'.format(RESPONSE_MESSAGE_TIMEOUT)) + raise SystemExit() + except socket.error as e: + logging.error('Error received while reading: {}'.format(e.strerror)) + raise SystemExit() + +# parse the message +try: + s = json.loads(rdata, strict=False) +except ValueError as e: + logging.error('Failed to parse JSON response: {}'.format(e.strerror)) + raise SystemExit() + +# check for key string presence in the string +if 'result' not in s or 'id' not in s or 'error' not in s: + logging.error("One of the keys: ['id'], ['result'], ['error'] is missed in the response") + logging.error('Msg: {}'.format(s)) + raise SystemExit() + +array = s['result'].replace('\t', '').splitlines() + +# submit metrics in collectd format +plugin_instance = '' +for el in array: + if MAIN_THREAD in el or PMD_THREAD in el: + plugin_instance = el[:-1].replace(' ', '_') + else: + type_instance = el.split(':')[0].replace(' ', "_") + value = el.split(':')[1].strip().split(' ')[0] + print('PUTVAL %s/%s-%s/%s-%s N:%s' % (HOSTNAME, PROG_NAME, plugin_instance, TYPE, type_instance, value)) + +# close socket +sock.close() diff --git a/apps/ovs_pmd_stats_config.sh b/apps/ovs_pmd_stats_config.sh new file mode 100755 index 0000000..6e21122 --- /dev/null +++ b/apps/ovs_pmd_stats_config.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2017-2021 Intel Corporation and OPNFV. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +CURRENT_DIR=$(pwd) +export CURRENT_DIR + +readonly SERVICE="openvswitch" +RESULT=$(pgrep $SERVICE) +readonly RESULT +readonly OVS_PMD_STAT_SCRIPT=$CURRENT_DIR/ovs_pmd_stats/ovs_pmd_stats.py +readonly PATH_LOCAL=/usr/local/src/ + +if [ "${RESULT:-null}" != null ]; then + echo "Openvswitch service is running." + sudo ovs-vsctl set-manager ptcp:6640 + cp "$OVS_PMD_STAT_SCRIPT" $PATH_LOCAL +else + echo "Openvswitch service is not running. Please start before running ovs plugins" +fi +# Always copy python ovs module when building Docker image +if [ "$DOCKER" == "y" ]; then + cp "$OVS_PMD_STAT_SCRIPT" $PATH_LOCAL +fi diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..22008ce --- /dev/null +++ b/build.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Top level script to build basic setup for the host +# +set -x + +readonly ROOT_UID=0 +SUDO="" + +# function to log message and exit with error code 1 +function logexit() { + echo "$1" + exit 1 +} + +if [ "$1" != "-f" ] && [ -d "/opt/collectd" ] || [ -d "/etc/collectd" ] +then + logexit "collectd is already installed on this system, if you wish to reinstall please rerun the script with a -f argument" +fi + +# check if root +if [ "$UID" -ne "$ROOT_UID" ] +then + # installation must be run via sudo + SUDO="sudo -E" +fi + +if [ -e deps/install.sh ] ; then + cd deps || logexit "deps does not exist" + ./install.sh || logexit "failed to install dependencies" + cd - || logexit "" +else + logexit "Can not install dependencies" +fi + +if [ "$DOCKER" != "y" ]; then + if [ ! -d /lib/modules/"$(uname -r)"/build ] ; then + logexit "Kernel devel is not available for active kernel. It can be caused by recent kernel update. Please reboot and run $0 again." + fi +fi + +# download and compile dependencies and Collectd +if [ -f src/Makefile ] ; then + cd src || logexit "src does not exist" + make install || logexit "Make install failed" + cd - || logexit "" +else + logexit "Make failed; No Makefile" +fi + +# configure ovs pmd stats app +if [ -e apps/ovs_pmd_stats_config.sh ] ; then + cd apps || logexit "apps does not exist" + $SUDO ./ovs_pmd_stats_config.sh || logexit "failed to run ovs_pmd_stats_config.sh" + cd - || logexit "" +else + logexit "Can not configure ovs pmd stats" +fi \ No newline at end of file diff --git a/collectd_intel_docker.sh b/collectd_intel_docker.sh new file mode 100755 index 0000000..964e687 --- /dev/null +++ b/collectd_intel_docker.sh @@ -0,0 +1,299 @@ +#!/bin/bash + +set -eo pipefail + +IFS=$'\n\t' + +DOCKER_IMAGE_NAME='' +DOCKER_CONTAINER_NAME='' +COLLECTD_FLAVOR=stable + +readonly DOCKER_IMAGE_TAG='0.1' +readonly COLLECTD_DEBUG=${COLLECTD_DEBUG:="n"} +readonly http_proxy=${http_proxy:=""} +readonly https_proxy=${https_proxy:=""} + +readonly CONTAINER_MEMORY_LIMIT=200m +readonly CONTAINER_CPU_SHARES=512 + +readonly YELLOW='\033[1;33m' +readonly GREEN='\033[1;32m' +readonly RED='\033[1;31m' +readonly NO_COLOR='\033[0m' + +CUSTOM_VOLUME_MOUNTS=() + +# Check docker presents on machine. +if ! [ -x "$(command -v docker)" ]; then + echo 'Error: docker is not installed.' >&2 + exit 1 +fi + +# Assign second and third argument (if present) to image name and container name +function set_container_image_names() { + if [ $# -ge 3 ]; then + DOCKER_IMAGE_NAME=$2 + DOCKER_CONTAINER_NAME=$3 + return 0 + else + echo -e "${RED}Please provide image and container name! e.g.: ${YELLOW}$0 $1 ${NO_COLOR}" + return 1 + fi +} + +# Assign second argument to container name if present +function set_container_name() { + if [ $# -ge 2 ]; then + DOCKER_CONTAINER_NAME=$2 + return 0 + else + echo -e "${RED}Please provide container name! e.g.: ${YELLOW}$0 $1 ${NO_COLOR}" + return 1 + fi +} + +# Assign second argument to image name if present +function set_image_name() { + if [ $# -ge 2 ]; then + DOCKER_IMAGE_NAME=$2 + return 0 + else + echo -e "${RED}Please provide image name! e.g.: ${YELLOW}$0 $1 ${NO_COLOR}" + return 1 + fi +} + +# Check if provided paths are correct +function check_paths() { + echo -e "Checking provided paths: $1" + # Initial test if arg is in correct format /*:/* + if [[ $1 != "/"*":/"* ]]; then + echo -e "${RED}Please provide argument in correct format eg. /path/on/host:/path/in/container${NO_COLOR}" + return 1 + fi + # Split paths into array (with IFS replacement) + oldIFS="$IFS"; IFS=: + read -a PATHS <<< "$1" + IFS="$oldIFS"; unset oldIFS + if [[ ! -d ${PATHS[0]} ]] && [[ ! -f ${PATHS[0]} ]]; then + echo -e "${RED}Provided path is not a file or directory ${PATHS[0]}${NO_COLOR}" + return 1 + fi + return 0 +} + +# Optionally set different collectd flavor or config location +function check_optional_flags() { + while [ $# -gt 0 ]; do + case "$1" in + --flavor) + if [ -z "$2" ]; then + echo -e "${RED}Please provide collectd flavor, e.g.: ${YELLOW}$0 build-run img container --flavor stable${NO_COLOR}" + exit 1 + else + if [ "$2" != "stable" ] && [ "$2" != "latest" ]; then + echo -e "${RED}Only allowed values for flavor are stable or latest${NO_COLOR}" + exit 1 + fi + COLLECTD_FLAVOR="$2" + shift 2 + echo "Collectd flavor is set to: $COLLECTD_FLAVOR" + fi + ;; + --config_path) + if [ -z "$2" ]; then + echo -e "${RED}Please provide collectd config path, e.g.: ${YELLOW}$0 build-run img container --config_path /opt/collectd/etc/collectd.conf.d${NO_COLOR}" + exit 1 + else + if [ ! -d "$2" ]; then + echo -e "${RED}Given --config_path does not exist: $2 ${NO_COLOR}" + exit 1 + fi + CUSTOM_VOLUME_MOUNTS+=(-v "$2":/opt/collectd/etc/collectd.conf.d:ro) + echo "Collectd config path is set to: $2" + shift 2 + fi + ;; + --mount_dir) + if [ -z "$2" ]; then + echo -e "${RED}Please provide paths for mounting, e.g.: /path/on/host:/path/in/container ${NO_COLOR}" + exit 1 + else + if check_paths "$2"; then + CUSTOM_VOLUME_MOUNTS+=(-v "$2":rw) + else + # path check failed + exit 1 + fi + shift 2 + fi + ;; + *) + shift + esac + done +} + +# Check if container name exist is listed in docker container list, if so return true. +function check_container_name() { + if [ "$(docker ps -a -q -f name="^/$DOCKER_CONTAINER_NAME$")" ]; then + return 0 + else + return 1 + fi +} + +# Build docker image. +function build_docker() { + docker build -t "$DOCKER_IMAGE_NAME":$DOCKER_IMAGE_TAG \ + --build-arg COLLECTD_FLAVOR="$COLLECTD_FLAVOR" \ + --build-arg COLLECTD_DEBUG="$COLLECTD_DEBUG" \ + --build-arg http_proxy="$http_proxy" \ + --build-arg https_proxy="$https_proxy" \ + --network=host \ + -f docker/collectd-alpine/Dockerfile . +} + +# Run docker container. +function run_docker() { + docker run -d --name "$DOCKER_CONTAINER_NAME" \ + "${CUSTOM_VOLUME_MOUNTS[@]}" \ + -v /sys/fs/resctrl:/sys/fs/resctrl:rw \ + --device /dev/mem:/dev/mem --cap-add SYS_RAWIO \ + --memory="$CONTAINER_MEMORY_LIMIT" \ + --cpu-shares="$CONTAINER_CPU_SHARES" \ + --restart on-failure:5 \ + --security-opt=no-new-privileges \ + --health-cmd='stat /etc/passwd || exit 1' \ + --pids-limit 100 \ + --network=host \ + --privileged \ + -i -t "$DOCKER_IMAGE_NAME":$DOCKER_IMAGE_TAG +} + +# Remove docker images +function remove_docker_images() { + echo -e "${YELLOW}Removing Collectd Docker image...${NO_COLOR}" + docker rmi "$DOCKER_IMAGE_NAME":$DOCKER_IMAGE_TAG + echo -e "${YELLOW}Removing dangling images${NO_COLOR}" + docker images -f "dangling=true" -q | while read -r image; do + docker rmi "$image" + done +} + +collectd-intel-docker() { + case $1 in + build-run) + if set_container_image_names "$@"; then + # Check if there is container if same name as user gave in argument + if ! check_container_name; then + check_optional_flags "$@" + echo -e "${GREEN}Spinning up Collectd Docker image...${NO_COLOR}" + echo "If this is your first time starting docker image this might take a minute..." + # Build container and run it in background, with mounted files, in privileged mode, + # shared network with host, and with runtime environment variables. + build_docker + run_docker + echo -e "${GREEN}DONE!${NO_COLOR}" + else + echo -e "${RED}Container with name '${DOCKER_CONTAINER_NAME}' already exists. Please provide new one.${NO_COLOR}" + fi + fi + ;; + build) + if set_image_name "$@"; then + check_optional_flags "$@" + echo -e "${GREEN}Building Collectd Docker image...${NO_COLOR}" + echo "If this is your first time building image this might take a minute..." + build_docker + echo -e "${GREEN}DONE!${NO_COLOR}" + fi + ;; + run) + if set_container_image_names "$@"; then + if [ "$(docker images -a -q "$DOCKER_IMAGE_NAME")" ]; then + check_optional_flags "$@" + echo -e "${GREEN}Running CollectD Docker container...${NO_COLOR}" + run_docker + echo -e "${GREEN}DONE!${NO_COLOR}" + else + echo -e "${RED}Image with name '${DOCKER_IMAGE_NAME}' not exists. Please provide correct name.${NO_COLOR}" + fi + fi + ;; + restart) + if set_container_name "$@"; then + # Check if there is container with provided name, to prevent restarting not existing container. + if check_container_name; then + echo -e "${YELLOW}Restarting Collectd Docker container...${NO_COLOR}" + # Restart container, to use latest build image. + docker restart "$DOCKER_CONTAINER_NAME" + echo -e "${GREEN}DONE!${NO_COLOR}" + else + echo -e "${YELLOW}There's no Collectd Docker CONTAINER/IMAGE with name '${DOCKER_CONTAINER_NAME}'/ + '${DOCKER_IMAGE_NAME}', please build and run image using: ${NO_COLOR}./collectd-intel-docker build-run " + fi + fi + ;; + remove) + if set_container_image_names "$@"; then + echo -e "${YELLOW}Stopping Collectd Docker container...${NO_COLOR}" + docker stop "$DOCKER_CONTAINER_NAME" + echo -e "${YELLOW}Removing Collectd Docker container...${NO_COLOR}" + docker rm "$DOCKER_CONTAINER_NAME" + remove_docker_images + fi + ;; + remove-build) + if set_image_name "$@"; then + remove_docker_images + fi + ;; + enter) + if set_container_name "$@"; then + echo -e "${YELLOW}Entering /bin/bash session in the collectd container...${NO_COLOR}" + docker exec -it "$DOCKER_CONTAINER_NAME" /bin/bash + fi + ;; + logs) + if set_container_name "$@"; then + echo -e "${YELLOW}Following the logs from the collectd container...${NO_COLOR}" + docker logs -f --since=1s "$DOCKER_CONTAINER_NAME" + fi + ;; + *) + cat <<-EOF +collectd dockerized commands: + + build-run -> Build and run Collectd Docker image. + + build -> Build Collectd Docker image. + + run -> Run Collectd Docker image. + + restart -> Restart Collectd container (equivalent to: docker restart ). + + remove -> Stop and remove all Collectd Docker container, and images. + + remove-build -> Remove multistage images, and Collectd Docker image. + + enter -> Enter Collectd Docker CONTAINER via bash. + + logs -> Stream logs for the Collectd Docker container. + +optional flags: + + --flavor -> Choose collectd flavor for image build from one of stable or latest. + + --config_path -> Set custom path with collectd config for container run. + + --mount_dir -> Mounts provided host paths to container (e.g. --mount_dir /home/user/collectd/:/tmp/collectd/) + +EOF + ;; + esac +} + +pushd "$(dirname "$0")" >/dev/null +collectd-intel-docker "$@" +popd >/dev/null diff --git a/deps/alpine/3/install.sh b/deps/alpine/3/install.sh new file mode 100755 index 0000000..e90683b --- /dev/null +++ b/deps/alpine/3/install.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# +# Install specific dependencies for Alpine +# +set -eux +# Install required packages for build process +apk add --no-cache build-base linux-headers bsd-compat-headers dpkg-dev dpkg \ +automake autoconf flex bison libtool pkgconfig procps + +# Install required dependencies for collectd +# shellcheck disable=SC2046 +apk add --no-cache $(echo " +python3-dev +libgcrypt-dev +curl-dev +libcurl +libmicrohttpd-dev +protobuf-c-dev +protobuf-dev +librdkafka-dev +openipmi-dev +libatasmart-dev +hiredis-dev +yajl-dev +jansson-dev +net-snmp-dev +rrdtool-dev +libvirt-dev +libxml2-dev +rabbitmq-c-dev +libdbi-dev +libmemcached-dev +mariadb-connector-c-dev +libnotify-dev +postgresql-dev +lm-sensors-dev +mongo-c-driver-dev +libmnl-dev +libpcap-dev +iptables-dev +openldap-dev +liboping-dev +sqlite-dev +" | grep -v ^#) + +mkdir -p /usr/local/src +update-alternatives --install /usr/bin/python python /usr/bin/python3 1 diff --git a/deps/install.sh b/deps/install.sh new file mode 100755 index 0000000..636021a --- /dev/null +++ b/deps/install.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Install dependencies for the host system +# + +readonly ROOT_UID=0 +SUDO="" + +# function to log message and exit with error code 1 +function logexit() { + echo "$1" + exit 1 +} + +# Detect OS name and version from systemd based os-release file +. /etc/os-release + +# Get OS name (the First word from $NAME in /etc/os-release) +OS_NAME="$ID" +# Get major version number +OS_VERSION="${VERSION_ID%%.*}" + +# check if root +if [ "$UID" -ne "$ROOT_UID" ] +then + # installation must be run via sudo + SUDO="sudo -E" +fi + +# If there is version specific dir available then set distro_dir to that +distro_dir="$OS_NAME/$OS_VERSION" + +# Install dependencies for base system using OS specific scripts +if [ -d "$distro_dir" ] && [ -e "$distro_dir/install.sh" ]; then + $SUDO "$distro_dir/install.sh" || logexit "$distro_dir/install.sh failed" +else + logexit "$distro_dir is not supported" +fi diff --git a/docker/collectd-alpine/Dockerfile b/docker/collectd-alpine/Dockerfile new file mode 100644 index 0000000..12f1cdd --- /dev/null +++ b/docker/collectd-alpine/Dockerfile @@ -0,0 +1,43 @@ +ARG TAG=3.15 + +FROM alpine:${TAG} AS builder + +ARG COLLECTD_FLAVOR=stable +ARG COLLECTD_DEBUG=n +ARG COLLECTD_CONFIG_CMD_ARGS + +RUN apk update && \ + apk add --no-cache bash=~5.1 sudo=~1.9 git=~2.34 && \ + git config --global http.sslVerify false + +ENV DOCKER y +# LDCONFIG for libpqos install is disabled because syntax is not compatible with Alpine linux, +# but it is not necessary for build. +ENV PQOSINSTALLENV "NOLDCONFIG=y" +ENV BUILD_LIBPQOS y +ENV BUILD_PMU_TOOLS y +ENV build_dir /src + +WORKDIR ${build_dir} +COPY . ${build_dir}/ +RUN ./build.sh + +FROM alpine:${TAG} + +COPY --from=builder /usr/lib/libpqos.* /usr/lib/ +COPY --from=builder /usr/share/snmp/mibs/ /usr/share/snmp/mibs/ +COPY --from=builder /usr/local/src/ /usr/local/src/ +WORKDIR /opt/collectd +COPY --from=builder /opt/collectd/ . +COPY docker/collectd-alpine/run_collectd.sh /run_collectd.sh +COPY docker/collectd-alpine/resolve_missing.sh . + +RUN apk update && \ + apk add --no-cache bash=~5.1 sudo=~1.9 python3=~3.9 dpkg=~1.20 dmidecode=~3 && \ + chmod +x resolve_missing.sh && ./resolve_missing.sh && rm -f resolve_missing.sh && \ + update-alternatives --install /usr/bin/python python /usr/bin/python3 1 && \ + chmod +x /run_collectd.sh && \ + adduser -Ds /bin/bash collectd_exec && \ + echo "collectd_exec ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers + +ENTRYPOINT ["/run_collectd.sh"] diff --git a/docker/collectd-alpine/resolve_missing.sh b/docker/collectd-alpine/resolve_missing.sh new file mode 100644 index 0000000..b230ef3 --- /dev/null +++ b/docker/collectd-alpine/resolve_missing.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -o pipefail +set -eux + +# shellcheck disable=SC2046 +# Resolve missing dependencies for plugins and install required packages: +# (1) run ldd for each *.so file to get dependencies per plugin +# (2) grep the result to get only missing libraries +# (3) use awk to extract the library name from each line +# (4) search the repository for packages containing the libraries +# (5) use sed to remove the version from package name +# (6) install the packages +# /--------(6)-------\/----(4)----\/------------------------------(1)-------------------------------\ +# /---------------(2)--------------\/----------------(3)-----------------\/----------(5)-----------\ +apk add --no-cache $(apk search $(find /opt/collectd/lib/collectd/*.so -type f -exec ldd {} \; 2>&1 | \ + grep "No such file or directory" | awk '{ sub(/:$/,"",$5); print $5 }') | sed 's/-[0-9]\+\..*$//' | sort) diff --git a/docker/collectd-alpine/run_collectd.sh b/docker/collectd-alpine/run_collectd.sh new file mode 100644 index 0000000..1483c49 --- /dev/null +++ b/docker/collectd-alpine/run_collectd.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +/opt/collectd/sbin/collectd -f diff --git a/snapshots/bash-v5.1.16.zip b/snapshots/bash-v5.1.16.zip new file mode 100644 index 0000000..38f0b20 --- /dev/null +++ b/snapshots/bash-v5.1.16.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0778e1e8d36eb1ef876ffb6782d5fb3b2d59dc5c153542fdb28431c5a85f44ef +size 261069370 diff --git a/snapshots/collectd-a4d005779bd3d67a2006d7286d4d07bb9dac1bc7.zip b/snapshots/collectd-a4d005779bd3d67a2006d7286d4d07bb9dac1bc7.zip new file mode 100644 index 0000000..23cb306 --- /dev/null +++ b/snapshots/collectd-a4d005779bd3d67a2006d7286d4d07bb9dac1bc7.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f3a02b0c969e3dd033d9c38421840f963d5aac911e28c397e57395c6e8893c5 +size 30847659 diff --git a/snapshots/iptables-v1.8.7.zip b/snapshots/iptables-v1.8.7.zip new file mode 100644 index 0000000..b10b488 --- /dev/null +++ b/snapshots/iptables-v1.8.7.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5584883a20b8ab6dcacfbf1c4715454f3c8a04b0c35280615ad7463eafd24a9c +size 12532002 diff --git a/snapshots/libatasmart-v0.19.zip b/snapshots/libatasmart-v0.19.zip new file mode 100644 index 0000000..b17da5a --- /dev/null +++ b/snapshots/libatasmart-v0.19.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43995dcc1e947356a1916192a42b07d7e57b95759bd7385136881dbd4af0c6eb +size 305341 diff --git a/snapshots/libdbi-0.9.0.zip b/snapshots/libdbi-0.9.0.zip new file mode 100644 index 0000000..b6bbd3a --- /dev/null +++ b/snapshots/libdbi-0.9.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ff59930c5fe1ce47ab55327d21d0d04f35169a96a0b79ea0edc419cff448bf2a +size 801686 diff --git a/snapshots/libgcrypt-v1.9.4.zip b/snapshots/libgcrypt-v1.9.4.zip new file mode 100644 index 0000000..764c742 --- /dev/null +++ b/snapshots/libgcrypt-v1.9.4.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a44ba99f679f20760f6290ff0dd5994000e0adf3d3c63d6fdacd5d27dda2b39e +size 77266840 diff --git a/snapshots/libmicrohttpd-v0.9.73.zip b/snapshots/libmicrohttpd-v0.9.73.zip new file mode 100644 index 0000000..3670062 --- /dev/null +++ b/snapshots/libmicrohttpd-v0.9.73.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95bb1e6db3cdab9e310d224d7bbc5748704dc9e17da71a42c5a15ea8996b3579 +size 71327588 diff --git a/snapshots/libmnl-v1.0.4.zip b/snapshots/libmnl-v1.0.4.zip new file mode 100644 index 0000000..7ec25c1 --- /dev/null +++ b/snapshots/libmnl-v1.0.4.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:912c1f15af26ce87d54b1a7f5ccdd48ea428eabbe2c3568925b4b76dbf8b7f9e +size 320555 diff --git a/snapshots/libnotify-v0.7.9.zip b/snapshots/libnotify-v0.7.9.zip new file mode 100644 index 0000000..de9f015 --- /dev/null +++ b/snapshots/libnotify-v0.7.9.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fa9f6d9e88c0f8bde8d67d5309838f0295e748c221a13d6a4346d40b836f1e31 +size 825453 diff --git a/snapshots/liboping-v1.10.0.zip b/snapshots/liboping-v1.10.0.zip new file mode 100644 index 0000000..1190857 --- /dev/null +++ b/snapshots/liboping-v1.10.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19db6ffa6e458f32d4049164e1206e5712889566a0a7a0fd09fb4f4af5400121 +size 703446 diff --git a/snapshots/libvirt-v7.9.0.zip b/snapshots/libvirt-v7.9.0.zip new file mode 100644 index 0000000..2d9e3dd --- /dev/null +++ b/snapshots/libvirt-v7.9.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aa080c26c424b8e345874b2bf9f77d2a89a22ff3c3ed698a747e2f2d4bcc89de +size 614817888 diff --git a/snapshots/lm-sensors-v3.6.0.zip b/snapshots/lm-sensors-v3.6.0.zip new file mode 100644 index 0000000..856ea61 --- /dev/null +++ b/snapshots/lm-sensors-v3.6.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:106ae9adc6387fb1722867279af6ae2227851e4292491d8de178259ade229c62 +size 20998912 diff --git a/snapshots/mariadb-connector-c-v3.1.13.zip b/snapshots/mariadb-connector-c-v3.1.13.zip new file mode 100644 index 0000000..a0e51d6 --- /dev/null +++ b/snapshots/mariadb-connector-c-v3.1.13.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6f5819c322259831bc77f9818fd9367a2321df0d2019191f8b84e42ec41efe4 +size 10547980 diff --git a/snapshots/openipmi-code-v2.0.32.zip b/snapshots/openipmi-code-v2.0.32.zip new file mode 100644 index 0000000..29606b2 --- /dev/null +++ b/snapshots/openipmi-code-v2.0.32.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0f039adca3f710f6bb4157e9cb125ddfd7e03c0a9bef7d63f136dcfc68b946a +size 7137716 diff --git a/snapshots/pmu-tools-b1d47aa0057409175c216bf4b27e3dd93e1805bc.zip b/snapshots/pmu-tools-b1d47aa0057409175c216bf4b27e3dd93e1805bc.zip new file mode 100644 index 0000000..ba82d88 --- /dev/null +++ b/snapshots/pmu-tools-b1d47aa0057409175c216bf4b27e3dd93e1805bc.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9ab0379e84ab8aae75438f7200b1119ee9eddc7a67014765663b05f6f0341a6 +size 5873882 diff --git a/snapshots/rrdtool-1.x-v1.7.2.zip b/snapshots/rrdtool-1.x-v1.7.2.zip new file mode 100644 index 0000000..537e002 --- /dev/null +++ b/snapshots/rrdtool-1.x-v1.7.2.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1937c892e5ac0180916f80aef5a6d238f5d64d81ac9a0e760cf03f67c96a7ddf +size 16471243 diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 0000000..62c3d3e --- /dev/null +++ b/src/Makefile @@ -0,0 +1,17 @@ +# Top Makefile to build upstream packages. +# + +SUBDIRS = +ifeq ($(BUILD_LIBPQOS), y) +SUBDIRS += libpqos +endif +ifeq ($(BUILD_PMU_TOOLS), y) +SUBDIRS += pmu-tools +endif +SUBDIRS += collectd + +.PHONY: all install clean $(SUBDIRS) +all install clean: $(SUBDIRS) + +$(SUBDIRS): + $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/src/collectd/Makefile b/src/collectd/Makefile new file mode 100644 index 0000000..6c356ca --- /dev/null +++ b/src/collectd/Makefile @@ -0,0 +1,72 @@ +# makefile to build collectd package +# + +include ../package-list.mk + +WORK_DIR = collectd +TAG_DONE_FLAG := $(WORK_DIR)/.$(COLLECTD_TAG).done +BUILD_CMD = ./build.sh +CONFIG_CFLAGS = -Wno-deprecated-declarations +CONFIG_CMD = +CONFIG_CMD += ./configure +ifeq ($(COLLECTD_DEBUG), y) +CONFIG_CMD += --enable-debug +endif + +LIBPQOS_DIR = $(shell echo $$LIBPQOS_DIR) +ifeq ($(LIBPQOS_DIR),) +LIBPQOS_DIR = /usr +endif + +XDG_CACHE_HOME_DIR = $(shell echo $$XDG_CACHE_HOME) +ifeq ($(XDG_CACHE_HOME_DIR),) +XDG_CACHE_HOME_DIR = $(shell echo $$HOME) +endif + +CONFIG_CMD += --enable-syslog +CONFIG_CMD += --enable-logfile +CONFIG_CMD += --with-libpqos=$(LIBPQOS_DIR) +CONFIG_CMD += --with-libjevents=/usr/local +CONFIG_CMD += --disable-perl +CONFIG_CMD += --with-librdkafka=/usr + +CONFIG_CMD += $(COLLECTD_CONFIG_CMD_ARGS) + +.PHONY: install collectd_make + +all: collectd_make + echo "Finished making $(WORK_DIR)" + +# configure collectd is the process to produce the script 'configure' +$(WORK_DIR)/configure: $(TAG_DONE_FLAG) + echo "booting up collectd" + cd $(WORK_DIR); $(BUILD_CMD) + echo "done booting collectd" + +$(WORK_DIR)/Makefile: $(WORK_DIR)/configure + echo "Configuring with: " $(CONFIG_CMD) + cd $(WORK_DIR); $(CONFIG_CMD) + echo "Configure done" + +collectd_make: $(WORK_DIR)/Makefile + $(MAKE) CFLAGS=$(CONFIG_CFLAGS) -C $(WORK_DIR) $(MORE_MAKE_FLAGS) + echo "Make done" + +install: collectd_make + $(MAKE) CFLAGS=$(CONFIG_CFLAGS) -C $(WORK_DIR) install + echo "Using sample configs: $(COLLECTD_CONF_VARIANT_NAME)" + sudo DOCKER="$(DOCKER)" ./include_config.sh $(COLLECTD_CONF_VARIANT_NAME) + sudo cp ./snmp-mibs/*.txt /usr/share/snmp/mibs/ + echo "Make install done" + +# clean repo +clean: + cd $(WORK_DIR) && git clean -xfd *.o + +$(WORK_DIR): + git clone $(COLLECTD_URL) + +$(TAG_DONE_FLAG): $(WORK_DIR) + echo "Checking out collectd from tag: $(COLLECTD_TAG)" + cd $(WORK_DIR); git fetch origin $(COLLECTD_TAG); git checkout FETCH_HEAD + touch $@ diff --git a/src/collectd/collectd.conf b/src/collectd/collectd.conf new file mode 100644 index 0000000..15b76b3 --- /dev/null +++ b/src/collectd/collectd.conf @@ -0,0 +1,79 @@ +# +# Config file for collectd(1). +# Please read collectd.conf(5) for a list of options. +# http://collectd.org/ +# + +############################################################################## +# Global # +#----------------------------------------------------------------------------# +# Global settings for the daemon. # +############################################################################## + +#Hostname "localhost" +#FQDNLookup true +#BaseDir "${prefix}/var/lib/collectd" +#PIDFile "${prefix}/var/run/collectd.pid" +#PluginDir "${exec_prefix}/lib/collectd" +#TypesDB "/opt/collectd/share/collectd/types.db" + +#----------------------------------------------------------------------------# +# When enabled, plugins are loaded automatically with the default options # +# when an appropriate block is encountered. # +# Disabled by default. # +#----------------------------------------------------------------------------# +#AutoLoadPlugin false + +#----------------------------------------------------------------------------# +# When enabled, internal statistics are collected, using "collectd" as the # +# plugin name. # +# Disabled by default. # +#----------------------------------------------------------------------------# +#CollectInternalStats false + +#----------------------------------------------------------------------------# +# Interval at which to query values. This may be overwritten on a per-plugin # +# base by using the 'Interval' option of the LoadPlugin block: # +# # +# Interval 60 # +# # +#----------------------------------------------------------------------------# +Interval 10 + +#MaxReadInterval 86400 +#Timeout 2 +#ReadThreads 5 +#WriteThreads 5 + +# Limit the size of the write queue. Default is no limit. Setting up a limit is +# recommended for servers handling a high volume of traffic. +#WriteQueueLimitHigh 1000000 +#WriteQueueLimitLow 800000 + +############################################################################## +# Logging # +#----------------------------------------------------------------------------# +# Plugins which provide logging functions should be loaded first, so log # +# messages generated when loading or configuring other plugins can be # +# accessed. # +############################################################################## + +#LoadPlugin syslog +LoadPlugin logfile +#LoadPlugin log_logstash + + + LogLevel info + File STDOUT + Timestamp true + PrintSeverity false + + +# +# LogLevel debug +# File "${prefix}/var/log/collectd.json.log" +# + +# +# LogLevel debug +# diff --git a/src/collectd/include_config.sh b/src/collectd/include_config.sh new file mode 100755 index 0000000..4d87e94 --- /dev/null +++ b/src/collectd/include_config.sh @@ -0,0 +1,78 @@ +#!/bin/bash +# Copyright 2017-2021 Intel Corporation and OPNFV. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# 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 COLLECTD_CONFIGS_VARIANT_NAME [COLLECTD_PREFIX]" + echo "e.g. $0 'sample_configs-stable' '/opt/collectd'" + exit 1 +fi + +COLLECTD_PREFIX="/opt/collectd" +if [ -n "$2" ]; then + COLLECTD_PREFIX="$2" + echo "Using user defined path for collectd files: '$COLLECTD_PREFIX'" +else + echo "Using default path for collectd files: '/opt/collectd'" +fi + +readonly SAMPLE_CONF_VARIANT="$1" +readonly COLLECTD_CONF_FILE=$COLLECTD_PREFIX/etc/collectd.conf +readonly COLLECTD_CONF_DIR=$COLLECTD_PREFIX/etc/collectd.conf.d +readonly INCLUDE_CONF="" +CURR_DIR=$(pwd) +readonly CURR_DIR +HOSTNAME=$(hostname) +readonly HOSTNAME +readonly 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 + +if [ "$DOCKER" == "y" ]; then + cp "$CURR_DIR"/collectd.conf "$COLLECTD_CONF_FILE" +fi + +function write_include { + echo "Hostname \"$HOSTNAME\"" | sudo tee -a "$COLLECTD_CONF_FILE"; + echo "$INCLUDE_CONF" | sudo tee -a "$COLLECTD_CONF_FILE"; + echo " Filter \"*.conf\"" | sudo tee -a "$COLLECTD_CONF_FILE"; + echo -e "" | sudo tee -a "$COLLECTD_CONF_FILE"; +} + +if ! grep -qe "" "$COLLECTD_CONF_FILE"; then + write_include +fi + +mkdir -p "$COLLECTD_CONF_DIR" + +SAMPLE_CONF_FILES="$SAMPLE_CONF_DIR/*" +for F in $SAMPLE_CONF_FILES; do + FILE=$(basename "$F") + if [ -f "$COLLECTD_CONF_DIR"/"$FILE" ]; then + echo "File $COLLECTD_CONF_DIR/$FILE exists" + else + cp "$F" "$COLLECTD_CONF_DIR" + fi +done diff --git a/src/collectd/sample_configs-latest/capabilities.conf b/src/collectd/sample_configs-latest/capabilities.conf new file mode 100644 index 0000000..0ac5e70 --- /dev/null +++ b/src/collectd/sample_configs-latest/capabilities.conf @@ -0,0 +1,6 @@ +LoadPlugin capabilities + + + # Host "localhost" + Port "9104" + diff --git a/src/collectd/sample_configs-latest/contextswitch.conf b/src/collectd/sample_configs-latest/contextswitch.conf new file mode 100644 index 0000000..7417b91 --- /dev/null +++ b/src/collectd/sample_configs-latest/contextswitch.conf @@ -0,0 +1 @@ +LoadPlugin contextswitch diff --git a/src/collectd/sample_configs-latest/cpu.conf b/src/collectd/sample_configs-latest/cpu.conf new file mode 100644 index 0000000..088a70e --- /dev/null +++ b/src/collectd/sample_configs-latest/cpu.conf @@ -0,0 +1,10 @@ +LoadPlugin cpu + + + ReportByCpu true + ReportByState true + ValuesPercentage false + ReportNumCpu false + ReportGuestState false + SubtractGuestState true + diff --git a/src/collectd/sample_configs-latest/cpufreq.conf b/src/collectd/sample_configs-latest/cpufreq.conf new file mode 100644 index 0000000..08dac0d --- /dev/null +++ b/src/collectd/sample_configs-latest/cpufreq.conf @@ -0,0 +1 @@ +# LoadPlugin cpufreq diff --git a/src/collectd/sample_configs-latest/csv.conf b/src/collectd/sample_configs-latest/csv.conf new file mode 100644 index 0000000..824fd00 --- /dev/null +++ b/src/collectd/sample_configs-latest/csv.conf @@ -0,0 +1,6 @@ +LoadPlugin csv + + + DataDir "/tmp/collectd/csv" + StoreRates false + diff --git a/src/collectd/sample_configs-latest/df.conf b/src/collectd/sample_configs-latest/df.conf new file mode 100644 index 0000000..dae4db1 --- /dev/null +++ b/src/collectd/sample_configs-latest/df.conf @@ -0,0 +1 @@ +LoadPlugin df diff --git a/src/collectd/sample_configs-latest/disc.conf b/src/collectd/sample_configs-latest/disc.conf new file mode 100644 index 0000000..db9bddb --- /dev/null +++ b/src/collectd/sample_configs-latest/disc.conf @@ -0,0 +1 @@ +LoadPlugin disk diff --git a/src/collectd/sample_configs-latest/dpdk_telemetry.conf b/src/collectd/sample_configs-latest/dpdk_telemetry.conf new file mode 100644 index 0000000..00fd850 --- /dev/null +++ b/src/collectd/sample_configs-latest/dpdk_telemetry.conf @@ -0,0 +1,8 @@ +# +# Interval 1 +# + +# +# ClientSocketPath "/var/run/dpdk/default_client" +# DpdkSocketPath "/var/run/dpdk/rte/telemetry" +# diff --git a/src/collectd/sample_configs-latest/ethstat.conf b/src/collectd/sample_configs-latest/ethstat.conf new file mode 100644 index 0000000..426d53e --- /dev/null +++ b/src/collectd/sample_configs-latest/ethstat.conf @@ -0,0 +1 @@ +LoadPlugin ethstat diff --git a/src/collectd/sample_configs-latest/exec.conf b/src/collectd/sample_configs-latest/exec.conf new file mode 100644 index 0000000..6ed020d --- /dev/null +++ b/src/collectd/sample_configs-latest/exec.conf @@ -0,0 +1,7 @@ +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/sample_configs-latest/hugepages.conf b/src/collectd/sample_configs-latest/hugepages.conf new file mode 100644 index 0000000..db21933 --- /dev/null +++ b/src/collectd/sample_configs-latest/hugepages.conf @@ -0,0 +1,9 @@ +LoadPlugin hugepages + + + ReportPerNodeHP true + ReportRootHP true + ValuesPages true + ValuesBytes false + ValuesPercentage false + diff --git a/src/collectd/sample_configs-latest/intel_pmu.conf b/src/collectd/sample_configs-latest/intel_pmu.conf new file mode 100644 index 0000000..a735378 --- /dev/null +++ b/src/collectd/sample_configs-latest/intel_pmu.conf @@ -0,0 +1,8 @@ +# LoadPlugin intel_pmu + +# +# EventList "/path/to/eventlist/json/file" +# HardwareEvents "All" +# Cores "" +# AggregateUncorePMUs true +# diff --git a/src/collectd/sample_configs-latest/intel_rdt.conf b/src/collectd/sample_configs-latest/intel_rdt.conf new file mode 100644 index 0000000..319cde5 --- /dev/null +++ b/src/collectd/sample_configs-latest/intel_rdt.conf @@ -0,0 +1,7 @@ + + Interval 1 + + + + Cores "" + diff --git a/src/collectd/sample_configs-latest/ipc.conf b/src/collectd/sample_configs-latest/ipc.conf new file mode 100644 index 0000000..5304dc1 --- /dev/null +++ b/src/collectd/sample_configs-latest/ipc.conf @@ -0,0 +1 @@ +LoadPlugin ipc diff --git a/src/collectd/sample_configs-latest/ipmi.conf b/src/collectd/sample_configs-latest/ipmi.conf new file mode 100644 index 0000000..fc3d8cb --- /dev/null +++ b/src/collectd/sample_configs-latest/ipmi.conf @@ -0,0 +1 @@ +# LoadPlugin ipmi diff --git a/src/collectd/sample_configs-latest/irq.conf b/src/collectd/sample_configs-latest/irq.conf new file mode 100644 index 0000000..b702647 --- /dev/null +++ b/src/collectd/sample_configs-latest/irq.conf @@ -0,0 +1 @@ +LoadPlugin irq diff --git a/src/collectd/sample_configs-latest/load.conf b/src/collectd/sample_configs-latest/load.conf new file mode 100644 index 0000000..5a65eda --- /dev/null +++ b/src/collectd/sample_configs-latest/load.conf @@ -0,0 +1 @@ +LoadPlugin load diff --git a/src/collectd/sample_configs-latest/logparser.conf b/src/collectd/sample_configs-latest/logparser.conf new file mode 100644 index 0000000..ccaad24 --- /dev/null +++ b/src/collectd/sample_configs-latest/logparser.conf @@ -0,0 +1,60 @@ +# LoadPlugin logparser + +# +# +# FirstFullRead false +# +# DefaultType "pcie_error" +# DefaultSeverity "warning" +# +# Regex "AER:.*error received" +# SubmatchIdx -1 +# +# +# Regex "(... .. ..:..:..) .* pcieport.*AER" +# SubmatchIdx 1 +# IsMandatory false +# +# +# Regex "pcieport (.*): AER:" +# SubmatchIdx 1 +# IsMandatory true +# +# +# PluginInstance true +# Regex " ([0-9a-fA-F:\\.]*): PCIe Bus Error" +# SubmatchIdx 1 +# IsMandatory false +# +# +# Regex "severity=" +# SubMatchIdx -1 +# +# +# Regex "severity=.*\\([nN]on-[fF]atal" +# TypeInstance "non_fatal" +# IsMandatory false +# +# +# Regex "severity=.*\\([fF]atal" +# Severity "failure" +# TypeInstance "fatal" +# IsMandatory false +# +# +# Regex "severity=Corrected" +# TypeInstance "correctable" +# IsMandatory false +# +# +# Regex "type=(.*)," +# SubmatchIdx 1 +# IsMandatory false +# +# +# Regex ", id=(.*)" +# SubmatchIdx 1 +# +# +# +# diff --git a/src/collectd/sample_configs-latest/mcelog.conf b/src/collectd/sample_configs-latest/mcelog.conf new file mode 100644 index 0000000..71f81a6 --- /dev/null +++ b/src/collectd/sample_configs-latest/mcelog.conf @@ -0,0 +1,11 @@ +# +# Interval 1 +# + +# +# +# McelogClientSocket "/var/run/mcelog-client" +# PersistentNotification false +# +# # McelogLogfile "/var/log/mcelog" +# diff --git a/src/collectd/sample_configs-latest/memory.conf b/src/collectd/sample_configs-latest/memory.conf new file mode 100644 index 0000000..249ff7f --- /dev/null +++ b/src/collectd/sample_configs-latest/memory.conf @@ -0,0 +1 @@ +LoadPlugin memory diff --git a/src/collectd/sample_configs-latest/netlink.conf b/src/collectd/sample_configs-latest/netlink.conf new file mode 100644 index 0000000..cdfb158 --- /dev/null +++ b/src/collectd/sample_configs-latest/netlink.conf @@ -0,0 +1,11 @@ +LoadPlugin netlink + + + Interface "All" + VerboseInterface "All" + QDisc "eth0" "pfifo_fast-1:0" + Class "ppp0" "htb-1:10" + Filter "ppp0" "u32-1:0" + IgnoreSelected false + CollectVFStats false + diff --git a/src/collectd/sample_configs-latest/network.conf b/src/collectd/sample_configs-latest/network.conf new file mode 100644 index 0000000..7ece88a --- /dev/null +++ b/src/collectd/sample_configs-latest/network.conf @@ -0,0 +1,5 @@ +# LoadPlugin network + +# +# Server "127.0.0.1" "25826" +# diff --git a/src/collectd/sample_configs-latest/numa.conf b/src/collectd/sample_configs-latest/numa.conf new file mode 100644 index 0000000..80296ff --- /dev/null +++ b/src/collectd/sample_configs-latest/numa.conf @@ -0,0 +1 @@ +LoadPlugin numa diff --git a/src/collectd/sample_configs-latest/ovs_events.conf b/src/collectd/sample_configs-latest/ovs_events.conf new file mode 100644 index 0000000..9e15578 --- /dev/null +++ b/src/collectd/sample_configs-latest/ovs_events.conf @@ -0,0 +1,11 @@ +# +# 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/sample_configs-latest/ovs_pmd_stats.sh b/src/collectd/sample_configs-latest/ovs_pmd_stats.sh new file mode 100755 index 0000000..a376934 --- /dev/null +++ b/src/collectd/sample_configs-latest/ovs_pmd_stats.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo python /usr/local/src/ovs_pmd_stats.py --socket-pid-file /var/run/openvswitch/ovs-vswitchd.pid diff --git a/src/collectd/sample_configs-latest/ovs_stats.conf b/src/collectd/sample_configs-latest/ovs_stats.conf new file mode 100644 index 0000000..671a861 --- /dev/null +++ b/src/collectd/sample_configs-latest/ovs_stats.conf @@ -0,0 +1,10 @@ +# +# Interval 1 +# + +# +# # Port "6640" +# # Address "127.0.0.1" +# # Socket "/var/run/openvswitch/db.sock" +# # Bridges "br0" +# diff --git a/src/collectd/sample_configs-latest/pcie_errors.conf b/src/collectd/sample_configs-latest/pcie_errors.conf new file mode 100644 index 0000000..f4c7daa --- /dev/null +++ b/src/collectd/sample_configs-latest/pcie_errors.conf @@ -0,0 +1,7 @@ + + Interval 0.01 + + + + PersistentNotifications false + diff --git a/src/collectd/sample_configs-latest/processes.conf b/src/collectd/sample_configs-latest/processes.conf new file mode 100644 index 0000000..6d50bbc --- /dev/null +++ b/src/collectd/sample_configs-latest/processes.conf @@ -0,0 +1 @@ +LoadPlugin processes diff --git a/src/collectd/sample_configs-latest/python.conf b/src/collectd/sample_configs-latest/python.conf new file mode 100644 index 0000000..bc57ba5 --- /dev/null +++ b/src/collectd/sample_configs-latest/python.conf @@ -0,0 +1,14 @@ +# +# Globals true +# + +# +# ModulePath "/path/to/your/python/modules" +# LogTraces true +# Interactive true +# Import "spam" + +# +# spam "wonderful" "lovely" +# +# diff --git a/src/collectd/sample_configs-latest/ras.conf b/src/collectd/sample_configs-latest/ras.conf new file mode 100644 index 0000000..f3e8e82 --- /dev/null +++ b/src/collectd/sample_configs-latest/ras.conf @@ -0,0 +1,5 @@ +# LoadPlugin ras + +# +# DB_Path "/var/lib/rasdaemon/ras-mc_event.db" +# diff --git a/src/collectd/sample_configs-latest/smart.conf b/src/collectd/sample_configs-latest/smart.conf new file mode 100644 index 0000000..e81190a --- /dev/null +++ b/src/collectd/sample_configs-latest/smart.conf @@ -0,0 +1,6 @@ +LoadPlugin smart + + + Disk "sda" + IgnoreSelected false + diff --git a/src/collectd/sample_configs-latest/snmp_agent.conf b/src/collectd/sample_configs-latest/snmp_agent.conf new file mode 100644 index 0000000..f0e7327 --- /dev/null +++ b/src/collectd/sample_configs-latest/snmp_agent.conf @@ -0,0 +1,773 @@ +# 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/sample_configs-latest/swap.conf b/src/collectd/sample_configs-latest/swap.conf new file mode 100644 index 0000000..9ac8d80 --- /dev/null +++ b/src/collectd/sample_configs-latest/swap.conf @@ -0,0 +1 @@ +LoadPlugin swap diff --git a/src/collectd/sample_configs-latest/turbostat.conf b/src/collectd/sample_configs-latest/turbostat.conf new file mode 100644 index 0000000..49f94ea --- /dev/null +++ b/src/collectd/sample_configs-latest/turbostat.conf @@ -0,0 +1 @@ +LoadPlugin turbostat diff --git a/src/collectd/sample_configs-latest/unixsock.conf b/src/collectd/sample_configs-latest/unixsock.conf new file mode 100644 index 0000000..58c555f --- /dev/null +++ b/src/collectd/sample_configs-latest/unixsock.conf @@ -0,0 +1,8 @@ +# LoadPlugin unixsock + +# +# SocketFile "/path/to/socket" +# SocketGroup "collectd" +# SocketPerms "0770" +# DeleteSocket true +# diff --git a/src/collectd/sample_configs-latest/uptime.conf b/src/collectd/sample_configs-latest/uptime.conf new file mode 100644 index 0000000..5b44d0c --- /dev/null +++ b/src/collectd/sample_configs-latest/uptime.conf @@ -0,0 +1 @@ +LoadPlugin uptime diff --git a/src/collectd/sample_configs-latest/virt.conf b/src/collectd/sample_configs-latest/virt.conf new file mode 100644 index 0000000..0218f65 --- /dev/null +++ b/src/collectd/sample_configs-latest/virt.conf @@ -0,0 +1,17 @@ +# #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/sample_configs-latest/write_http.conf b/src/collectd/sample_configs-latest/write_http.conf new file mode 100644 index 0000000..73dec2e --- /dev/null +++ b/src/collectd/sample_configs-latest/write_http.conf @@ -0,0 +1,9 @@ +# LoadPlugin write_http + +# +# +# URL "http://example.com/post-collectd" +# User "collectd" +# Password "weCh3ik0" +# +# diff --git a/src/collectd/sample_configs-latest/write_kafka.conf b/src/collectd/sample_configs-latest/write_kafka.conf new file mode 100644 index 0000000..76c5117 --- /dev/null +++ b/src/collectd/sample_configs-latest/write_kafka.conf @@ -0,0 +1,8 @@ +# LoadPlugin write_kafka + +# +# Property "metadata.broker.list" "localhost:9092" +# +# Format JSON +# +# diff --git a/src/collectd/sample_configs-latest/write_log.conf b/src/collectd/sample_configs-latest/write_log.conf new file mode 100644 index 0000000..831046c --- /dev/null +++ b/src/collectd/sample_configs-latest/write_log.conf @@ -0,0 +1,5 @@ +# LoadPlugin write_log + +# +# Format JSON #This plugin supports two output formats: Graphite and JSON +# diff --git a/src/collectd/sample_configs-latest/write_notification.sh b/src/collectd/sample_configs-latest/write_notification.sh new file mode 100755 index 0000000..709a07a --- /dev/null +++ b/src/collectd/sample_configs-latest/write_notification.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +while read -r key value +do + echo "$key" "$value" >> /tmp/notifications +done diff --git a/src/collectd/sample_configs-latest/write_prometheus.conf b/src/collectd/sample_configs-latest/write_prometheus.conf new file mode 100644 index 0000000..14e4866 --- /dev/null +++ b/src/collectd/sample_configs-latest/write_prometheus.conf @@ -0,0 +1,5 @@ +LoadPlugin write_prometheus + + + Port "9103" + diff --git a/src/collectd/sample_configs-stable/capabilities.conf b/src/collectd/sample_configs-stable/capabilities.conf new file mode 100644 index 0000000..0ac5e70 --- /dev/null +++ b/src/collectd/sample_configs-stable/capabilities.conf @@ -0,0 +1,6 @@ +LoadPlugin capabilities + + + # Host "localhost" + Port "9104" + diff --git a/src/collectd/sample_configs-stable/contextswitch.conf b/src/collectd/sample_configs-stable/contextswitch.conf new file mode 100644 index 0000000..7417b91 --- /dev/null +++ b/src/collectd/sample_configs-stable/contextswitch.conf @@ -0,0 +1 @@ +LoadPlugin contextswitch diff --git a/src/collectd/sample_configs-stable/cpu.conf b/src/collectd/sample_configs-stable/cpu.conf new file mode 100644 index 0000000..088a70e --- /dev/null +++ b/src/collectd/sample_configs-stable/cpu.conf @@ -0,0 +1,10 @@ +LoadPlugin cpu + + + ReportByCpu true + ReportByState true + ValuesPercentage false + ReportNumCpu false + ReportGuestState false + SubtractGuestState true + diff --git a/src/collectd/sample_configs-stable/cpufreq.conf b/src/collectd/sample_configs-stable/cpufreq.conf new file mode 100644 index 0000000..08dac0d --- /dev/null +++ b/src/collectd/sample_configs-stable/cpufreq.conf @@ -0,0 +1 @@ +# LoadPlugin cpufreq diff --git a/src/collectd/sample_configs-stable/csv.conf b/src/collectd/sample_configs-stable/csv.conf new file mode 100644 index 0000000..824fd00 --- /dev/null +++ b/src/collectd/sample_configs-stable/csv.conf @@ -0,0 +1,6 @@ +LoadPlugin csv + + + DataDir "/tmp/collectd/csv" + StoreRates false + diff --git a/src/collectd/sample_configs-stable/df.conf b/src/collectd/sample_configs-stable/df.conf new file mode 100644 index 0000000..dae4db1 --- /dev/null +++ b/src/collectd/sample_configs-stable/df.conf @@ -0,0 +1 @@ +LoadPlugin df diff --git a/src/collectd/sample_configs-stable/disc.conf b/src/collectd/sample_configs-stable/disc.conf new file mode 100644 index 0000000..db9bddb --- /dev/null +++ b/src/collectd/sample_configs-stable/disc.conf @@ -0,0 +1 @@ +LoadPlugin disk diff --git a/src/collectd/sample_configs-stable/dpdk_telemetry.conf b/src/collectd/sample_configs-stable/dpdk_telemetry.conf new file mode 100644 index 0000000..00fd850 --- /dev/null +++ b/src/collectd/sample_configs-stable/dpdk_telemetry.conf @@ -0,0 +1,8 @@ +# +# Interval 1 +# + +# +# ClientSocketPath "/var/run/dpdk/default_client" +# DpdkSocketPath "/var/run/dpdk/rte/telemetry" +# diff --git a/src/collectd/sample_configs-stable/ethstat.conf b/src/collectd/sample_configs-stable/ethstat.conf new file mode 100644 index 0000000..426d53e --- /dev/null +++ b/src/collectd/sample_configs-stable/ethstat.conf @@ -0,0 +1 @@ +LoadPlugin ethstat diff --git a/src/collectd/sample_configs-stable/exec.conf b/src/collectd/sample_configs-stable/exec.conf new file mode 100644 index 0000000..6ed020d --- /dev/null +++ b/src/collectd/sample_configs-stable/exec.conf @@ -0,0 +1,7 @@ +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/sample_configs-stable/hugepages.conf b/src/collectd/sample_configs-stable/hugepages.conf new file mode 100644 index 0000000..db21933 --- /dev/null +++ b/src/collectd/sample_configs-stable/hugepages.conf @@ -0,0 +1,9 @@ +LoadPlugin hugepages + + + ReportPerNodeHP true + ReportRootHP true + ValuesPages true + ValuesBytes false + ValuesPercentage false + diff --git a/src/collectd/sample_configs-stable/intel_pmu.conf b/src/collectd/sample_configs-stable/intel_pmu.conf new file mode 100644 index 0000000..a735378 --- /dev/null +++ b/src/collectd/sample_configs-stable/intel_pmu.conf @@ -0,0 +1,8 @@ +# LoadPlugin intel_pmu + +# +# EventList "/path/to/eventlist/json/file" +# HardwareEvents "All" +# Cores "" +# AggregateUncorePMUs true +# diff --git a/src/collectd/sample_configs-stable/intel_rdt.conf b/src/collectd/sample_configs-stable/intel_rdt.conf new file mode 100644 index 0000000..319cde5 --- /dev/null +++ b/src/collectd/sample_configs-stable/intel_rdt.conf @@ -0,0 +1,7 @@ + + Interval 1 + + + + Cores "" + diff --git a/src/collectd/sample_configs-stable/ipc.conf b/src/collectd/sample_configs-stable/ipc.conf new file mode 100644 index 0000000..5304dc1 --- /dev/null +++ b/src/collectd/sample_configs-stable/ipc.conf @@ -0,0 +1 @@ +LoadPlugin ipc diff --git a/src/collectd/sample_configs-stable/ipmi.conf b/src/collectd/sample_configs-stable/ipmi.conf new file mode 100644 index 0000000..fc3d8cb --- /dev/null +++ b/src/collectd/sample_configs-stable/ipmi.conf @@ -0,0 +1 @@ +# LoadPlugin ipmi diff --git a/src/collectd/sample_configs-stable/irq.conf b/src/collectd/sample_configs-stable/irq.conf new file mode 100644 index 0000000..b702647 --- /dev/null +++ b/src/collectd/sample_configs-stable/irq.conf @@ -0,0 +1 @@ +LoadPlugin irq diff --git a/src/collectd/sample_configs-stable/load.conf b/src/collectd/sample_configs-stable/load.conf new file mode 100644 index 0000000..5a65eda --- /dev/null +++ b/src/collectd/sample_configs-stable/load.conf @@ -0,0 +1 @@ +LoadPlugin load diff --git a/src/collectd/sample_configs-stable/logparser.conf b/src/collectd/sample_configs-stable/logparser.conf new file mode 100644 index 0000000..ccaad24 --- /dev/null +++ b/src/collectd/sample_configs-stable/logparser.conf @@ -0,0 +1,60 @@ +# LoadPlugin logparser + +# +# +# FirstFullRead false +# +# DefaultType "pcie_error" +# DefaultSeverity "warning" +# +# Regex "AER:.*error received" +# SubmatchIdx -1 +# +# +# Regex "(... .. ..:..:..) .* pcieport.*AER" +# SubmatchIdx 1 +# IsMandatory false +# +# +# Regex "pcieport (.*): AER:" +# SubmatchIdx 1 +# IsMandatory true +# +# +# PluginInstance true +# Regex " ([0-9a-fA-F:\\.]*): PCIe Bus Error" +# SubmatchIdx 1 +# IsMandatory false +# +# +# Regex "severity=" +# SubMatchIdx -1 +# +# +# Regex "severity=.*\\([nN]on-[fF]atal" +# TypeInstance "non_fatal" +# IsMandatory false +# +# +# Regex "severity=.*\\([fF]atal" +# Severity "failure" +# TypeInstance "fatal" +# IsMandatory false +# +# +# Regex "severity=Corrected" +# TypeInstance "correctable" +# IsMandatory false +# +# +# Regex "type=(.*)," +# SubmatchIdx 1 +# IsMandatory false +# +# +# Regex ", id=(.*)" +# SubmatchIdx 1 +# +# +# +# diff --git a/src/collectd/sample_configs-stable/mcelog.conf b/src/collectd/sample_configs-stable/mcelog.conf new file mode 100644 index 0000000..71f81a6 --- /dev/null +++ b/src/collectd/sample_configs-stable/mcelog.conf @@ -0,0 +1,11 @@ +# +# Interval 1 +# + +# +# +# McelogClientSocket "/var/run/mcelog-client" +# PersistentNotification false +# +# # McelogLogfile "/var/log/mcelog" +# diff --git a/src/collectd/sample_configs-stable/memory.conf b/src/collectd/sample_configs-stable/memory.conf new file mode 100644 index 0000000..249ff7f --- /dev/null +++ b/src/collectd/sample_configs-stable/memory.conf @@ -0,0 +1 @@ +LoadPlugin memory diff --git a/src/collectd/sample_configs-stable/netlink.conf b/src/collectd/sample_configs-stable/netlink.conf new file mode 100644 index 0000000..4f5f13a --- /dev/null +++ b/src/collectd/sample_configs-stable/netlink.conf @@ -0,0 +1,11 @@ +LoadPlugin netlink + + + Interface "All" + VerboseInterface "All" + # QDisc "eth0" "pfifo_fast-1:0" + # Class "ppp0" "htb-1:10" + # Filter "ppp0" "u32-1:0" + IgnoreSelected false + CollectVFStats false + diff --git a/src/collectd/sample_configs-stable/network.conf b/src/collectd/sample_configs-stable/network.conf new file mode 100644 index 0000000..7ece88a --- /dev/null +++ b/src/collectd/sample_configs-stable/network.conf @@ -0,0 +1,5 @@ +# LoadPlugin network + +# +# Server "127.0.0.1" "25826" +# diff --git a/src/collectd/sample_configs-stable/numa.conf b/src/collectd/sample_configs-stable/numa.conf new file mode 100644 index 0000000..80296ff --- /dev/null +++ b/src/collectd/sample_configs-stable/numa.conf @@ -0,0 +1 @@ +LoadPlugin numa diff --git a/src/collectd/sample_configs-stable/ovs_events.conf b/src/collectd/sample_configs-stable/ovs_events.conf new file mode 100644 index 0000000..9e15578 --- /dev/null +++ b/src/collectd/sample_configs-stable/ovs_events.conf @@ -0,0 +1,11 @@ +# +# 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/sample_configs-stable/ovs_pmd_stats.sh b/src/collectd/sample_configs-stable/ovs_pmd_stats.sh new file mode 100755 index 0000000..a376934 --- /dev/null +++ b/src/collectd/sample_configs-stable/ovs_pmd_stats.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo python /usr/local/src/ovs_pmd_stats.py --socket-pid-file /var/run/openvswitch/ovs-vswitchd.pid diff --git a/src/collectd/sample_configs-stable/ovs_stats.conf b/src/collectd/sample_configs-stable/ovs_stats.conf new file mode 100644 index 0000000..671a861 --- /dev/null +++ b/src/collectd/sample_configs-stable/ovs_stats.conf @@ -0,0 +1,10 @@ +# +# Interval 1 +# + +# +# # Port "6640" +# # Address "127.0.0.1" +# # Socket "/var/run/openvswitch/db.sock" +# # Bridges "br0" +# diff --git a/src/collectd/sample_configs-stable/pcie_errors.conf b/src/collectd/sample_configs-stable/pcie_errors.conf new file mode 100644 index 0000000..f4c7daa --- /dev/null +++ b/src/collectd/sample_configs-stable/pcie_errors.conf @@ -0,0 +1,7 @@ + + Interval 0.01 + + + + PersistentNotifications false + diff --git a/src/collectd/sample_configs-stable/processes.conf b/src/collectd/sample_configs-stable/processes.conf new file mode 100644 index 0000000..6d50bbc --- /dev/null +++ b/src/collectd/sample_configs-stable/processes.conf @@ -0,0 +1 @@ +LoadPlugin processes diff --git a/src/collectd/sample_configs-stable/python.conf b/src/collectd/sample_configs-stable/python.conf new file mode 100644 index 0000000..bc57ba5 --- /dev/null +++ b/src/collectd/sample_configs-stable/python.conf @@ -0,0 +1,14 @@ +# +# Globals true +# + +# +# ModulePath "/path/to/your/python/modules" +# LogTraces true +# Interactive true +# Import "spam" + +# +# spam "wonderful" "lovely" +# +# diff --git a/src/collectd/sample_configs-stable/ras.conf b/src/collectd/sample_configs-stable/ras.conf new file mode 100644 index 0000000..f3e8e82 --- /dev/null +++ b/src/collectd/sample_configs-stable/ras.conf @@ -0,0 +1,5 @@ +# LoadPlugin ras + +# +# DB_Path "/var/lib/rasdaemon/ras-mc_event.db" +# diff --git a/src/collectd/sample_configs-stable/smart.conf b/src/collectd/sample_configs-stable/smart.conf new file mode 100644 index 0000000..e81190a --- /dev/null +++ b/src/collectd/sample_configs-stable/smart.conf @@ -0,0 +1,6 @@ +LoadPlugin smart + + + Disk "sda" + IgnoreSelected false + diff --git a/src/collectd/sample_configs-stable/snmp_agent.conf b/src/collectd/sample_configs-stable/snmp_agent.conf new file mode 100644 index 0000000..f0e7327 --- /dev/null +++ b/src/collectd/sample_configs-stable/snmp_agent.conf @@ -0,0 +1,773 @@ +# 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/sample_configs-stable/swap.conf b/src/collectd/sample_configs-stable/swap.conf new file mode 100644 index 0000000..9ac8d80 --- /dev/null +++ b/src/collectd/sample_configs-stable/swap.conf @@ -0,0 +1 @@ +LoadPlugin swap diff --git a/src/collectd/sample_configs-stable/turbostat.conf b/src/collectd/sample_configs-stable/turbostat.conf new file mode 100644 index 0000000..49f94ea --- /dev/null +++ b/src/collectd/sample_configs-stable/turbostat.conf @@ -0,0 +1 @@ +LoadPlugin turbostat diff --git a/src/collectd/sample_configs-stable/unixsock.conf b/src/collectd/sample_configs-stable/unixsock.conf new file mode 100644 index 0000000..58c555f --- /dev/null +++ b/src/collectd/sample_configs-stable/unixsock.conf @@ -0,0 +1,8 @@ +# LoadPlugin unixsock + +# +# SocketFile "/path/to/socket" +# SocketGroup "collectd" +# SocketPerms "0770" +# DeleteSocket true +# diff --git a/src/collectd/sample_configs-stable/uptime.conf b/src/collectd/sample_configs-stable/uptime.conf new file mode 100644 index 0000000..5b44d0c --- /dev/null +++ b/src/collectd/sample_configs-stable/uptime.conf @@ -0,0 +1 @@ +LoadPlugin uptime diff --git a/src/collectd/sample_configs-stable/virt.conf b/src/collectd/sample_configs-stable/virt.conf new file mode 100644 index 0000000..0218f65 --- /dev/null +++ b/src/collectd/sample_configs-stable/virt.conf @@ -0,0 +1,17 @@ +# #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/sample_configs-stable/write_http.conf b/src/collectd/sample_configs-stable/write_http.conf new file mode 100644 index 0000000..73dec2e --- /dev/null +++ b/src/collectd/sample_configs-stable/write_http.conf @@ -0,0 +1,9 @@ +# LoadPlugin write_http + +# +# +# URL "http://example.com/post-collectd" +# User "collectd" +# Password "weCh3ik0" +# +# diff --git a/src/collectd/sample_configs-stable/write_kafka.conf b/src/collectd/sample_configs-stable/write_kafka.conf new file mode 100644 index 0000000..76c5117 --- /dev/null +++ b/src/collectd/sample_configs-stable/write_kafka.conf @@ -0,0 +1,8 @@ +# LoadPlugin write_kafka + +# +# Property "metadata.broker.list" "localhost:9092" +# +# Format JSON +# +# diff --git a/src/collectd/sample_configs-stable/write_log.conf b/src/collectd/sample_configs-stable/write_log.conf new file mode 100644 index 0000000..831046c --- /dev/null +++ b/src/collectd/sample_configs-stable/write_log.conf @@ -0,0 +1,5 @@ +# LoadPlugin write_log + +# +# Format JSON #This plugin supports two output formats: Graphite and JSON +# diff --git a/src/collectd/sample_configs-stable/write_notification.sh b/src/collectd/sample_configs-stable/write_notification.sh new file mode 100755 index 0000000..709a07a --- /dev/null +++ b/src/collectd/sample_configs-stable/write_notification.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +while read -r key value +do + echo "$key" "$value" >> /tmp/notifications +done diff --git a/src/collectd/sample_configs-stable/write_prometheus.conf b/src/collectd/sample_configs-stable/write_prometheus.conf new file mode 100644 index 0000000..14e4866 --- /dev/null +++ b/src/collectd/sample_configs-stable/write_prometheus.conf @@ -0,0 +1,5 @@ +LoadPlugin write_prometheus + + + Port "9103" + diff --git a/src/collectd/snmp-mibs/Intel-Bios.txt b/src/collectd/snmp-mibs/Intel-Bios.txt new file mode 100644 index 0000000..824cd09 --- /dev/null +++ b/src/collectd/snmp-mibs/Intel-Bios.txt @@ -0,0 +1,67 @@ +INTEL-BIOS-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE + FROM SNMPv2-SMI + + hostAssist + FROM Intel-SA-MIB + + DisplayString + FROM SNMPv2-TC; + +--***************************************************************************** +-- +-- MODULE IDENTITY AND REVISION GROUP +-- +--***************************************************************************** + +intelBios MODULE-IDENTITY + LAST-UPDATED "201610241700Z" -- coordinated universal time UTC format is YYMMDDHHmmZ + ORGANIZATION "Intel, Server Management Software" + CONTACT-INFO " " + DESCRIPTION "This SNMP MIB module retrieves System Management BIOS (SMBIOS) + information from DMI table using dmidecode. + + Version: 1.0 10/24/2016 + + Intel copyright information 2016" + ::= { hostAssist 2 } + +------------------------------------------------------------------------------- +-- BIOS scalars +------------------------------------------------------------------------------- + +biosVendor OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..128)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The textual string describes the bios vendor." + ::= { intelBios 1 } + +biosVersion OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..128)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The textual string describes the bios version." + ::= { intelBios 2 } + +biosReleaseDate OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..128)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The textual string describes the bios release date." + ::= { intelBios 3 } + +biosRevision OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..128)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The textual string describes the bios revision." + ::= { intelBios 4 } + +END diff --git a/src/collectd/snmp-mibs/Intel-Common-MIB.mib.txt b/src/collectd/snmp-mibs/Intel-Common-MIB.mib.txt new file mode 100644 index 0000000..92c766f --- /dev/null +++ b/src/collectd/snmp-mibs/Intel-Common-MIB.mib.txt @@ -0,0 +1,113 @@ +Intel-Common-MIB DEFINITIONS ::= BEGIN + +IMPORTS + enterprises FROM RFC1155-SMI; + +-- Categories + +intel OBJECT IDENTIFIER ::= { enterprises 343 } + +-- +-- Intel Private space divides into 3 branches at the top. They are +-- identifiers, products, and experimental. +-- +-- 'identifers' branch typically contains objects which are used as +-- constants. For example, if a mib contained an object identifier +-- "appliance-type", somewhere down under identifiers would be a list +-- containing OIDs for "refrigerator", "toaster", etc. Currently +-- there are 3 groups under identifiers; systems, objects and +-- comm-methods. +-- 'systems' contains objects for system type such as PCs, hubs, etc. +-- 'objects' contains identifiers for component pieces. +-- 'comm-methods' refers to the transmission medium used in +-- proxy-to-agent conversation. +-- +-- 'products' branch contains objects which are specifically Intel +-- products. Under this branch go all MIBs for Intel products. +-- +-- 'experimental' is for exactly what the name implies. +-- +-- 'information-technology' encompasses the work of the Information +-- Technology (IT) group within Intel. +-- +-- For example, an identifier for a toaster would exist under +-- 'identifiers.systems.toasters' while another identifier for an +-- Intel specific toaster MIB would live under 'products.appliances'. +-- + +identifiers OBJECT IDENTIFIER ::= { intel 1 } +products OBJECT IDENTIFIER ::= { intel 2 } +experimental OBJECT IDENTIFIER ::= { intel 3 } +information-technology OBJECT IDENTIFIER ::= { intel 4 } +sysProducts OBJECT IDENTIFIER ::= { intel 5 } +mib2ext OBJECT IDENTIFIER ::= { intel 6 } +hw OBJECT IDENTIFIER ::= { intel 7 } +wekiva OBJECT IDENTIFIER ::= { intel 111 } +-- Groups under 'identifiers' + +systems OBJECT IDENTIFIER ::= { identifiers 1 } +objects OBJECT IDENTIFIER ::= { identifiers 2 } +comm-methods OBJECT IDENTIFIER ::= { identifiers 3 } + +pc-systems OBJECT IDENTIFIER ::= { systems 1 } +proxy-systems OBJECT IDENTIFIER ::= { systems 2 } +hub-systems OBJECT IDENTIFIER ::= { systems 3 } +switch-systems OBJECT IDENTIFIER ::= { systems 4 } + +local-proxy-1 OBJECT IDENTIFIER ::= { comm-methods 1 } +pc-novell-1 OBJECT IDENTIFIER ::= { comm-methods 2 } + +-- Identifiers for 'hub-systems' +-- Note: These items match the definitions for moduleType +-- in intelhub.mib. + +express10-100Stack OBJECT IDENTIFIER ::= { hub-systems 1 } +express12TX OBJECT IDENTIFIER ::= { hub-systems 2 } +express24TX OBJECT IDENTIFIER ::= { hub-systems 3 } +expressReserved OBJECT IDENTIFIER ::= { hub-systems 4 } +expressBridge OBJECT IDENTIFIER ::= { hub-systems 6 } +express210-12 OBJECT IDENTIFIER ::= { hub-systems 7 } +express210-24 OBJECT IDENTIFIER ::= { hub-systems 8 } +express220-12 OBJECT IDENTIFIER ::= { hub-systems 9 } +express220-24 OBJECT IDENTIFIER ::= { hub-systems 10 } +express300Stack OBJECT IDENTIFIER ::= { hub-systems 11 } +express320-16 OBJECT IDENTIFIER ::= { hub-systems 12 } +express320-24 OBJECT IDENTIFIER ::= { hub-systems 13 } + +-- Groups under 'products' + +pc-products OBJECT IDENTIFIER ::= { products 1 } +hub-products OBJECT IDENTIFIER ::= { products 2 } +proxy OBJECT IDENTIFIER ::= { products 3 } +print-products OBJECT IDENTIFIER ::= { products 4 } +network-products OBJECT IDENTIFIER ::= { products 5 } +snmp-agents OBJECT IDENTIFIER ::= { products 6 } +nic-products OBJECT IDENTIFIER ::= { products 7 } +server-management OBJECT IDENTIFIER ::= { products 10 } +switch-products OBJECT IDENTIFIER ::= { products 11 } +i2o OBJECT IDENTIFIER ::= { products 120 } +-- Groups under 'hub-products' + +express110 OBJECT IDENTIFIER ::= { hub-products 1 } + +-- Groups under 'print-products' + +netport-1 OBJECT IDENTIFIER ::= { print-products 1 } +netport-2 OBJECT IDENTIFIER ::= { print-products 2 } +netport-express OBJECT IDENTIFIER ::= { print-products 3 } + +-- Groups under 'network-products' + +lanDesk OBJECT IDENTIFIER ::= { network-products 1 } +ld-alarms OBJECT IDENTIFIER ::= { lanDesk 1 } +internetServer-2 OBJECT IDENTIFIER ::= { network-products 2 } +iS-alarms OBJECT IDENTIFIER ::= { internetServer-2 1 } + +-- Groups under 'experimental' + +-- + +-- + +END + diff --git a/src/collectd/snmp-mibs/Intel-Hugepages.txt b/src/collectd/snmp-mibs/Intel-Hugepages.txt new file mode 100644 index 0000000..d4fda29 --- /dev/null +++ b/src/collectd/snmp-mibs/Intel-Hugepages.txt @@ -0,0 +1,112 @@ +INTEL-HUGEPAGES-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, Counter64 + FROM SNMPv2-SMI + + hostAssist + FROM Intel-SA-MIB; + +--***************************************************************************** +-- +-- MODULE IDENTITY AND REVISION GROUP +-- +--***************************************************************************** + +intelHugepages MODULE-IDENTITY + LAST-UPDATED "201703070000Z" -- coordinated universal time UTC format is YYMMDDHHmmZ + ORGANIZATION "Intel, Server Management Software" + CONTACT-INFO " " + DESCRIPTION "This SNMP MIB module supports the Hugepages SNMP subagent for monitoring + hugepages counters per-node for NUMA systems and overall hugepage statistics + for non-NUMA systems. + + Version: 1.0 03/07/2017 + + Intel copyright information 2017" + ::= { hostAssist 4 } + +------------------------------------------------------------------------------- +-- Intel Hugepages Table +------------------------------------------------------------------------------- + +hugepagesTable OBJECT-TYPE + SYNTAX SEQUENCE OF HugepagesTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Hugepages Table." + ::= { intelHugepages 1 } + +hugepagesTableEntry OBJECT-TYPE + SYNTAX HugepagesTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Hugepages Table Entry." + INDEX { IMPLIED hugepagesNode } + ::= { hugepagesTable 1 } + +HugepagesTableEntry ::= SEQUENCE { + hugepagesNode SnmpAdminString, + hugepagesMemoryFree Counter64, + hugepagesMemoryUsed Counter64, + hugepagesPageFree Counter64, + hugepagesPageUsed Counter64, + hugepagesPercentFree Integer32, + hugepagesPercentUsed Integer32 +} + +hugepagesNode OBJECT-TYPE + SYNTAX SnmpAdminString + MAX-ACCESS read-only + STATUS current + DESCRIPTION "A textual string containing information about the node and + hugepages size used on this node." + ::= { hugepagesTableEntry 1 } + +hugepagesMemoryFree OBJECT-TYPE + SYNTAX Counter64 + UNITS "kBytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "This counter defines the number of free hugepages memory." + ::= { hugepagesTableEntry 2 } + +hugepagesMemoryUsed OBJECT-TYPE + SYNTAX Counter64 + UNITS "kBytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "This counter defines the number of used hugepages memory." + ::= { hugepagesTableEntry 3 } + +hugepagesPagesFree OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "This counter defines the number of free pages." + ::= { hugepagesTableEntry 4 } + +hugepagesPagesUsed OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "This counter defines the number of used pages." + ::= { hugepagesTableEntry 5 } + +hugepagesPercentFree OBJECT-TYPE + SYNTAX Integer32 (0..100) + UNITS "%" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "This counter defines the percentage of free memory." + ::= { hugepagesTableEntry 6 } + +hugepagesPercentUsed OBJECT-TYPE + SYNTAX Integer32 (0..100) + UNITS "%" + MAX-ACCESS read-only + STATUS current + DESCRIPTION "This counter defines the percentage of used memory." + ::= { hugepagesTableEntry 7 } + +END diff --git a/src/collectd/snmp-mibs/Intel-Mcelog.txt b/src/collectd/snmp-mibs/Intel-Mcelog.txt new file mode 100644 index 0000000..90f4398 --- /dev/null +++ b/src/collectd/snmp-mibs/Intel-Mcelog.txt @@ -0,0 +1,115 @@ +INTEL-MCELOG-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, Integer32 + FROM SNMPv2-SMI + + hostAssist + FROM Intel-SA-MIB + + DisplayString + FROM SNMPv2-TC; + +--***************************************************************************** +-- +-- MODULE IDENTITY AND REVISION GROUP +-- +--***************************************************************************** + +intelMcelog MODULE-IDENTITY + LAST-UPDATED "201610241700Z" -- coordinated universal time UTC format is YYMMDDHHmmZ + ORGANIZATION "Intel, Server Management Software" + CONTACT-INFO " " + DESCRIPTION "This SNMP MIB module logs and accounts machine memory, IO, and CPU + hardware errors on modern x86 Linux systems. + + Version: 1.0 10/24/2016 + + Intel copyright information 2016" + ::= { hostAssist 3 } + +OneBasedIndex ::= Integer32(1..2147483647) + +------------------------------------------------------------------------------- +-- Intel Mcelog Table +------------------------------------------------------------------------------- + +memoryTable OBJECT-TYPE + SYNTAX SEQUENCE OF MemoryTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Intel RDT Groups Table." + ::= { intelMcelog 2 } + +memoryTableEntry OBJECT-TYPE + SYNTAX MemoryTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Mcelog Memory Table Entry." + INDEX { memoryGroupIndex } + ::= { memoryTable 1 } + +MemoryTableEntry ::= SEQUENCE { + memoryGroupIndex OneBasedIndex, + memoryGroupDescr DisplayString, + memoryCorrectedErrors Integer32, + memoryCorrectedTimedErrors Integer32, + memoryUncorrectedErrors Integer32, + memoryUncorrectedTimedErrors Integer32 +} + +memoryGroupIndex OBJECT-TYPE + SYNTAX OneBasedIndex + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This attribute defines the index of the Mcelog memory group." + ::= { memoryTableEntry 1 } + +memoryGroupDescr OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..255)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "A textual string containing information about the socket and + DMI name (*TODO*)." + ::= { memoryTableEntry 2 } + +memoryCorrectedErrors OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the total number of corrected errors." + ::= { memoryTableEntry 3 } + +memoryCorrectedTimedErrors OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the number of corrected errors in + last 24 hours." + ::= { memoryTableEntry 4 } + +memoryUncorrectedErrors OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the total number of uncorrected errors." + ::= { memoryTableEntry 5 } + +memoryUncorrectedTimedErrors OBJECT-TYPE + SYNTAX Integer32 + UNITS "in 24h" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the number of uncorrected errors in + last 24 hours." + ::= { memoryTableEntry 6 } + +END diff --git a/src/collectd/snmp-mibs/Intel-Pmu.txt b/src/collectd/snmp-mibs/Intel-Pmu.txt new file mode 100644 index 0000000..328c504 --- /dev/null +++ b/src/collectd/snmp-mibs/Intel-Pmu.txt @@ -0,0 +1,409 @@ +INTEL-PMU-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, Integer32, Counter64 + FROM SNMPv2-SMI + + hostAssist + FROM Intel-SA-MIB + + DisplayString + FROM SNMPv2-TC; + +--***************************************************************************** +-- +-- MODULE IDENTITY AND REVISION GROUP +-- +--***************************************************************************** + +intelPmu MODULE-IDENTITY + LAST-UPDATED "201703061700Z" -- coordinated universal time UTC format is YYMMDDHHmmZ + ORGANIZATION "Intel, Server Management Software" + CONTACT-INFO " " + DESCRIPTION "This SNMP MIB module supports the Intel PMU SNMP subagent for getting + performance counters data on Intel CPUs. + + Version: 1.0 3/6/2017 + + Intel copyright information 2017" + ::= { hostAssist 5 } + +OneBasedIndex ::= Integer32(1..2147483647) + +------------------------------------------------------------------------------- +-- Intel PMU Table +------------------------------------------------------------------------------- + +pmuTable OBJECT-TYPE + SYNTAX SEQUENCE OF PmuTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Intel PMU Table." + ::= { intelPmu 1 } + +pmuTableEntry OBJECT-TYPE + SYNTAX PmuTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Intel PMU Table Entry." + INDEX { pmuGroupIndex } + ::= { pmuTable 1 } + +PmuTableEntry ::= SEQUENCE { + pmuGroupIndex OneBasedIndex, + pmuGroupDescr DisplayString, + pmuL1DCacheLoads Counter64, + pmuL1DCacheLoadMisses Counter64, + pmuL1DCacheStores Counter64, + pmuL1DCacheStoreMisses Counter64, + pmuL1DCachePrefetches Counter64, + pmuL1DCachePrefetchMisses Counter64, + pmuL1ICacheLoads Counter64, + pmuL1ICacheLoadMisses Counter64, + pmuL1ICachePrefetches Counter64, + pmuL1ICachePrefetchMisses Counter64, + pmuLLCLoads Counter64, + pmuLLCLoadMisses Counter64, + pmuLLCStores Counter64, + pmuLLCStoreMisses Counter64, + pmuLLCPrefetches Counter64, + pmuLLCPrefetchMisses Counter64, + pmuDTLBLoads Counter64, + pmuDTLBLoadMisses Counter64, + pmuDTLBStores Counter64, + pmuDTLBStoreMisses Counter64, + pmuDTLBPrefetches Counter64, + pmuDTLBPrefetchMisses Counter64, + pmuITLBLoads Counter64, + pmuITLBLoadMisses Counter64, + pmuBranchLoads Counter64, + pmuBranchLoadMisses Counter64, + pmuCpuCycles Counter64, + pmuInstructions Counter64, + pmuCacheReferences Counter64, + pmuCacheMisses Counter64, + pmuBranches Counter64, + pmuBranchMisses Counter64, + pmuBusCycles Counter64, + pmuCpuClock Counter64, + pmuTaskClock Counter64, + pmuContextSwitches Counter64, + pmuCpuMigrations Counter64, + pmuPageFaults Counter64, + pmuMinorFaults Counter64, + pmuMajorFaults Counter64, + pmuAlignmentFaults Counter64, + pmuEmulationFaults Counter64 +} + +pmuGroupIndex OBJECT-TYPE + SYNTAX OneBasedIndex + MAX-ACCESS read-only + STATUS current + DESCRIPTION "This attribute defines the index of the CPU cores group." + ::= { pmuTableEntry 1 } + +pmuGroupDescr OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..255)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "A textual string containing information about the group of cores + on which counters are collected." + ::= { pmuTableEntry 2 } + +pmuL1DCacheLoads OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 DCache Loads" + ::= { pmuTableEntry 3 } + +pmuL1DCacheLoadMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 DCache Load Misses" + ::= { pmuTableEntry 4 } + +pmuL1DCacheStores OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 DCache Stores" + ::= { pmuTableEntry 5 } + +pmuL1DCacheStoreMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 DCache Store Misses" + ::= { pmuTableEntry 6 } + +pmuL1DCachePrefetches OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 DCache Prefetches" + ::= { pmuTableEntry 7 } + +pmuL1DCachePrefetchMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 DCache Prefetch Misses" + ::= { pmuTableEntry 8 } + +pmuL1ICacheLoads OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 ICache Loads" + ::= { pmuTableEntry 9 } + +pmuL1ICacheLoadMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 ICache Load Misses" + ::= { pmuTableEntry 10 } + +pmuL1ICachePrefetches OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 ICache Prefetches" + ::= { pmuTableEntry 11 } + +pmuL1ICachePrefetchMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "L1 ICache Prefetch Misses" + ::= { pmuTableEntry 12 } + +pmuLLCLoads OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "LLC Loads" + ::= { pmuTableEntry 13 } + +pmuLLCLoadMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "LLC Load Misses" + ::= { pmuTableEntry 14 } + +pmuLLCStores OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "LLC Stores" + ::= { pmuTableEntry 15 } + +pmuLLCStoreMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "LLC Store Misses" + ::= { pmuTableEntry 16 } + +pmuLLCPrefetches OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "LLC Prefetches" + ::= { pmuTableEntry 17 } + +pmuLLCPrefetchMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "LLC Prefetch Misses" + ::= { pmuTableEntry 18 } + +pmuDTLBLoads OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "DTLB Loads" + ::= { pmuTableEntry 19 } + +pmuDTLBLoadMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "DTLB Load Misses" + ::= { pmuTableEntry 20 } + +pmuDTLBStores OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "DTLB Stores" + ::= { pmuTableEntry 21 } + +pmuDTLBStoreMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "DTLB Store Misses" + ::= { pmuTableEntry 22 } + +pmuDTLBPrefetches OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "DTLB Prefetches" + ::= { pmuTableEntry 23 } + +pmuDTLBPrefetchMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "DTLB Prefetch Misses" + ::= { pmuTableEntry 24 } + +pmuITLBLoads OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "ITLB Loads" + ::= { pmuTableEntry 25 } + +pmuITLBLoadMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "ITLB Load Misses" + ::= { pmuTableEntry 26 } + +pmuBranchLoads OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Branch Loads" + ::= { pmuTableEntry 27 } + +pmuBranchLoadMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Branch Load Misses" + ::= { pmuTableEntry 28 } + +pmuCpuCycles OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "CPU Cycles" + ::= { pmuTableEntry 29 } + +pmuInstructions OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Instructions" + ::= { pmuTableEntry 30 } + +pmuCacheReferences OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Cache References" + ::= { pmuTableEntry 31 } + +pmuCacheMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Cache Misses" + ::= { pmuTableEntry 32 } + +pmuBranches OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Branches" + ::= { pmuTableEntry 33 } + +pmuBranchMisses OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Branch Misses" + ::= { pmuTableEntry 34 } + +pmuBusCycles OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Bus Cycles" + ::= { pmuTableEntry 35 } + +pmuCpuClock OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "CPU Clock" + ::= { pmuTableEntry 36 } + +pmuTaskClock OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Task Clock" + ::= { pmuTableEntry 37 } + +pmuContextSwitches OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Context Switches" + ::= { pmuTableEntry 38 } + +pmuCpuMigrations OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "CPU Migrations" + ::= { pmuTableEntry 39 } + +pmuPageFaults OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Page Faults" + ::= { pmuTableEntry 40 } + +pmuMinorFaults OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Minor Faults" + ::= { pmuTableEntry 41 } + +pmuMajorFaults OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Major Faults" + ::= { pmuTableEntry 42 } + +pmuAlignmentFaults OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Alignment Faults" + ::= { pmuTableEntry 43 } + +pmuEmulationFaults OBJECT-TYPE + SYNTAX Counter64 + MAX-ACCESS read-only + STATUS current + DESCRIPTION "Emulation Faults" + ::= { pmuTableEntry 44 } + +END diff --git a/src/collectd/snmp-mibs/Intel-Rdt.txt b/src/collectd/snmp-mibs/Intel-Rdt.txt new file mode 100644 index 0000000..8eb93d0 --- /dev/null +++ b/src/collectd/snmp-mibs/Intel-Rdt.txt @@ -0,0 +1,128 @@ +INTEL-RDT-MIB DEFINITIONS ::= BEGIN + +IMPORTS + MODULE-IDENTITY, OBJECT-TYPE, Integer32, Counter64 + FROM SNMPv2-SMI + + hostAssist + FROM Intel-SA-MIB + + DisplayString + FROM SNMPv2-TC; + +--***************************************************************************** +-- +-- MODULE IDENTITY AND REVISION GROUP +-- +--***************************************************************************** + +intelRdt MODULE-IDENTITY + LAST-UPDATED "201610241700Z" -- coordinated universal time UTC format is YYMMDDHHmmZ + ORGANIZATION "Intel, Server Management Software" + CONTACT-INFO " " + DESCRIPTION "This SNMP MIB module supports the Intel RDT SNMP subagent for monitoring + information provided by monitoring features of Intel Resource Director + Technology (Intel(R) RDT) like Cache Monitoring Technology (CMT), + Memory Bandwidth Monitoring (MBM). These features provide information about + utilization of shared resources like last level cache occupancy, local + memory bandwidth usage, remote memory bandwidth usage, instructions per clock. + + Version: 1.0 10/24/2016 + + Intel copyright information 2016" + ::= { hostAssist 1 } + +OneBasedIndex ::= Integer32(1..2147483647) + +------------------------------------------------------------------------------- +-- Intel RDT Table +------------------------------------------------------------------------------- + +rdtGroupNumber OBJECT-TYPE + SYNTAX Integer32 + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "The number of network interfaces (regardless of their + current state) present on this system." + ::= { intelRdt 1 } + +rdtTable OBJECT-TYPE + SYNTAX SEQUENCE OF RdtTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION + "This Group defines the Intel RDT Groups Table." + ::= { intelRdt 2 } + +rdtTableEntry OBJECT-TYPE + SYNTAX RdtTableEntry + MAX-ACCESS not-accessible + STATUS current + DESCRIPTION "This Group defines the Intel RDT Groups Table Entry." + INDEX { rdtGroupIndex } + ::= { rdtTable 1 } + +RdtTableEntry ::= SEQUENCE { + rdtGroupIndex OneBasedIndex, + rdtGroupDescr DisplayString, + rdtLlc Counter64, + rdtIpc Counter64, + rdtMbmRemote Counter64, + rdtMbmLocal Counter64 +} + +rdtGroupIndex OBJECT-TYPE + SYNTAX OneBasedIndex + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This attribute defines the index of the Intel RDT group." + ::= { rdtTableEntry 1 } + +rdtGroupDescr OBJECT-TYPE + SYNTAX DisplayString (SIZE (0..255)) + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "A textual string containing information about the groups of cores + on which to monitor supported events." + ::= { rdtTableEntry 2 } + +rdtLlc OBJECT-TYPE + SYNTAX Counter64 + UNITS "bytes" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the last level cache occupancy." + ::= { rdtTableEntry 3 } + +rdtIpc OBJECT-TYPE + SYNTAX DisplayString + UNITS "ipc" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the instructions per clock." + ::= { rdtTableEntry 4 } + +rdtMbmRemote OBJECT-TYPE + SYNTAX Counter64 + UNITS "bytes/sec" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the Remote (Socket) memory bandwidth usage." + ::= { rdtTableEntry 5 } + +rdtMbmLocal OBJECT-TYPE + SYNTAX Counter64 + UNITS "bytes/sec" + MAX-ACCESS read-only + STATUS current + DESCRIPTION + "This counter defines the Local (Socket) memory bandwidth usage." + ::= { rdtTableEntry 6 } + +END diff --git a/src/collectd/snmp-mibs/Intel-SA.txt b/src/collectd/snmp-mibs/Intel-SA.txt new file mode 100644 index 0000000..6e7dd87 --- /dev/null +++ b/src/collectd/snmp-mibs/Intel-SA.txt @@ -0,0 +1,10 @@ +Intel-SA-MIB DEFINITIONS ::= BEGIN + +IMPORTS + server-management FROM Intel-Common-MIB; + +software OBJECT IDENTIFIER ::= { server-management 3 } +baseboardGroup OBJECT IDENTIFIER ::= { software 5 } +hostAssist OBJECT IDENTIFIER ::= { baseboardGroup 1 } + +END diff --git a/src/collectd/snmp-mibs/LIBVIRT-HYPERVISOR-MIB.txt b/src/collectd/snmp-mibs/LIBVIRT-HYPERVISOR-MIB.txt new file mode 100644 index 0000000..aa71481 --- /dev/null +++ b/src/collectd/snmp-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/libpqos/Makefile b/src/libpqos/Makefile new file mode 100644 index 0000000..a8c2304 --- /dev/null +++ b/src/libpqos/Makefile @@ -0,0 +1,33 @@ +# makefile to build pqos library +# + +include ../package-list.mk + +WORK_DIR = intel-cmt-cat +TAG_DONE_FLAG = $(WORK_DIR)/.$(LIBPQOS_TAG).done + +.PHONY: install rdt_make + +all: rdt_make + echo "Finished making $(WORK_DIR)" + +rdt_make: $(TAG_DONE_FLAG) + $(MAKE) -C $(WORK_DIR)/lib $(MORE_MAKE_FLAGS) + $(MAKE) -C $(WORK_DIR)/pqos $(MORE_MAKE_FLAGS) + $(MAKE) -C $(WORK_DIR)/rdtset $(MORE_MAKE_FLAGS) + echo "Make done" + +install: rdt_make + sudo $(PQOSINSTALLENV) $(MAKE) -C $(WORK_DIR) install PREFIX=/usr + +# clean repo +clean: + cd $(WORK_DIR) && git clean -xfd *.o + +$(WORK_DIR): + git clone $(LIBPQOS_URL) + +$(TAG_DONE_FLAG): $(WORK_DIR) + cd $(WORK_DIR); git fetch origin $(LIBPQOS_TAG); git checkout FETCH_HEAD + echo "git checkout $(LIBPQOS_TAG) done" + touch $@ diff --git a/src/package-list.mk b/src/package-list.mk new file mode 100644 index 0000000..f6a99b1 --- /dev/null +++ b/src/package-list.mk @@ -0,0 +1,30 @@ +# Upstream Package List +# +# Every tag is defined as its suggested default +# value, it can always be overriden when invoking Make + +LIBPQOS_URL = https://github.com/01org/intel-cmt-cat.git +LIBPQOS_TAG ?= v4.3.0 + +PMUTOOLS_URL = https://github.com/andikleen/pmu-tools +PMUTOOLS_TAG ?= master + +# collectd section +COLLECTD_URL = https://github.com/collectd/collectd + +# there are 2 collectd flavors: +# -"stable" - based on stable collectd release +# -"latest" - development version, based on main branch +ifeq ($(COLLECTD_FLAVOR), stable) +# using the most recent stable release + COLLECTD_TAG ?= 54f769929d7aafc8dd5162616af19a8e60cd5ae2 + COLLECTD_CONF_VARIANT_NAME = sample_configs-stable +endif +ifeq ($(COLLECTD_FLAVOR), latest) +# collectd code from main branch + COLLECTD_TAG ?= main + COLLECTD_CONF_VARIANT_NAME = sample_configs-latest +endif + +echo "Using COLLECTD_TAG: $(COLLECTD_TAG)" +echo "Using COLLECTD_CONF_VARIANT_NAME: $(COLLECTD_CONF_VARIANT_NAME)" diff --git a/src/pmu-tools/Makefile b/src/pmu-tools/Makefile new file mode 100644 index 0000000..cc7071d --- /dev/null +++ b/src/pmu-tools/Makefile @@ -0,0 +1,37 @@ +# makefile to build jevents library +# + +include ../package-list.mk +export XDG_CACHE_HOME=/usr/local/src +WORK_DIR = pmu-tools +TAG_DONE_FLAG = $(WORK_DIR)/.$(PMUTOOLS_TAG).done +MAKEFILE = Makefile + +.PHONY: install jevents_make + +all: jevents_make + echo "Finished making $(WORK_DIR)" + +jevents_make: $(TAG_DONE_FLAG) + cd $(WORK_DIR)/jevents + sed -i 's/lib64/lib/' $(WORK_DIR)/jevents/$(MAKEFILE) + sed -i 's/CFLAGS := -g -Wall -O2 -Wno-unused-result/CFLAGS := -g -Wall -O2 -Wno-unused-result -fPIC/' $(WORK_DIR)/jevents/$(MAKEFILE) + $(MAKE) -C $(WORK_DIR)/jevents + echo "Make done" + +install: jevents_make + sudo $(MAKE) -C $(WORK_DIR)/jevents install + ./$(WORK_DIR)/event_download.py --all + + +# clean repo +clean: + cd $(WORK_DIR) && git clean -xfd *.o + +$(WORK_DIR): + git clone $(PMUTOOLS_URL) + +$(TAG_DONE_FLAG): $(WORK_DIR) + cd $(WORK_DIR); git fetch origin $(PMUTOOLS_TAG); git checkout FETCH_HEAD + echo "git checkout $(PMUTOOLS_TAG) done" + touch $@