Receive data ONLY from specific containers

Hi all !

I’m running netdata as a docker container. The goal is to monitor containers only, but without monitoring the whole host at the same time. Alternatively, I don’t mind monitoring the host, as long as I don’t receive data from docker containers I’m not interested in.

For example I would like to have multiple netdata containers running at different ports, each one monitoring one or more specific containers ONLY.

Is something like this achievable with netdata?

Thank you!

To monitor containers only, disable all plugins except cgroups

[plugins]
	enable running new plugins = no
	proc = no
	ebpf = no
	cgroups = yes
	apps = no
	python.d = no
	go.d = no
	diskspace = no
	timex = no
	nfacct = no
	slabinfo = no
	perf = no
	fping = no
	ioping = no
	cups = no
	tc = no
	freeipmi = no
	charts.d = no
	node.d = no
	checks = no
	idlejitter = no

To filter out cgroups use the following option

[plugin:cgroups]
    enable by default cgroups matching =  !*/init.scope  !/system.slice/run-*.scope  *.scope  /machine.slice/*.service  /kubepods/pod*/*  /kubepods/*/pod*/*  !/kubepods*  !*/vcpu*  !*/emulator  !*.mount  !*.partition  !*.service  !*.socket  !*.slice  !*.swap  !*.user  !/  !/docker  !/libvirt  !/lxc  !/lxc/*/*  !/lxc.monitor*  !/lxc.pivot  !/lxc.payload  !/machine  !/qemu  !/system  !/systemd  !/user  * 

or enable/disable a particular group

[plugin:cgroups]
    enable cgroup dev-hugepages.mount = no

You can check the effective configuration at the http://localhost:19999/netdata.conf endpoint.

1 Like