High CPU usage with clean Logstash install

The high CPU is probably JRuby JIT compiling at startup.

If logstash starts without a pipeline, it exits. Then the service manager notices this and starts it. Until a config is found, this will repeat.

In LS 6 there are many potential sources of configs when none are specified with -f or -e on the command line.

  1. From a module specified in logstash.yml
  2. From pipelines.yml
  3. From config defined in path.config in logstash.yml
  4. From config defined in config.string in logstash.yml
  5. From config defined in Elasticsearch via xpack centralised config management -
    see https://www.elastic.co/guide/en/logstash/6.0/configuring-centralized-pipelines.html

While the service continually restarts, one can fully edit any of the above settings and Logstash will just start working (if the config is found and is valid).

2 Likes