blob: 8b4313fe1c7d5b714f5caaa48851ef27aa49eb17 [file] [log] [blame]
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
input {
http {
codec => "json"
port => 8100
response_headers => {
"Access-Control-Allow-Origin" => "*"
"Access-Control-Allow-Headers" => "Origin, X-Requested-With, Content-Type, Accept"
}
}
}
## Add your filters / logstash plugins configuration here
filter {
mutate {
remove_field => [ "message", "@version", "headers"]
}
grok {
match => [ "useraleVersion", "(?<major_ver>\d+).(?<minor_ver>\d+)(.(?<patch_ver>\d+))?" ]
match => [ "toolVersion", "(?<tool_major_ver>\d+).(?<tool_minor_ver>\d+)(.(?<tool_patch_ver>\d+))?" ]
}
}
output {
# Output data to Elasticsearch instance
elasticsearch {
hosts => "${ELASTICSEARCH_URL}"
index => "userale"
manage_template => true
template_overwrite => true
template => "/usr/share/logstash/templates/userale.json"
template_name => "userale"
}
# Debug
stdout { codec => rubydebug }
}