Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming convention of LXD container graphs keep changing between versions #11503

Closed
Kramerican opened this issue Sep 13, 2021 · 4 comments
Closed
Labels
area/collectors Everything related to data collection question

Comments

@Kramerican
Copy link

Bug report summary

Up until Netdata 1.28 (at least) I could stream statistics for my LXD containers (using labels for example) using the convention:

cgroup_containername.cpu (or whatever I wanted)

Now I had to set up some new environments, and in the latest nightly - v1.31 - this has changed yet again. Now I need to access metrics using:

cgroup_lxc-payload-containername.cpu

Why does this keep changing?

This forces me to do a platform-wide upgrade and change lots of code to match this new naming convention so I can stream my labels properly. This is rather annoying and this is not the first time this has happened! I've seen this happen 3 or 4 times already in the years I've used Netdata, and is one of the primary reasons I no longer allow Netdata to auto-update as these are production systems that need to work. (not to mention the occasional breaking build which has accidentally been released into the wild...).

OS / Environment

Ubuntu in various versions 18+

Netdata version

Specifically v1.28 vs 1.31 in this case.

Installation method

kickstart

Expected behavior

Consistent behavior with regards to the naming convention of graphs for LXC containers.

Followup question:

I cannot find any documentation on installing a specific version, as I wanted to try and install v1.28 in the new systems to - well, save me some work first of all and second: Make sure this is Netdata acting up and not some changes in LXD/LXC which is causing this, as I realize this might not be the fault of Netdata at all.

@Kramerican Kramerican added bug needs triage Issues which need to be manually labelled labels Sep 13, 2021
@Kramerican
Copy link
Author

I managed to do a test just now on one of the older systems, where I upgraded from 1.28 to 1.31 with:

bash <(curl -Ss https://my-netdata.io/kickstart.sh) --no-updates --dont-wait --stable-channel --reinstall

And the reference to my containers have now indeed been "updated" to:

cgroup_lxc-payload-containername

So this is definitely a change in Netdata, and not something in newer versions of Ubuntu kernel or LXD as I thought it might be.

So, I would kindly request that you settle on a format once and for all and stop changing this around, if possible! :D

@ilyam8
Copy link
Member

ilyam8 commented Sep 14, 2021

Hi, @Kramerican.

Let's see. cgroup.plugin uses cgroup-name.sh bash script to map id's into names. These are the changes since v1.28.0

[ilyam@pc ~]$ diff v1.28.0 master
430a431,438
>   elif [[ ${CGROUP} =~ machine.slice_machine.*-lxc ]]; then
>     # libvirtd / lxc containers
> 	# examples:
> 	# before: machine.slice machine-lxc/x2d969/x2dhubud0xians01.scope
>     # after:  lxc/hubud0xians01
> 	# before: machine.slice_machine-lxc/x2d969/x2dhubud0xians01.scope/libvirt_init.scope
> 	# after:  lxc/hubud0xians01/libvirt_init
>     NAME="lxc/$(echo "${CGROUP}" | sed 's/machine.slice_machine.*-lxc//; s/\/x2d[[:digit:]]*//; s/\/x2d//g; s/\.scope//g')"

Added in #11006


Could you show

grep "is called" error.log | grep lxc

@ilyam8 ilyam8 added question area/collectors Everything related to data collection and removed bug needs triage Issues which need to be manually labelled labels Oct 5, 2021
@ilyam8
Copy link
Member

ilyam8 commented Oct 5, 2021

We will try to be more careful with such changes in the future. Thanks for reporting @Kramerican.

@ilyam8 ilyam8 closed this as completed Oct 5, 2021
@webdock-io
Copy link

Hello

This has changed again in v1.34.1

Now the graphs are available via. cgroup_*

While on v. 1.31.0 where most of our hosts are right now, the graphs are at cgroup_lxc-payload-*

Can we please stop changing this back and forth? Can I count on you sticking to the current, shorter naming convention of cgroup_* ?

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collectors Everything related to data collection question
Projects
None yet
Development

No branches or pull requests

3 participants