2014-12-08 2 views
0

현재 logstash 및 kibana를 사용하여 중앙 집중식 로깅 설정을하고 있습니다. 서버를 성공적으로 설치했지만 현재 다음과 같은 문제가 있습니다.Logstash 서버 구성 문제

내 모든 구성은, 괜찮을

[email protected]:/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 
[email protected]:/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 
[email protected]:/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=>"Error: Expected one of #, input, filter, output at line 29, column 1 (byte 734) after "} {:timestamp=>"2014-12-08T09:25:43.260000+0000", :message=>"You may be interested in the '--configtest' flag which you can\nuse to validate logstash's configuration before you choose\nto restart a running system."}

이 오류가 트리거 곳에서 확실하지 않다.

여기

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 } 
} 

어떤 도움

이 이해할 수있을 것이다, 입력 파일입니다.

+0

/etc/logstash/conf.d에 존재하는 파일은 무엇? –

+0

설정의 29 번째 줄에 무엇이 있습니까? –

답변

1

나는이 문제를 해결했다. 그것은 ssl 키가 제대로 읽히지 않았기 때문에 권한 문제였습니다. 그래서, 나는 파일들 (인증서와 키)을/etc/ssl 폴더로 옮기고 또한 파일들에 대한 666 액세스 권한을 발급했다.

이 후 서비스를 다시 시작했는데 오류가 없습니다.

답변 해 주셔서 감사합니다. 이 회신으로 만 문제를 디버깅 할 수있었습니다.

덕분에, KARTHIK