Logstash 关于索引/索引模式创建日志的澄清

Logstash 关于索引/索引模式创建日志的澄清,logstash,elastic-stack,logstash-grok,logstash-forwarder,Logstash,Elastic Stack,Logstash Grok,Logstash Forwarder,遵循这个弹性链接: 非常好,我可以使用discover在Kibana中查看Apache日志。耶 现在,我有了我的Palo FW日志,并调整了教程中的Filebeat文件,如下所示: paths: - /var/log/logstash/logstash-tutorial.log - /var/log/PaloaltoFW/PA-220-Dev.log 我在Kibana中得到一个关于filebeat-*索引模式的错误,如果我切换到教程logstash-%DATE-00001中的默认模式,它将得到

遵循这个弹性链接:

非常好,我可以使用discover在Kibana中查看Apache日志。耶

现在,我有了我的Palo FW日志,并调整了教程中的Filebeat文件,如下所示:

paths:
- /var/log/logstash/logstash-tutorial.log
- /var/log/PaloaltoFW/PA-220-Dev.log
我在Kibana中得到一个关于filebeat-*索引模式的错误,如果我切换到教程logstash-%DATE-00001中的默认模式,它将得到纠正

1.yml

- pipeline.id: sample
path.config: "/etc/logstash/conf.d/first-pipeline.conf"

- pipeline.id: main
  path.config: "/etc/logstash/conf.d/PaloFW-pipeline.conf"

- pipeline.id: rsyslog
  path.config: "/etc/logstash/conf.d/rsyslog.conf"
我还从filebeat中删除了注册表文件

My PaloFW-pipeline.conf:

# The # character at the beginning of a line indicates a comment. Use
# comments to describe your configuration.
input {
beats {
port => "5044"
type => "syslog"
}
}
# The filter part of this file is commented out to indicate that it is
# optional.
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}" ]
}
date {
match => [ "syslog_timestamp", "MMM d HH:mm:ss", "MMM dd HH:mm:ss" ]
}
}
kv {}
}
output {
elasticsearch {
hosts => [ "10.10.69.20:9200" ]
}
}
我现在可以在Kibana中看到日志,但不得不切换到我的默认索引,filebeat-*在文章的开头仍然会出现错误。理想情况下,我希望在logstash服务器上解析tutorial.log和my firewall.log,并将它们显示为单独的标记和索引模式……一旦这样做,我将转到其他用例

因此,它们从教程日志库-%DATE%-0001加载到索引中,我可以看到它们,我的过滤器可能会更好。但我需要弄清楚索引是如何工作的,以及是否可以将filebeat用于多个.log并创建多个索引


非常感谢社区的任何澄清

请参阅,但在何处标识正在处理的日志文件的自动索引创建?”输入{file{type=>“technical”path=>“/home/technical/log”}文件{type=>“business”path=>“/home/business/log”}过滤器{if[type]==“technical”{处理……}if[type]==“business”{处理……}输出{if[type]=“technical”{#output to gelf}if[type]=“business”{#output to elasticsearch”默认情况下,elasticsearch日志堆栈输出插件使用
logstash-%{+YYYY.MM.dd}
索引(因此每天一个索引)(来自)