elasticsearch 未找到匹配索引:没有索引匹配模式“;文件节拍-*“;
所以我对麋鹿很陌生,在打开Kibana的时候我犯了一个错误: 未找到匹配的索引:没有与模式“filebeat-*”匹配的索引。 我将输出配置为进入logstash,但问题仍然存在 以下是filebeat.yml:elasticsearch 未找到匹配索引:没有索引匹配模式“;文件节拍-*“;,elasticsearch,logstash,kibana,elastic-stack,filebeat,elasticsearch,Logstash,Kibana,Elastic Stack,Filebeat,所以我对麋鹿很陌生,在打开Kibana的时候我犯了一个错误: 未找到匹配的索引:没有与模式“filebeat-*”匹配的索引。 我将输出配置为进入logstash,但问题仍然存在 以下是filebeat.yml: ###################### Filebeat Configuration Example ######################### # This file is an example configuration file highlighting only
###################### Filebeat Configuration Example #########################
# This file is an example configuration file highlighting only the most common
# options. The filebeat.reference.yml file from the same directory contains all the
# supported options with more comments. You can use it as a reference.
#
# You can find the full configuration reference here:
# https://www.elastic.co/guide/en/beats/filebeat/index.html
# For more available modules and options, please see the filebeat.reference.yml sample
# configuration file.
#=========================== Filebeat inputs =============================
filebeat.inputs:
# Each - is an input. Most options can be set at the input level, so
# you can use different inputs for various configurations.
# Below are the input specific configurations.
- type: log
# Change to true to enable this input configuration.
enabled: true
# Paths that should be crawled and fetched. Glob based paths.
paths:
#- /var/log/*.log
-C:\Users\n.harb\Downloads\logstash-tutorial.log
# Exclude lines. A list of regular expressions to match. It drops the lines that are
# matching any regular expression from the list.
#exclude_lines: ['^DBG']
# Include lines. A list of regular expressions to match. It exports the lines that are
# matching any regular expression from the list.
#include_lines: ['^ERR', '^WARN']
# Exclude files. A list of regular expressions to match. Filebeat drops the files that
# are matching any regular expression from the list. By default, no files are dropped.
#exclude_files: ['.gz$']
# Optional additional fields. These fields can be freely picked
# to add additional information to the crawled log files for filtering
#fields:
# level: debug
# review: 1
### Multiline options
# Mutiline can be used for log messages spanning multiple lines. This is common
# for Java Stack Traces or C-Line Continuation
# The regexp Pattern that has to be matched. The example pattern matches all lines starting with [
#multiline.pattern: ^\[
# Defines if the pattern set under pattern should be negated or not. Default is false.
#multiline.negate: false
# Match can be set to "after" or "before". It is used to define if lines should be append to a pattern
# that was (not) matched before or after or as long as a pattern is not matched based on negate.
# Note: After is the equivalent to previous and before is the equivalent to to next in Logstash
#multiline.match: after
#============================= Filebeat modules ===============================
filebeat.config.modules:
# Glob pattern for configuration loading
path: ${path.config}/modules.d/*.yml
# Set to true to enable config reloading
reload.enabled: true
# Period on which files under path should be checked for changes
#reload.period: 10s
#==================== Elasticsearch template setting ==========================
setup.template.settings:
index.number_of_shards: 3
#index.codec: best_compression
_source.enabled: true
#================================ General =====================================
# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:
# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]
# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging
#============================== Dashboards =====================================
# These settings control loading the sample dashboards to the Kibana index. Loading
# the dashboards is disabled by default and can be enabled either by setting the
# options here, or by using the `-setup` CLI flag or the `setup` command.
#setup.dashboards.enabled: false
# The URL from where to download the dashboards archive. By default this URL
# has a value which is computed based on the Beat name and version. For released
# versions, this URL points to the dashboard archive on the artifacts.elastic.co
# website.
#setup.dashboards.url:
#============================== Kibana =====================================
# Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.
# This requires a Kibana endpoint configuration.
setup.kibana:
# Kibana Host
# Scheme and port can be left out and will be set to the default (http and 5601)
# In case you specify and additional path, the scheme is required: http://localhost:5601/path
# IPv6 addresses should always be defined as: https://[2001:db8::1]:5601
host: "localhost:5601"
#============================= Elastic Cloud ==================================
# These settings simplify using filebeat with the Elastic Cloud (https://cloud.elastic.co/).
# The cloud.id setting overwrites the `output.elasticsearch.hosts` and
# `setup.kibana.host` options.
# You can find the `cloud.id` in the Elastic Cloud web UI.
#cloud.id:
# The cloud.auth setting overwrites the `output.elasticsearch.username` and
# `output.elasticsearch.password` settings. The format is `<user>:<pass>`.
#cloud.auth:
#================================ Outputs =====================================
# Configure what output to use when sending the data collected by the beat.
#-------------------------- Elasticsearch output ------------------------------
#output.elasticsearch:
# Array of hosts to connect to.
#hosts: ["localhost:9200"]
# Optional protocol and basic auth credentials.
#protocol: "https"
#username: "elastic"
#password: "changeme"
#----------------------------- Logstash output --------------------------------
output.logstash:
# The Logstash hosts
hosts: ["localhost:5044"]
# Optional SSL. By default is off.
# List of root certificates for HTTPS server verifications
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
# Certificate for SSL client authentication
#ssl.certificate: "/etc/pki/client/cert.pem"
# Client Certificate Key
#ssl.key: "/etc/pki/client/cert.key"
#================================ Logging =====================================
# Sets log level. The default log level is info.
# Available log levels are: error, warning, info, debug
#logging.level: debug
# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
#logging.selectors: ["*"]
#============================== Xpack Monitoring ===============================
# filebeat can export internal metrics to a central Elasticsearch monitoring
# cluster. This requires xpack monitoring to be enabled in Elasticsearch. The
# reporting is disabled by default.
# Set to true to enable the monitoring reporter.
#xpack.monitoring.enabled: true
# Uncomment to send the metrics to Elasticsearch. Most settings from the
# Elasticsearch output are accepted here as well. Any setting that is not set is
# automatically inherited from the Elasticsearch output configuration, so if you
# have the Elasticsearch output configured, you can simply uncomment the
# following line.
#xpack.monitoring.elasticsearch:
文件节拍配置示例#########################
#此文件是一个示例配置文件,仅突出显示最常见的
#选项。同一目录中的filebeat.reference.yml文件包含所有
#支持的选项包含更多注释。你可以把它作为参考。
#
#您可以在此处找到完整的配置参考:
# https://www.elastic.co/guide/en/beats/filebeat/index.html
#有关更多可用模块和选项,请参阅filebeat.reference.yml示例
#配置文件。
#==============================================文件节拍输入=============================
filebeat.inputs:
#每个-都是一个输入。大多数选项可以在输入级别设置,因此
#您可以对各种配置使用不同的输入。
#以下是特定于输入的配置。
-类型:原木
#更改为true以启用此输入配置。
已启用:true
#应该爬网和获取的路径。基于全局的路径。
路径:
#-/var/log/*.log
-C:\Users\n.harb\Downloads\logstash-tutorial.log
#排除行。要匹配的正则表达式列表。它删除了那些
#匹配列表中的任何正则表达式。
#排除_行:[“^DBG”]
#包括行。要匹配的正则表达式列表。它将导出所需的行
#匹配列表中的任何正则表达式。
#包括以下行:[“^ERR”、“^WARN”]
#排除文件。要匹配的正则表达式列表。Filebeat会删除
#正在匹配列表中的任何正则表达式。默认情况下,不会删除任何文件。
#排除_文件:['.gz$']
#可选的附加字段。这些田地可以自由采摘
#将附加信息添加到爬网日志文件以进行筛选
#字段:
#级别:调试
#审查:1
###多行选项
#Mutiline可用于跨多行的日志消息。这很常见
#用于Java堆栈跟踪或C行继续
#必须匹配的regexp模式。示例模式匹配以开头的所有行[
#多行模式:^\[
#定义pattern下的模式集是否应被否定。默认值为false。
#多行。否定:false
#Match可以设置为“after”或“before”。它用于定义是否应将行附加到模式
#在否定之前或之后(不)匹配的,或者只要基于否定的模式不匹配。
#注:在Logstash中,After等同于previous,before等同于next
#multiline.match:之后
#====================================================文件节拍模块===============================
filebeat.config.modules:
#配置加载的Glob模式
路径:${path.config}/modules.d/*.yml
#设置为true以启用配置重新加载
reload.enabled:true
#检查路径下文件的更改的时间段
#重新加载。周期:10秒
#===============================弹性搜索模板设置==========================
setup.template.settings:
index.number_的_碎片数:3
#index.codec:最佳压缩
_source.enabled:true
#===================================================概述=====================================
#发布网络数据的发货人的名称。它可用于分组
#web界面中单个发货人发送的所有事务。
#姓名:
#托运人的标签包含在各自的字段中
#已发布交易记录。
#标签:[“服务-X”,“web层”]
#可选字段,您可以指定这些字段将附加信息添加到
#输出。
#字段:
#环境:登台
#=================================================仪表盘=====================================
#这些设置控制将示例仪表板加载到Kibana索引。加载
#默认情况下,仪表板处于禁用状态,可以通过设置
#选项,或者使用“-setup”CLI标志或“setup”命令。
#setup.dashboards.enabled:false
#从何处下载仪表板存档的URL。默认情况下,此URL
#具有基于节拍名称和版本计算的值。对于已发布
#版本,此URL指向artifacts.elastic.co上的仪表板存档
#网站。
#setup.dashboards.url:
#====================================================Kibana=====================================
#从Beats版本6.0.0开始,仪表板通过Kibana API加载。
#这需要Kibana端点配置。
setup.kibana:
#Kibana主机
#方案和端口可以省略,并将设置为默认值(http和5601)
#如果指定了其他路径,则需要该方案:http://localhost:5601/path
#IPv6地址应始终定义为:https://[2001:db8::1]:5601
主机:“本地主机:5601”
#=================================================弹性云==================================
#这些设置简化了将filebeat与弹性云结合使用的过程(https://cloud.elastic.co/).
#cloud.id设置覆盖“output.elasticsearch.hosts”和
#`setup.kibana.host`选项。
#您可以在弹性云web UI中找到'cloud.id'。
#cloud.id:
#cloud.auth设置覆盖'output.elasticsearch.username'和'
#`output.elasticsearch.password`设置。格式为`:`。
#cloud.auth:
#=================================================输出=====================================
#配置发送节拍采集的数据时要使用的输出。
#--------------------------弹性搜索输出------------------------------
#output.elasticsearch:
#要连接到的主机阵列。
#主机:[“localhost:9200”]
#可选协议和基本身份验证凭据。
#协议:“https”
#用户名:“弹性”
#密码:“更改我”
#-----------------------------对数存储输出--------------------------------
output.logstas
enabled = False
filebeat modules enable logstash
filebeat modules list
- module: logstash
# logs
log:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: ["/path/to/log/file.log"]
# Slow logs
slowlog:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
#var.paths: ["/path/to/log/file.log"]
filebeat setup -e