我有2台服务器A和B。当我在服务器A上运行文件时,它运行得很好。但是在服务器B上,我有以下错误:
pipeline/output.go:154 Failed to connect to backoff(async(tcp://logstash_ip:5044)): dial tcp logstash_ip:5044: connect: no route to host
因此,我想我错过了服务器B上的一些配置。那么,我如何解决问题并解决它们。
编辑的添加filebeat.yml和docker-compose
注意:我在服务器A上运行了,但是失败了,所以我在服务器B上测试了它,它仍然在工作。所以
我需要创建一个码头容器与nodejs应用程序和文件拍在同一个容器。因此,file节拍将将nodejs日志中继到我的logstash服务器。我已经创建了docker文件,当我构建映像时,它运行时没有出错。但是当我在容器中看到没有创建任何与文件节拍相关的文件时。NodeJS应用程序按预期运行,但file节拍根本不起作用。
我使用了这里提到的filebeat 提供的自定义文件
那么,我们能在同一个容器中运行nodeJS应用程序和文件传输吗?如果是的话,我做错了什么?
这是我的码头文件--
# Test web app that returns the name of the host/pod/con
我正在尝试在Docker Swarm模式下安装ELK。
然后,我需要告诉filebeat将日志发送到logstash。
下面是我的filebeat配置文件:
#=========================== Filebeat prospectors =============================
## Each - is a prospector. Most options can be set at the prospector level, so
## you can use different prospectors for various configuration
所以我刚开始使用ELK,在打开Kibana时我得到了这个错误:找不到匹配的索引:没有索引匹配模式"filebeat-*“。我将输出配置为转到logstash,但问题仍然存在,这里是filebeat.yml:
###################### Filebeat Configuration Example #########################
# This file is an example configuration file highlighting only the most common
# options. The filebeat.referenc
我目前正在构建一个定制的码头形象,用于集成测试。我的要求是使用带有默认ingester管道和模板映射的自定义配置来设置它。
Dockerfile:
FROM docker.elastic.co/elasticsearch/elasticsearch:5.6.2
ADD config /usr/share/elasticsearch/config/
USER root
RUN chown -R elasticsearch:elasticsearch config
RUN chmod +x config/setup.sh
USER elasticsearch
RUN elasticsearch-p