Здравствуйте! Подскажите, как правильно настроить сбор и визуализацию логов с Apache, который работает на Windows машине ?
filebeat конфиг такой:
filebeat.inputs:
- type: log
enabled: true
paths:
- C:\opt\Apache24\logs\*.log
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: true
setup.template.settings:
index.number_of_shards: 3
setup.kibana:
host: "http://192.168.100.38"
username: user
password: "pass"
output.elasticsearch:
hosts: ["192.168.100.38:9200"]
processors:
- add_host_metadata: ~
- add_cloud_metadata: ~
Команда filebeat.exe modules list
Enabled:
apache2
На сервере:
/etc/logstash/conf.d/10-apache-filter.conf
filter {
if [type] in [ "apache" , "apache_access" , "apache-access" ] {
grok {
match => [
"message" , "%{COMBINEDAPACHELOG}+%{GREEDYDATA:extra_fields}",
"message" , "%{COMMONAPACHELOG}+%{GREEDYDATA:extra_fields}"
]
overwrite => [ "message" ]
}
mutate {
convert => ["response", "integer"]
convert => ["bytes", "integer"]
convert => ["responsetime", "float"]
}
geoip {
source => "clientip"
target => "geoip"
add_tag => [ "apache-geoip" ]
}
date {
match => [ "timestamp" , "dd/MMM/YYYY:HH:mm:ss Z" ]
remove_field => [ "timestamp" ]
}
useragent {
source => "agent"
}
}
if [type] in ["apache_error","apache-error"] {
grok {
match => ["message", "\[%{WORD:dayname} %{WORD:month} %{DATA:day} %{DATA:hour}:%{DATA:minute}:%{DATA:second} %{YEAR:year}\] \[%{NOTSPACE:loglevel}\] (?:\[client %{IPORHOST:clientip}\] ){0,1}%{GREEDYDATA:message}"]
overwrite => [ "message" ]
}
mutate
{
add_field =>
{
"time_stamp" => "%{day}/%{month}/%{year}:%{hour}:%{minute}:%{second}"
}
}
date {
match => ["time_stamp", "dd/MMM/YYYY:HH:mm:ss"]
remove_field => [ "time_stamp","day","dayname","month","hour","minute","second","year"]
}
}
}
В конфиге 02-beats-input.conf
input {
beats {
port => 5044
}
}
При этом в Kibana в Log есть данные. Но дашборды не строятся ( No results found )
Что я забыл настроить ?