root@k8s-master-32:~# bash build-command.sh 2025051616 DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/buildx/
root@k8s-vip-41:~# vim /etc/haproxy/haproxy.cfg listen web2-tomcat bind 10.200.17.188:81 mode http balance roundrobin server 10.200.17.38 10.200.17.38:30092 check inter 2s fall 3 rise 5 server 10.200.17.39 10.200.17.39:30092 check inter 2s fall 3 rise 5 server 10.200.17.40 10.200.17.40:30092 check inter 2s fall 3 rise 5 # 重启haproxy root@k8s-vip-41:~# systemctl restart haproxy
root@logstash-50:/etc/logstash/conf.d# cd root@logstash-50:~# cd /etc/logstash/conf.d/ root@logstash-50:/etc/logstash/conf.d# vim filebeat-kafka-to-logstash-es.conf input { kafka { bootstrap_servers => "10.200.17.54:9092,10.200.17.55:9092,10.200.17.56:9092" topics => ["filebeat-magedu-app1"] codec => "json" } }
output { if [fields][type] == "filebeat-tomcat-catalina" { elasticsearch { hosts => ["10.200.17.47:9200","10.200.17.48:9200"] index => "filebeat-tomcat-catalina-%{+YYYY.MM.dd}" }}
if [fields][type] == "filebeat-tomcat-accesslog" { elasticsearch { hosts => ["10.200.17.47:9200","10.200.17.48:9200"] index => "filebeat-tomcat-accesslog-%{+YYYY.MM.dd}" }}
} # 检查下配置文件是否有误 root@logstash-50:/etc/logstash/conf.d# /usr/share/logstash/bin/logstash -f ./filebeat-kafka-to-logstash-es.conf -t Using bundled JDK: /usr/share/logstash/jdk OpenJDK 64-BitServerVMwarning:OptionUseConcMarkSweepGC was deprecated in version 9.0and will likely be removed in a future release. /usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bundler-1.17.3/lib/bundler/rubygems_integration.rb:200: warning: constant Gem::ConfigMap is deprecated WARNING: Couldnot find logstash.yml which is typically located in$LS_HOME/config or /etc/logstash. You can specify the path using --path.settings. Continuing using the defaults Couldnot find log4j2 configuration at path /usr/share/logstash/config/log4j2.properties. Using default config which logs errors to the console [INFO ] 2025-05-1610:55:39.862 [main] runner - StartingLogstash {"logstash.version"=>"7.14.0", "jruby.version"=>"jruby 9.2.19.0 (2.5.8) 2021-06-15 55810c552b OpenJDK 64-Bit Server VM 11.0.11+9 on 11.0.11+9 +indy +jit [linux-x86_64]"} [WARN ] 2025-05-1610:55:40.226 [LogStash::Runner] multilocal - Ignoring the 'pipelines.yml' file because modules or command line options are specified [INFO ] 2025-05-1610:55:41.244 [LogStash::Runner] Reflections - Reflections took 140 ms to scan 1 urls, producing 120 keys and417 values [WARN ] 2025-05-1610:55:42.212 [LogStash::Runner] elasticsearch - Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECSCompatibility mode. [WARN ] 2025-05-1610:55:42.253 [LogStash::Runner] elasticsearch - Relying on default value of `pipeline.ecs_compatibility`, which may change in a future major release of Logstash. To avoid unexpected changes when upgrading Logstash, please explicitly declare your desired ECSCompatibility mode. ConfigurationOK [INFO ] 2025-05-1610:55:42.272 [LogStash::Runner] runner - Using config.test_and_exit mode. ConfigValidationResult: OK. ExitingLogstash # 启动logstash服务 root@logstash-50:/etc/logstash/conf.d# systemctl restart logstash.service