Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Logstash Configuration on the log shipping layer.

 =====================================================================================================
input {
file {
type => "apache"
path => [

Code Block
input {
  file {
        type => "apache"
        path => [ "/var/log/cloudstack/management/management-server.log" ]

...


  }

...


}

...


output {

...


  stdout { codec => rubydebug }

...


  redis { host => "192.168.56.100" data_type => "list" key => "logstash" }
}




}
=====================================================================================================Logstash configuration on the index/search layer.

Code Block
input {

...


  redis {

...


    host => "<host>"

...


    # these settings should match the output of the agent

...


    data_type => "list"

...


    key => "logstash"

...


    # We use the 'json' codec here because we expect to read

...


    # json events from redis.

...


    codec => json

...


  }

...


}

...


filter

...


{
        grok
        {
                match => [ "message","%{YEAR:year}-%{MONTHNUM:month}-%{MONTHDAY}[T ]%{HOUR}:?%{MINUTE}:?%{SECOND}[T ]INFO%{GREEDYDATA}job[\-]+%{INT:jobid}\s*=\s*\[\s*%{UUID:uuid}\s*\]%{GREEDYDATA}"]

...


                named_captures_only =>

...

 true
        }
}
output
{
  stdout { debug => true debug_format => "json"}
  elasticsearch {
        host => "<host>"
  }
}

 

Steps in setting up the service:

...