diff options
author | Andrew Moss <1043609+amoss@users.noreply.github.com> | 2020-02-21 15:06:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-21 15:06:31 +0100 |
commit | 81e39357aff382f90332567137b77bb293a2ce93 (patch) | |
tree | ccff2d06555679a865eba62e0616f35cf5abdd4f /build_external | |
parent | 19ef3f93792d382992afbdce74743d868eaa3074 (diff) |
Added support for cross-host docker-compose builds (#7754)
The new file in the build_external directory allow cross-host builds (i.e. building Netdata for a Debian system on a Fedora host). The build and execution is wrapped inside docker containers with an appropriate user-land, based on the package builder base images. These containers can be orchestrated into more complex testing environments (e.g. master-slave streaming setups or the ACLK). Rebuilding the netdata agent inside the containers is an incremental build-step (to improve dev time) rather than a clean install.
Diffstat (limited to 'build_external')
-rw-r--r-- | build_external/README.md | 120 | ||||
-rwxr-xr-x | build_external/bin/clean-install.sh | 49 | ||||
-rwxr-xr-x | build_external/bin/make-install.sh | 8 | ||||
-rw-r--r-- | build_external/clean-install-arch.Dockerfile | 52 | ||||
-rw-r--r-- | build_external/clean-install.Dockerfile | 36 | ||||
-rw-r--r-- | build_external/make-install.Dockerfile | 11 | ||||
-rw-r--r-- | build_external/projects/aclk-testing/agent-compose.yml | 19 | ||||
-rw-r--r-- | build_external/projects/aclk-testing/agent_netdata.conf | 7158 | ||||
-rw-r--r-- | build_external/projects/aclk-testing/configureVerneMQ.Dockerfile | 8 | ||||
-rw-r--r-- | build_external/projects/aclk-testing/docker-compose.yml | 51 | ||||
-rw-r--r-- | build_external/projects/aclk-testing/vernemq-compose.yml | 7 | ||||
-rw-r--r-- | build_external/projects/aclk-testing/vernemq.conf | 68 | ||||
-rw-r--r-- | build_external/projects/master-slaves/docker-compose.yml | 23 | ||||
-rw-r--r-- | build_external/projects/master-slaves/master_stream.conf | 140 | ||||
-rw-r--r-- | build_external/projects/master-slaves/slave_stream.conf | 144 | ||||
-rw-r--r-- | build_external/projects/only-agent/docker-compose.yml | 8 |
16 files changed, 7902 insertions, 0 deletions
diff --git a/build_external/README.md b/build_external/README.md new file mode 100644 index 0000000000..8f3c86d406 --- /dev/null +++ b/build_external/README.md @@ -0,0 +1,120 @@ +# External build-system + +This wraps the build-system in Docker so that the host system and the target system are +decoupled. This allows: +* Cross-compilation (e.g. linux development from MacOS) +* Cross-distro (e.g. using CentOS user-land while developing on Debian) +* Multi-host scenarios (e.g. master/slave configurations) +* Bleeding-edge sceneraios (e.g. using the ACLK (**currently for internal-use only**)) + +The advantage of these scenarios is that they allow **reproducible** builds and testing +for developers. This is the first iteration of the build-system to allow the team to use +it and get used to it. + +For configurations that involve building and running the agent alone, we still use +`docker-compose` for consistency with more complex configurations. The more complex +configurations allow the agent to be run in conjunction with parts of the cloud +infrastructure (these parts of the code are not public), or with external brokers +(such as VerneMQ for MQTT), or with other external tools (such as TSDB to allow the agent to +export metrics). Note: no external TSDB scenarios are available in the first iteration, +they will be added in subsequent iterations. + +This differs from the packaging dockerfiles as it designed to be used for local development. +The main difference is that these files are designed to support incremental compilation in +the following way: + +1. The initial build should be performed using `bin/clean-install.sh` to create a docker + image with the agent built from the source tree and installed into standard system paths + using `netdata-installer.sh`. In addition to the steps performed by the standard packaging + builds a manifest is created to allow subsequent builds to be made incrementally using + `make` inside the container. Any libraries that are required for 'bleeding-edge' development + are added on top of the standard install. +2. When the `bin/make-install.sh` script is used the docker container will be updated with + a sanitized version of the current build-tree. The manifest will be used to line up the + state of the incoming docker cache with `make`'s view of the file-system according to the + manifest. This means the `make install` inside the container will only rebuild changes + since the last time the disk image was created. + +The exact improvement on the compile-cycle depends on the speed of the network connection +to pull the netdata dependencies, but should shrink the time considerably. For example, +on a macbook pro the initial install takes about 1min + network delay [Note: there is +something bad happening with the standard installer at the end of the container build as +it tries to kill the running agent - this is very slow and bad] and the incremental +step only takes 15s. On a debian host with a fast network this reduces 1m30 -> 13s. + +## Examples + +1. Simple cross-compilation / cross-distro builds. + +```bash +build_external/bin/clean-install.sh arch current +docker run -it --rm arch_current_dev +echo >>daemon/main.c # Simulate edit by touching file +build_external/bin/make-install.sh arch current +docker run -it --rm arch_current_dev +``` + +Currently there is no detection of when the installer needs to be rerun (really this is +when the `autoreconf` / `configure` step must be rerun). Netdata was not written with +multi-stage builds in mind and we need to work out how to do this in the future. For now +it is up to you to know when you need to rerun the clean build step. + +```bash +build_external/bin/clean-install.sh arch current +build_external/bin/clean-install.sh ubuntu 19.10 +docker run -it --rm arch_current_dev +echo >>daemon/main.c # Simulate edit by touching file +build_external/bin/make-install.sh arch current +docker run -it --rm arch_current_dev +echo >>daemon/daemon.c # Simulate second edit step +build_external/bin/make-install.sh arch current # Observe a single file is rebuilt +build_external/bin/make-install.sh arch current # Observe both files are rebuilt +``` + +The state of the build in the two containers is independent. + +2. Single agent config in docker-compose + +This functions the same as the previous example but is wrapped in docker-compose to +allow injection into more complex test configurations. + +```bash +Distro=debian Version=10 docker-compose -f projects/only-agent/docker-compose.yml up +``` + +Note: it is possible to run multiple copies of the agent using the `--scale` option for +`docker-compose up`. + +```bash +Distro=debian Version=10 docker-compose -f projects/only-agent/docker-compose.yml up --scale agent=3 +``` + +3. A simple master-slave scenario + +```bash +# Need to call clean-install on the configs used in the master/slave containers +docker-compose -f master-slaves/docker-compose.yml up --scale agent_slave1=2 +``` + +Note: this is not production ready yet, but it is left in so that we can see how it behaves +and improve it. Currently it produces the following problems: + * Only the base-configuration in the compose without scaling works. + * The containers are hard-coded in the compose. + * There is no way to separate the agent configurations, so running multiple agent slaves + wth the same GUID kills the master which exits with a fatal condition. + +4. The ACLK + +This is for internal use only as it requires access to a private repo. Clone the vernemq-docker +repo and follow the instructions within to build an image called `vernemq`. + +```bash +build_external/bin/clean-install.sh arch current # Only needed first time +docker-compose -f build_external/projects/aclk-testing/vernemq-compose.yml -f build_external/projects/aclk-testing/agent-compose.yml up --build +``` + +Notes: +* We are currently limited to arch because of restrictions on libwebsockets +* There is not yet a good way to configure the target agent container from the docker-compose command line. +* Several other containers should be in this compose (a paho client, tshark etc). + diff --git a/build_external/bin/clean-install.sh b/build_external/bin/clean-install.sh new file mode 100755 index 0000000000..032cb09ca4 --- /dev/null +++ b/build_external/bin/clean-install.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env bash + +DISTRO="$1" +VERSION="$2" +BuildBase="$(cd "$(dirname "$0")" && cd .. && pwd)" + +# This is temporary - not all of the package-builder images from the helper-images repo +# are available on Docker Hub. When everything falls under the "happy case" below this +# can be deleted in a future iteration. This is written in a weird way for portability, +# can't rely on bash 4.0+ to allow case fall-through with ;& + +if cat <<HAPPY_CASE | grep "$DISTRO-$VERSION" + opensuse-15.1 + fedora-29 + debian-9 + debian-8 + fedora-30 + opensuse-15.0 + ubuntu-19.04 + centos-7 + fedora-31 + ubuntu-16.04 + ubuntu-18.04 + ubuntu-19.10 + debian-10 + centos-8 + ubuntu-1804 + ubuntu-1904 + ubuntu-1910 + debian-stretch + debian-jessie + debian-buster +HAPPY_CASE +then + docker build -f "$BuildBase/clean-install.Dockerfile" -t "${DISTRO}_${VERSION}_dev" "$BuildBase/.." \ + --build-arg "DISTRO=$DISTRO" --build-arg "VERSION=$VERSION" --build-arg ACLK=yes \ + --build-arg EXTRA_CFLAGS="-DACLK_SSL_ALLOW_SELF_SIGNED" +else + case "$DISTRO-$VERSION" in + arch-current) + docker build -f "$BuildBase/clean-install-arch.Dockerfile" -t "${DISTRO}_${VERSION}_dev" "$BuildBase/.." \ + --build-arg "DISTRO=$DISTRO" --build-arg "VERSION=$VERSION" --build-arg ACLK=yes \ + --build-arg EXTRA_CFLAGS="-DACLK_SSL_ALLOW_SELF_SIGNED" + ;; + *) + echo "Unknown $DISTRO-$VERSION" + ;; + esac +fi diff --git a/build_external/bin/make-install.sh b/build_external/bin/make-install.sh new file mode 100755 index 0000000000..fe4f7c9e83 --- /dev/null +++ b/build_external/bin/make-install.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +DISTRO="$1" +VERSION="$2" +BuildBase="$(cd "$(dirname "$0")" && cd .. && pwd)" + +docker build -f "$BuildBase/make-install.Dockerfile" -t "${DISTRO}_${VERSION}_dev:latest" "$BuildBase/.." \ + --build-arg "DISTRO=${DISTRO}" --build-arg "VERSION=${VERSION}" diff --git a/build_external/clean-install-arch.Dockerfile b/build_external/clean-install-arch.Dockerfile new file mode 100644 index 0000000000..7725ae3052 --- /dev/null +++ b/build_external/clean-install-arch.Dockerfile @@ -0,0 +1,52 @@ +FROM archlinux/base:latest + +# There is some redundancy between this file and the archlinux Dockerfile in the helper images +# repo and also with the clean-install.Dockefile. Once the help image is availabled on Docker +# Hub this file can be deleted. + +RUN pacman -Sy +RUN pacman --noconfirm --needed -S autoconf \ + autoconf-archive \ + autogen \ + automake \ + gcc \ + make \ + git \ + libuv \ + lz4 \ + netcat \ + openssl \ + pkgconfig \ + python \ + libvirt \ + libwebsockets + +ARG ACLK=no +ARG EXTRA_CFLAGS +COPY . /opt/netdata/source +WORKDIR /opt/netdata/source + +RUN git config --global user.email "root@container" +RUN git config --global user.name "Fake root" + +# RUN make distclean -> not safe if tree state changed on host since last config +# Kill everything that is not in .gitignore preserving any fresh changes, i.e. untracked changes will be +# deleted but local changes to tracked files will be preserved. +RUN if git status --porcelain | grep '^[MADRC]'; then \ + git stash && git clean -dxf && (git stash apply || true) \ + else \ + git clean -dxf ; \ + fi + +# Not everybody is updating distclean properly - fix. +RUN find . -name '*.Po' -exec rm \{\} \; +RUN rm -rf autom4te.cache +RUN rm -rf .git/ +RUN find . -type f >/opt/netdata/manifest + +RUN CFLAGS="-O1 -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -DNETDATA_INTERNAL_CHECKS=1\ + -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1 ${EXTRA_CFLAGS}" ./netdata-installer.sh --disable-lto + +RUN ln -sf /dev/stdout /var/log/netdata/access.log +RUN ln -sf /dev/stdout /var/log/netdata/debug.log +RUN ln -sf /dev/stderr /var/log/netdata/error.log diff --git a/build_external/clean-install.Dockerfile b/build_external/clean-install.Dockerfile new file mode 100644 index 0000000000..bc1bae1f45 --- /dev/null +++ b/build_external/clean-install.Dockerfile @@ -0,0 +1,36 @@ +ARG DISTRO=arch +ARG VERSION=current +FROM netdata/package-builders:${DISTRO}${VERSION} + +ARG ACLK=no +ARG EXTRA_CFLAGS + +COPY . /opt/netdata/source +WORKDIR /opt/netdata/source + +RUN git config --global user.email "root@container" +RUN git config --global user.name "Fake root" + +# RUN make distclean -> not safe if tree state changed on host since last config +# Kill everything that is not in .gitignore preserving any fresh changes, i.e. untracked changes will be +# deleted but local changes to tracked files will be preserved. +RUN if git status --porcelain | grep '^[MADRC]'; then \ + git stash && git clean -dxf && (git stash apply || true) \ + else \ + git clean -dxf ; \ + fi + +# Not everybody is updating distclean properly - fix. +RUN find . -name '*.Po' -exec rm \{\} \; +RUN rm -rf autom4te.cache +RUN rm -rf .git/ +RUN find . -type f >/opt/netdata/manifest + +RUN CFLAGS="-O1 -ggdb -Wall -Wextra -Wformat-signedness -fstack-protector-all -DNETDATA_INTERNAL_CHECKS=1\ + -D_FORTIFY_SOURCE=2 -DNETDATA_VERIFY_LOCKS=1 ${EXTRA_CFLAGS}" ./netdata-installer.sh --disable-lto + +RUN ln -sf /dev/stdout /var/log/netdata/access.log +RUN ln -sf /dev/stdout /var/log/netdata/debug.log +RUN ln -sf /dev/stderr /var/log/netdata/error.log + +CMD ["/usr/sbin/netdata","-D"]
\ No newline at end of file diff --git a/build_external/make-install.Dockerfile b/build_external/make-install.Dockerfile new file mode 100644 index 0000000000..1341b58480 --- /dev/null +++ b/build_external/make-install.Dockerfile @@ -0,0 +1,11 @@ +ARG DISTRO=arch +ARG VERSION=current + +FROM ${DISTRO}_${VERSION}_dev:latest + +# Sanitize new source tree by removing config-time state +COPY . /opt/netdata/latest +WORKDIR /opt/netdata/latest +RUN while read -r f; do cp -p "$f" "../source/$f"; done <../manifest +WORKDIR /opt/netdata/source +RUN make install diff --git a/build_external/projects/aclk-testing/agent-compose.yml b/build_external/projects/aclk-testing/agent-compose.yml new file mode 100644 index 0000000000..265ff34a9f --- /dev/null +++ b/build_external/projects/aclk-testing/agent-compose.yml @@ -0,0 +1,19 @@ +version: '3.3' +services: + agent_master: + build: + context: ../../.. + dockerfile: build_external/make-install.Dockerfile + args: + - DISTRO=arch + - VERSION=current + image: arch_current_dev:latest + command: > + sh -c "echo -n 00000000-0000-0000-0000-000000000000 >/etc/netdata/claim.d/claimed_id && + echo '[agent_cloud_link]' >>/etc/netdata/netdata.conf && + echo ' agent cloud link hostname = vernemq' >>/etc/netdata/netdata.conf && + echo ' agent cloud link port = 9002' >>/etc/netdata/netdata.conf && + /usr/sbin/netdata -D" + ports: + - 20000:19999 + diff --git a/build_external/projects/aclk-testing/agent_netdata.conf b/build_external/projects/aclk-testing/agent_netdata.conf new file mode 100644 index 0000000000..5938591a32 --- /dev/null +++ b/build_external/projects/aclk-testing/agent_netdata.conf @@ -0,0 +1,7158 @@ +# netdata configuration
+#
+# You can download the latest version of this file, using:
+#
+# wget -O /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
+# or
+# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
+#
+# You can uncomment and change any of the options below.
+# The value shown in the commented settings, is the default value.
+#
+
+# global netdata configuration
+
+[global]
+ # glibc malloc arena max for plugins = 1
+ # glibc malloc arena max for netdata = 1
+ # hostname = b073e16793c4
+ # history = 3996
+ # update every = 1
+ # config directory = /etc/netdata
+ # stock config directory = /usr/lib/netdata/conf.d
+ # log directory = /var/log/netdata
+ # web files directory = /usr/share/netdata/web
+ # cache directory = /var/cache/netdata
+ # lib directory = /var/lib/netdata
+ # home directory = /var/cache/netdata
+ # plugins directory = "/usr/libexec/netdata/plugins.d" "/etc/netdata/custom-plugins.d"
+ # memory mode = dbengine
+ # page cache size = 32
+ # dbengine disk space = 256
+ # host access prefix =
+ # memory deduplication (ksm) = yes
+ # TZ environment variable = :/etc/localtime
+ # timezone = Etc/UTC
+ # debug flags = 0x0000000000000000
+ # debug log = /var/log/netdata/debug.log
+ # error log = /var/log/netdata/error.log
+ # access log = /var/log/netdata/access.log
+ # facility log = daemon
+ # errors flood protection period = 1200
+ # errors to trigger flood protection = 200
+ # run as user = netdata
+ # OOM score = 1000
+ # process scheduling policy = idle
+ # pthread stack size = 8388608
+ # cleanup obsolete charts after seconds = 3600
+ # gap when lost iterations above = 1
+ # cleanup orphan hosts after seconds = 3600
+ # delete obsolete charts files = yes
+ # delete orphan hosts files = yes
+ # enable zero metrics = no
+
+[web]
+ # ssl key = /etc/netdata/ssl/key.pem
+ # ssl certificate = /etc/netdata/ssl/cert.pem
+ # ses max window = 15
+ # des max window = 15
+ # mode = static-threaded
+ # listen backlog = 4096
+ # default port = 19999
+ # bind to = *
+ # web files owner = netdata
+ # web files group = netdata
+ # disconnect idle clients after seconds = 60
+ # timeout for first request = 60
+ # accept a streaming request every seconds = 0
+ # respect do not track policy = no
+ # x-frame-options response header =
+ # allow connections from = localhost *
+ # allow connections by dns = heuristic
+ # allow dashboard from = localhost *
+ # allow dashboard by dns = heuristic
+ # allow badges from = *
+ # allow badges by dns = heuristic
+ # allow streaming from = *
+ # allow streaming by dns = heuristic
+ # allow netdata.conf from = localhost fd* 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
+ # allow netdata.conf by dns = no
+ # allow management from = localhost
+ # allow management by dns = heuristic
+ # enable gzip compression = yes
+ # gzip compression strategy = default
+ # gzip compression level = 3
+ # web server threads = 6
+ # web server max sockets = 262144
+
+[plugins]
+ # PATH environment variable = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin
+ # PYTHONPATH environment variable =
+ # checks = no
+ # proc = yes
+ # diskspace = yes
+ # cgroups = yes
+ # tc = yes
+ # idlejitter = yes
+ # enable running new plugins = yes
+ # check for new plugins every = 60
+ # slabinfo = no
+ # go.d = yes
+ # node.d = yes
+ # apps = yes
+ # charts.d = yes
+ # fping = yes
+ # python.d = yes
+ # perf = yes
+ # ioping = yes
+
+[health]
+ # silencers file = /var/lib/netdata/health.silencers.json
+ # enabled = yes
+ # default repeat warning = never
+ # default repeat critical = never
+ # in memory max health log entries = 1000
+ # script to execute on alarm = /usr/libexec/netdata/plugins.d/alarm-notify.sh
+ # stock health configuration directory = /usr/lib/netdata/conf.d/health.d
+ # health configuration directory = /etc/netdata/health.d
+ # rotate log every lines = 2000
+ # run at least every seconds = 10
+ # postpone alarms during hibernation for seconds = 60
+
+[registry]
+ # enabled = no
+ # registry db directory = /var/lib/netdata/registry
+ # netdata unique id file = /var/lib/netdata/registry/netdata.public.unique.id
+ # registry db file = /var/lib/netdata/registry/registry.db
+ # registry log file = /var/lib/netdata/registry/registry-log.db
+ # registry save db every new entries = 1000000
+ # registry expire idle persons days = 365
+ # registry domain =
+ # registry to announce = https://registry.my-netdata.io
+ # registry hostname = b073e16793c4
+ # verify browser cookies support = yes
+ # max URL length = 1024
+ # max URL name length = 50
+ # netdata management api key file = /var/lib/netdata/netdata.api.key
+ # allow from = *
+ # allow by dns = heuristic
+
+[cloud]
+ # cloud base url = https://netdata.cloud
+
+[backend]
+ # host tags =
+ # enabled = no
+ # data source = average
+ # type = graphite
+ # destination = localhost
+ # prefix = netdata
+ # hostname = b073e16793c4
+ # update every = 10
+ # buffer on failures = 10
+ # timeout ms = 20000
+ # send names instead of ids = yes
+ # send charts matching = *
+ # send hosts matching = localhost *
+
+[statsd]
+ # enabled = yes
+ # update every (flushInterval) = 1
+ # udp messages to process at once = 10
+ # create private charts for metrics matching = *
+ # max private charts allowed = 200
+ # max private charts hard limit = 1000
+ # private charts memory mode = dbengine
+ # private charts history = 3996
+ # decimal detail = 1000
+ # disconnect idle tcp clients after seconds = 600
+ # private charts hidden = no
+ # histograms and timers percentile (percentThreshold) = 95.00000
+ # add dimension for number of events received = yes
+ # gaps on gauges (deleteGauges) = no
+ # gaps on counters (deleteCounters) = no
+ # gaps on meters (deleteMeters) = no
+ # gaps on sets (deleteSets) = no
+ # gaps on histograms (deleteHistograms) = no
+ # gaps on timers (deleteTimers) = no
+ # statsd server max TCP sockets = 262144
+ # listen backlog = 4096
+ # default port = 8125
+ # bind to = udp:localhost tcp:localhost
+
+
+# per plugin configuration
+
+[plugin:cgroups]
+ # cgroups plugin resource charts = yes
+ # update every = 1
+ # check for new cgroups every = 10
+ # use unified cgroups = no
+ # containers priority = 40000
+ # enable cpuacct stat (total CPU) = auto
+ # enable cpuacct usage (per core CPU) = auto
+ # enable memory (used mem including cache) = auto
+ # enable detailed memory = auto
+ # enable memory limits fail count = auto
+ # enable swap memory = auto
+ # enable blkio bandwidth = auto
+ # enable blkio operations = auto
+ # enable blkio throttle bandwidth = auto
+ # enable blkio throttle operations = auto
+ # enable blkio queued operations = auto
+ # enable blkio merged operations = auto
+ # enable cpu pressure = auto
+ # enable io some pressure = auto
+ # enable io full pressure = auto
+ # enable memory some pressure = auto
+ # enable memory full pressure = auto
+ # recheck zero blkio every iterations = 10
+ # recheck zero memory failcnt every iterations = 10
+ # recheck zero detailed memory every iterations = 10
+ # enable systemd services = yes
+ # enable systemd services detailed memory = no
+ # report used memory without cache = yes
+ # path to /sys/fs/cgroup/cpuacct = /sys/fs/cgroup/cpu,cpuacct
+ # path to /sys/fs/cgroup/cpuset = /sys/fs/cgroup/cpuset
+ # path to /sys/fs/cgroup/blkio = /sys/fs/cgroup/blkio
+ # path to /sys/fs/cgroup/memory = /sys/fs/cgroup/memory
+ # path to /sys/fs/cgroup/devices = /sys/fs/cgroup/devices
+ # max cgroups to allow = 1000
+ # max cgroups depth to monitor = 0
+ # enable new cgroups detected at run time = yes
+ # enable by default cgroups matching = !*/init.scope !/system.slice/run-*.scope *.scope /machine.slice/*.service !*/vcpu* !*/emulator !*.mount !*.partition !*.service !*.socket !*.slice !*.swap !*.user !/ !/docker !/libvirt !/lxc !/lxc/*/* !/lxc.monitor !/lxc.pivot !/lxc.payload !/machine !/qemu !/system !/systemd !/user *
+ # search for cgroups in subpaths matching = !*/init.scope !*-qemu !*.libvirt-qemu !/init.scope !/system !/systemd !/user !/user.slice !/lxc/*/* !/lxc.monitor !/lxc.payload/*/* *
+ # script to get cgroup names = /usr/libexec/netdata/plugins.d/cgroup-name.sh
+ # script to get cgroup network interfaces = /usr/libexec/netdata/plugins.d/cgroup-network
+ # run script to rename cgroups matching = !/ !*.mount !*.socket !*.partition /machine.slice/*.service !*.service !*.slice !*.swap !*.user !init.scope !*.scope/vcpu* !*.scope/emulator *.scope *docker* *lxc* *qemu* *kubepods* *.libvirt-qemu *
+ # cgroups to match as systemd services = !/system.slice/*/*.service /system.slice/*.service
+
+[plugin:proc]
+ # netdata server resources = yes
+ # /proc/pagetypeinfo = no
+ # /proc/stat = yes
+ # /proc/uptime = yes
+ # /proc/loadavg = yes
+ # /proc/sys/kernel/random/entropy_avail = yes
+ # /proc/pressure = yes
+ # /proc/interrupts = yes
+ # /proc/softirqs = yes
+ # /proc/vmstat = yes
+ # /proc/meminfo = yes
+ # /sys/kernel/mm/ksm = yes
+ # /sys/block/zram = yes
+ # /sys/devices/system/edac/mc = yes
+ # /sys/devices/system/node = yes
+ # /proc/net/dev = yes
+ # /proc/net/sockstat = yes
+ # /proc/net/sockstat6 = yes
+ # /proc/net/netstat = yes
+ # /proc/net/snmp = yes
+ # /proc/net/snmp6 = yes
+ # /proc/net/sctp/snmp = yes
+ # /proc/net/softnet_stat = yes
+ # /proc/net/ip_vs/stats = yes
+ # /proc/net/stat/conntrack = yes
+ # /proc/net/stat/synproxy = yes
+ # /proc/diskstats = yes
+ # /proc/mdstat = yes
+ # /proc/net/rpc/nfsd = yes
+ # /proc/net/rpc/nfs = yes
+ # /proc/spl/kstat/zfs/arcstats = yes
+ # /sys/fs/btrfs = yes
+ # ipc = yes
+ # /sys/class/power_supply = yes
+
+[plugin:proc:diskspace]
+ # remove charts of unmounted disks = yes
+ # update every = 1
+ # check for new mount points every = 15
+ # exclude space metrics on paths = /proc/* /sys/* /var/run/user/* /run/user/* /snap/* /var/lib/docker/*
+ # exclude space metrics on filesystems = *gvfs *gluster* *s3fs *ipfs *davfs2 *httpfs *sshfs *gdfs *moosefs fusectl
+ # space usage for all disks = auto
+ # inodes usage for all disks = auto
+
+[plugin:tc]
+ # script to run to get tc values = /usr/libexec/netdata/plugins.d/tc-qos-helper.sh
+
+[plugin:idlejitter]
+ # loop time in ms = 20
+
+[plugin:go.d]
+ # update every = 1
+ # command options =
+
+[plugin:node.d]
+ # update every = 1
+ # command options =
+
+[plugin:apps]
+ # update every = 1
+ # command options =
+
+[plugin:charts.d]
+ # update every = 1
+ # command options =
+
+[plugin:fping]
+ # update every = 1
+ # command options =
+
+[plugin:python.d]
+ # update every = 1
+ # command options =
+
+[plugin:perf]
+ # update every = 1
+ # command options =
+
+[plugin:ioping]
+ # update every = 1
+ # command options =
+
+[plugin:proc:/proc/stat]
+ # cpu utilization = yes
+ # per cpu core utilization = yes
+ # cpu interrupts = yes
+ # context switches = yes
+ # processes started = yes
+ # processes running = yes
+ # keep per core files open = yes
+ # keep cpuidle files open = yes
+ # core_throttle_count = auto
+ # package_throttle_count = no
+ # cpu frequency = yes
+ # cpu idle states = yes
+ # core_throttle_count filename to monitor = /sys/devices/system/cpu/%s/thermal_throttle/core_throttle_count
+ # package_throttle_count filename to monitor = /sys/devices/system/cpu/%s/thermal_throttle/package_throttle_count
+ # scaling_cur_freq filename to monitor = /sys/devices/system/cpu/%s/cpufreq/scaling_cur_freq
+ # time_in_state filename to monitor = /sys/devices/system/cpu/%s/cpufreq/stats/time_in_state
+ # schedstat filename to monitor = /proc/schedstat
+ # cpuidle name filename to monitor = /sys/devices/system/cpu/cpu%zu/cpuidle/state%zu/name
+ # cpuidle time filename to monitor = /sys/devices/system/cpu/cpu%zu/cpuidle/state%zu/time
+ # filename to monitor = /proc/stat
+
+[plugin:proc:diskspace:/]
+ # space usage = auto
+ # inodes usage = auto
+
+[plugin:proc:diskspace:/dev]
+ # space usage = auto
+ # inodes usage = auto
+
+[plugin:proc:diskspace:/sys/fs/cgroup]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/systemd]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/cpu,cpuacct]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/devices]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/blkio]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/perf_event]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/rdma]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/net_cls,net_prio]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/pids]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/cpuset]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/memory]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/fs/cgroup/freezer]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/dev/shm]
+ # space usage = auto
+ # inodes usage = auto
+
+[plugin:proc:diskspace:/etc/resolv.conf]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/etc/hostname]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/etc/hosts]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/proc/asound]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/proc/acpi]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/proc/kcore]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/proc/keys]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/proc/timer_list]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/proc/sched_debug]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:diskspace:/sys/firmware]
+ # space usage = no
+ # inodes usage = no
+
+[plugin:proc:/proc/uptime]
+ # filename to monitor = /proc/uptime
+
+[plugin:proc:/proc/loadavg]
+ # filename to monitor = /proc/loadavg
+ # enable load average = yes
+ # enable total processes = yes
+
+[plugin:proc:/proc/sys/kernel/random/entropy_avail]
+ # filename to monitor = /proc/sys/kernel/random/entropy_avail
+
+[plugin:proc:/proc/pressure]
+ # base path of pressure metrics = /proc/pressure
+ # enable cpu some pressure = yes
+ # enable memory some pressure = yes
+ # enable memory full pressure = yes
+ # enable io some pressure = yes
+ # enable io full pressure = yes
+
+[plugin:proc:/proc/interrupts]
+ # interrupts per core = auto
+ # filename to monitor = /proc/interrupts
+
+[plugin:proc:/proc/softirqs]
+ # interrupts per core = auto
+ # filename to monitor = /proc/softirqs
+
+[plugin:proc:/proc/vmstat]
+ # swap i/o = auto
+ # disk i/o = yes
+ # memory page faults = yes
+ # system-wide numa metric summary = auto
+ # filename to monitor = /proc/vmstat
+
+[plugin:proc:/sys/devices/system/node]
+ # directory to monitor = /sys/devices/system/node
+ # enable per-node numa metrics = auto
+
+[plugin:proc:/proc/meminfo]
+ # system ram = yes
+ # system swap = auto
+ # hardware corrupted ECC = auto
+ # committed memory = yes
+ # write |