簡體   English   中英

Logstash服務器配置問題

[英]Logstash server configuration issues

我目前正在使用logstash和kibana構建集中式日志記錄設置。 我已經成功安裝了服務器,但是目前遇到以下問題。

我所有的配置似乎都很好,

root@centralizedlogging-421413:/opt/logstash/bin# ./logstash --configtest -f    /etc/logstash/conf.d/01-lumberjack-input.conf
Using milestone 1 input plugin 'lumberjack'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin. For more information on plugin milestones, see http://logstash.net/docs/1.4.2-modified/plugin-milestones {:level=>:warn}
Configuration OK
root@centralizedlogging-421413:/opt/logstash/bin# ./logstash --configtest -f /etc/logstash/conf.d/10-syslog.conf
Using milestone 1 filter plugin 'syslog_pri'. This plugin should work, but would benefit from use by folks like you. Please let us know if you find bugs or have suggestions on how to improve this plugin. For more information on plugin milestones, see http://logstash.net/docs/1.4.2-modified/plugin-milestones {:level=>:warn}
Configuration OK
root@centralizedlogging-421413:/opt/logstash/bin# ./logstash --configtest -f /etc/logstash/conf.d/30-lumberjack-output.conf
Configuration OK

但是我的logstash.log仍然給我以下錯誤,

{:timestamp =>“ 2014-12-08T09:25:43.250000 + 0000”,:message =>“錯誤:預期#之一,輸入,過濾器,在”} {之后的第29行,第1列(字節734)輸出:timestamp =>“ 2014-12-08T09:25:43.260000 + 0000”,:message =>“您可能對'--configtest'標志感興趣,您可以\\ n在選擇\\ n重新啟動前驗證logstash的配置正在運行的系統。“}

不知道從何處觸發此錯誤。

這是輸入文件,

01-lumberjack-input.conf
input {
  lumberjack {
    port => 5000
    type => "logs"
    ssl_certificate => "/etc/pki/tls/certs/logstash-forwarder.crt"
    ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"
  }
}

10-syslog.conf
filter {
  if [type] == "syslog" {
    grok {
      match => { "message" => "%{SYSLOGTIMESTAMP:syslog_timestamp} %{SYSLOGHOST:syslog_hostname} %{DATA:syslog_program}(?:\[%{POSINT:syslog_pid}\])?: %{GREEDYDATA:syslog_message}" }
      add_field => [ "received_at", "%{@timestamp}" ]
      add_field => [ "received_from", "%{host}" ]
    }
    syslog_pri { }
    date {
      match => [ "syslog_timestamp", "MMM  d HH:mm:ss", "MMM dd HH:mm:ss" ]
    }
  }
}

30-lumberjack-output.conf
output {
  elasticsearch { host => localhost }
  stdout { codec => rubydebug }
}

任何幫助將不勝感激。

我解決了這個問題。 這是一個權限問題,因此無法正確讀取ssl密鑰。 因此,我將文件(證書和密鑰)移到了/ etc / ssl文件夾中,並且還發出了對文件的666訪問權限。

此后,我重新啟動了服務,現在沒有錯誤。

感謝大家的回應。 我只能通過這些答復來調試問題。

謝謝,卡爾提克

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM