在Logstash中引入Collectd做日志采集,需要安装相应的插件

安装插件

  • 常用方式

      logstash-plugin install logstash-filter-collectd
    

    发现找不到该插件,就是个坑,通过查找collectd插件发现

      logstash-plugin list | grep collectd
    

    发现只有一个 logstash-codec-collectd,遂安装之。

  • input区域编码

    • 旧的方式(特么又是个坑)
      input {
          collectd {}
      }
      
    • 新的方式
      input {
          udp {
            port => 25826         # Must be specified. 25826 is the default for collectd
            buffer_size => 1452   # Should be specified. 1452 is the default for recent versions of collectd
            codec => collectd { } # This will invoke the default options for the codec
            type => "collectd"
          }
      }
      

results matching ""

    No results matching ""