Managed to reduce my ES container to just 1.
2023-11-13 00:38:53 [2023-11-12T16:38:53.789+00:00][INFO ][plugins.alerting] Registering resources for context "stack".
2023-11-13 00:38:53 [2023-11-12T16:38:53.846+00:00][WARN ][plugins.reporting.config] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
2023-11-13 00:38:53 [2023-11-12T16:38:53.851+00:00][WARN ][plugins.reporting.config] Found 'server.host: "0.0.0.0"' in Kibana configuration. Reporting is not able to use this as the Kibana server hostname. To enable PNG/PDF Reporting to work, 'xpack.reporting.kibanaServer.hostname: localhost' is automatically set in the configuration. You can prevent this message by adding 'xpack.reporting.kibanaServer.hostname: localhost' in kibana.yml.
2023-11-13 00:38:53 [2023-11-12T16:38:53.978+00:00][INFO ][plugins.cloudSecurityPosture] Registered task successfully [Task: cloud_security_posture-stats_task]
2023-11-13 00:38:54 [2023-11-12T16:38:54.079+00:00][INFO ][plugins.alerting] Registering resources for context "observability.slo".
2023-11-13 00:38:54 [2023-11-12T16:38:54.086+00:00][INFO ][plugins.alerting] Registering resources for context "observability.threshold".
2023-11-13 00:38:54 [2023-11-12T16:38:54.130+00:00][INFO ][plugins.alerting] Registering resources for context "ml.anomaly-detection".
2023-11-13 00:38:54 [2023-11-12T16:38:54.164+00:00][INFO ][plugins.alerting] Registering resources for context "observability.uptime".
2023-11-13 00:38:54 [2023-11-12T16:38:54.228+00:00][INFO ][plugins.alerting] Registering resources for context "observability.logs".
2023-11-13 00:38:54 [2023-11-12T16:38:54.234+00:00][INFO ][plugins.alerting] Registering resources for context "observability.metrics".
2023-11-13 00:38:54 [2023-11-12T16:38:54.472+00:00][INFO ][plugins.alerting] Registering resources for context "security".
2023-11-13 00:38:54 [2023-11-12T16:38:54.556+00:00][INFO ][plugins.assetManager] Server is NOT enabled
2023-11-13 00:38:54 [2023-11-12T16:38:54.573+00:00][INFO ][plugins.alerting] Registering resources for context "observability.apm".
2023-11-13 00:38:54 [2023-11-12T16:38:54.881+00:00][WARN ][plugins.screenshotting.config] Chromium sandbox provides an additional layer of protection, but is not supported for Linux Ubuntu 20.04 OS. Automatically setting 'xpack.screenshotting.browser.chromium.disableSandbox: true'.
2023-11-13 00:38:55 [2023-11-12T16:38:55.022+00:00][ERROR][elasticsearch-service] Unable to retrieve version information from Elasticsearch nodes. security_exception
2023-11-13 00:38:55 Root causes:
2023-11-13 00:38:55 security_exception: unable to authenticate user [kibana_system] for REST request [/_nodes?filter_path=nodes.*.version%2Cnodes.*.http.publish_address%2Cnodes.*.ip]
2023-11-13 00:38:57 [2023-11-12T16:38:57.119+00:00][INFO ][plugins.screenshotting.chromium] Browser executable: /usr/share/kibana/node_modules/@kbn/screenshotting-plugin/chromium/headless_shell-linux_x64/headless_shell
Now Kibana Container is unhealthy. Kibana server is not ready yet.
Because of this, my logstash container auto crashed.
2023-11-13 00:37:31 Using bundled JDK: /usr/share/logstash/jdk
2023-11-13 00:38:20 Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
2023-11-13 00:38:21 [2023-11-12T16:38:21,044][WARN ][deprecation.logstash.runner] NOTICE: Running Logstash as superuser is not recommended and won't be allowed in the future. Set 'allow_superuser' to 'false' to avoid startup errors in future releases.
2023-11-13 00:38:21 [2023-11-12T16:38:21,099][INFO ][logstash.runner ] Log4j configuration path used is: /usr/share/logstash/config/log4j2.properties
2023-11-13 00:38:21 [2023-11-12T16:38:21,102][INFO ][logstash.runner ] Starting Logstash {"logstash.version"=>"8.11.0", "jruby.version"=>"jruby 9.4.2.0 (3.1.0) 2023-03-08 90d2913fda OpenJDK 64-Bit Server VM 17.0.9+9 on 17.0.9+9 +indy +jit [x86_64-linux]"}
2023-11-13 00:38:21 [2023-11-12T16:38:21,109][INFO ][logstash.runner ] JVM bootstrap flags: [-Xms1g, -Xmx1g, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djruby.compile.invokedynamic=true, -XX:+HeapDumpOnOutOfMemoryError, -Djava.security.egd=file:/dev/urandom, -Dlog4j2.isThreadContextMapInheritable=true, -Dls.cgroup.cpuacct.path.override=/, -Dls.cgroup.cpu.path.override=/, -Djruby.regexp.interruptible=true, -Djdk.io.File.enableADS=true, --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED, --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, --add-opens=java.base/java.security=ALL-UNNAMED, --add-opens=java.base/java.io=ALL-UNNAMED, --add-opens=java.base/java.nio.channels=ALL-UNNAMED, --add-opens=java.base/sun.nio.ch=ALL-UNNAMED, --add-opens=java.management/sun.management=ALL-UNNAMED]
2023-11-13 00:38:21 [2023-11-12T16:38:21,706][WARN ][logstash.config.source.multilocal] Ignoring the 'pipelines.yml' file because modules or command line options are specified
2023-11-13 00:38:23 [2023-11-12T16:38:23,641][INFO ][logstash.agent ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled=>false}
2023-11-13 00:38:24 [2023-11-12T16:38:24,252][ERROR][logstash.agent ] Failed to execute action {:action=>LogStash::PipelineAction::Create/pipeline_id:main, :exception=>"LogStash::ConfigurationError", :message=>"Expected one of [^\\r\\n], \"\\r\", \"\\n\" at line 38, column 4 (byte 739) after # }", :backtrace=>["/usr/share/logstash/logstash-core/lib/logstash/compiler.rb:32:in `compile_imperative'", "org/logstash/execution/AbstractPipelineExt.java:239:in `initialize'", "org/logstash/execution/AbstractPipelineExt.java:173:in `initialize'", "/usr/share/logstash/logstash-core/lib/logstash/java_pipeline.rb:48:in `initialize'", "org/jruby/RubyClass.java:931:in `new'", "/usr/share/logstash/logstash-core/lib/logstash/pipeline_action/create.rb:49:in `execute'", "/usr/share/logstash/logstash-core/lib/logstash/agent.rb:386:in `block in converge_state'"]}
2023-11-13 00:38:24 [2023-11-12T16:38:24,289][INFO ][logstash.runner ] Logstash shut down.
2023-11-13 00:38:24 [2023-11-12T16:38:24,299][FATAL][org.logstash.Logstash ] Logstash stopped processing because of an error: (SystemExit) exit
2023-11-13 00:38:24 org.jruby.exceptions.SystemExit: (SystemExit) exit
2023-11-13 00:38:24 at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:795) ~[jruby.jar:?]
2023-11-13 00:38:24 at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:758) ~[jruby.jar:?]
2023-11-13 00:38:24 at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:90) ~[?:?]
2023-11-13 00:37:31 2023/11/12 16:37:31 Setting 'xpack.monitoring.enabled' from environment.
2023-11-13 00:37:31 2023/11/12 16:37:31 Setting 'node.name' from environment.