我不明白如何运行这个文件节拍来将输出发送到elasticsearch。
这来自filebeat.yml文件,
- input_type: log
# Paths that should be crawled and fetched. Glob based paths.
paths:
- /var/log/nginx/access.log
output.elasticsearch:
# Array of hosts to connect to.
hosts: ["localhost:9200"]
index: 'filebeat_nginx'elasticsearch已经启动并运行。
现在,如何运行filebeat将日志信息发送到elasticsearch。
如果我转到filebeat的bin目录,并运行此命令,
luvpreet@DHARI-Inspiron-3542:/usr/share/filebeat/bin$ sudo ./filebeat -configtest -e然后它会显示,
filebeat2017/04/19 06:54:22.450440 beat.go:339: CRIT Exiting: error loading config file: stat filebeat.yml: no such file or directory
Exiting: error loading config file: stat filebeat.yml: no such file or directoryfilebeat.yml文件位于/etc/filebeat文件夹中。如何运行它?请阐明使用elasticsearch运行此操作的过程。
发布于 2017-11-15 02:37:54
典型的filebeat命令如下所示:
/usr/share/filebeat/bin/filebeat -c /etc/filebeat/filebeat.yml \
-path.home /usr/share/filebeat -path.config /etc/filebeat \
-path.data /var/lib/filebeat -path.logs /var/log/filebeat-c表示您的配置文件,如上面的注释所示。path.home是您的脚本。path.config包含配置文件。path.data是维护状态的地方。path.logs是文件节拍进程将记录的位置。
发布于 2017-11-15 02:30:13
如果你已经在/etc/ filebeat /filebeat.yml文件中做了必要的安排,你可以使用这个命令"service filebeat start“。在服务启动后,你可以控制service这个命令"service filebeat status“。如果出现错误,您可以看到错误。
发布于 2017-12-07 20:03:00
1.如果您已经安装了rpm包,那么您将拥有/etc/filebeat/filebeat.yml文件。编辑该文件以将输出发送到Downloads/filebeat-5.4.0-darwin-x86_64/filebeat -e -c location_to_your_filebeat.yml,并使用命令"/etc/init.d/filebeat start“2启动它。如果您已下载并安装了二进制文件,则可以使用命令”Elasticsearch“
https://stackoverflow.com/questions/43134270
复制相似问题