• logstash安装zabbix插件报错解决


    测试

    input {
       file {
            path => "/usr/share/logstash/aa"
            start_position => "beginning"
            add_field => [ "[@metadata][zabbix_key]" , "log.error" ]
            add_field => [ "[@metadata][zabbix_host]" , "k8shost" ]
       }
    }
    output {
            stdout { codec => rubydebug }
            zabbix {
                    zabbix_host => "[@metadata][zabbix_host]"
                    zabbix_key => "[@metadata][zabbix_key]"
                    zabbix_server_host => "10.104.79.89"
                    zabbix_server_port => "10051"
                    zabbix_value => "message"
            }
    }
    
    命令
    logstash  -f test  --path.data=/usr/share/logstash/log/
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21

    bash-4.2$ logstash-plugin install --no-verify
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
    WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    Installing…
    Installation successful
    bash-4.2$ logstash-plugin install logstash-output-zabbix
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
    WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    Validating logstash-output-zabbix
    Unable to download data from https://rubygems.org - Connection reset by peer (https://rubygems.org/latest_specs.4.8.gz)
    ERROR: Installation aborted, verification failed for logstash-output-zabbix
    bash-4.2$ exit
    exit
    [root@k8smaster elk]# docker cp latest_specs.4.8.gz logstash:/home/
    [root@k8smaster elk]# docker exec -it logstash bash
    bash-4.2$
    bash-4.2$
    bash-4.2$
    bash-4.2$ logstash-plugin install file:///home/latest_specs.4.8.gz
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
    WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    ERROR: Invalid pack for: file:///home/latest_specs.4.8.gz, reason: Invalid format, the pack must be in zip format, message: Invalid format, the pack must be in zip format
    bash-4.2$
    bash-4.2$
    bash-4.2$
    bash-4.2$
    bash-4.2$
    bash-4.2$ logstash-plugin install logstash-output-zabbix --no-verify
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
    WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    Validating logstash-output-zabbix
    Validating --no-verify
    Plugin --no-verify does not exist
    ERROR: Installation aborted, verification failed for --no-verify
    bash-4.2$ logstash-plugin install logstash-output-zabbix
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
    WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    Validating logstash-output-zabbix
    Unable to download data from https://rubygems.org - Connection reset by peer (https://rubygems.org/latest_specs.4.8.gz)
    ERROR: Installation aborted, verification failed for logstash-output-zabbix
    bash-4.2$ logstash
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    ^Cbash-4.2$ ^C
    bash-4.2$ ^C
    bash-4.2$ logstash -e file://home/logstash-output-zabbix-3.0.5.gem
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/tmp/jruby-840/jruby16936474446528786007jopenssl.jar) to field java.security.MessageDigest.provider
    WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    Sending Logstash logs to /usr/share/logstash/logs which is now configured via log4j2.properties
    [2023-11-18T11:40:45,053][INFO ][logstash.runner ] Starting Logstash {“logstash.version”=>“7.9.3”, “jruby.version”=>“jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc OpenJDK 64-Bit Server VM 11.0.8+10-LTS on 11.0.8+10-LTS +indy +jit [linux-x86_64]”}
    [2023-11-18T11:40:45,445][WARN ][logstash.config.source.multilocal] Ignoring the ‘pipelines.yml’ file because modules or command line options are specified
    [2023-11-18T11:40:45,458][FATAL][logstash.runner ] Logstash could not be started because there is already another instance using the configured data directory. If you wish to run multiple instances, you must change the “path.data” setting.
    [2023-11-18T11:40:45,461][ERROR][org.logstash.Logstash ] java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
    bash-4.2$
    bash-4.2$
    bash-4.2$ logstash-plugin install logstash-output-zabbix
    OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.jruby.ext.openssl.SecurityHelper (file:/usr/share/logstash/vendor/jruby/lib/ruby/stdlib/jopenssl.jar) to field java.security.MessageDigest.provider
    WARNING: Please consider reporting this to the maintainers of org.jruby.ext.openssl.SecurityHelper
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    Validating logstash-output-zabbix
    Installing logstash-output-zabbix

    Installation successful
    bash-4.2$
    bash-4.2$

  • 相关阅读:
    并行和并发的区别
    Multiplexer and Demultiplexer(多路复用器和解复用器)
    【生活】如何学习理财
    【linux】Could not update ICEauthority file /home/xxx/.ICEauthority问题解决
    Android /android_vendor.32_arm64_armv8-a_shared/libtinyals a.so.abidiff报错
    解决问题:已通过系统pip安装了相应模块,但是PyCharm中却提示 No module named xxxx
    【手把手带你刷好题】Java刷题记录 21——>>27
    二、【React拓展】懒加载 lazy
    Linux知识点 -- 网络基础 -- 传输层
    视频 | 扩增子文库拆分和16S序列合并
  • 原文地址:https://blog.csdn.net/qq_38595432/article/details/134482648