How can I set the option for ls.cgroup.cpuacct.path.override and ls.cgroup.cpu.path.override in Docker?


#1

Hi!
I'm running Logstash as a docker container. In the debug logs, I get very frequent message like this;

logstash_1 | [2018-11-28T15:30:32,132][DEBUG][logstash.instrument.periodicpoller.cgroup.cpuacctresource] File /sys/fs/cgroup/cpuacct/docker//cpuacct.usage cannot be found, try providing an override 'ls.cgroup.cpuacct.path.override' in the Logstash JAVA_OPTS environment variable
logstash_1 | [2018-11-28T15:30:32,145][DEBUG][logstash.instrument.periodicpoller.cgroup.cpuresource] File /sys/fs/cgroup/cpu/docker//cpu.cfs_period_us cannot be found, try providing an override 'ls.cgroup.cpu.path.override' in the Logstash JAVA_OPTS environment variable
logstash_1 | [2018-11-28T15:30:32,157][DEBUG][logstash.instrument.periodicpoller.cgroup.cpuresource] File /sys/fs/cgroup/cpu/docker//cpu.cfs_quota_us cannot be found, try providing an override 'ls.cgroup.cpu.path.override' in the Logstash JAVA_OPTS environment variable

My two questions are:

  • To which value should I set these options?
  • How can I set them, when I run a docker container (and do not want to replace the whole jvm.options config file - I use the default one and do not touch it).

For the former, I have the impression that I should set it simply to "/", but as I fail to actually set it, I cannot test that.

I've tried to pass an environment variable in my docker-compose file like this:

      # This does not seem to work:
      - LS_JAVA_OPTS="ls.cgroup.cpuacct.path.override=/ ls.cgroup.cpu.path.override=/"

but during startup I see no indication of the value being picked up. I use debug level, and config.debug=true, but I see nothing.

Any hint on this?


(Guy Boertje) #2

This is the change we made to the Elastic Logstash Docker image


#3

Hi Guy!

Thanks a lot for the quick reply! I updated my docker image to 6.5 and it solved the problem!

Apparently, I should have put -D in front of the settings. Good to know for next time!