简体   繁体   English

如何在基于Linux的VM上运行的filebeat和在kubernetes中运行的logstash之间建立连接(logstash通过入口公开)

[英]how to establish connectivity between filebeat running on a linux based VM and logstash running in kubernetes(logstash exposed through ingress)

I want to establish connectivity between filebeat running on a linux based VM and logstash running in kubernetes(logstash exposed through ingress). 我想在基于Linux的VM上运行的filebeat和在kubernetes中运行的logstash(通过入口暴露的logstash)之间建立连接。 I have specified logstash output in the filebeat.yml file host: [" https://example.com/logstash "]. 我在文件beat.yml文件主机中指定了logstash输出:[“ https://example.com/logstash ”]。 I have multiple services exposed through ingress and hence I want the logstash also to be exposed through the same ingress resource. 我有多个通过入口公开的服务,因此我希望Logstash也通过相同的入口资源公开。 The host attached to ingress resource is https://www.example.com . 附加到入口资源的主机是https://www.example.com And I am using the .crt file of the TLS/SSL certificate associated with example.com in the certificate autority key of the filebeat.yml to secure the connection between filebeat and logstash. 我在filebeat.yml的证书主动密钥中使用与example.com相关联的TLS / SSL证书的.crt文件来保护filebeat和logstash之间的连接。 And in the logstash.yml which is running on kubernetes I have specified the input as TCP type instead of BEATS type. 在kubernetes上运行的logstash.yml中,我将输入指定为TCP类型而不是BEATS类型。

Logstash service is running of ClusterIP Type and has the following ingress rule Logstash服务正在运行ClusterIP类型,并具有以下入口规则

   http:
     paths:
     - backend:
         serviceName: logstash-service
         servicePort: 5044
       path: /logstash

Now when I run this entire setup the filebeat on the VM gives me error 现在,当我运行整个安装程序时,VM上的文件信号使我出错

  output.go:100#011Failed to connect to backoff(async(tcp://https://example.com/logstash)): lookup https on 168.63.129.16:53: no such host
Jul 29 19:35:16 filebeat[75346]: 2019-07-29T19:35:16.954Z#011INFO#011pipeline/output.go:93#011Attempting to reconnect to backoff(async(tcp://https://example.com/logstash)) with 7 reconnect attempt(s)
Jul 29 19:35:16 filebeat[75346]: 2019-07-29T19:35:16.954Z#011DEBUG#011[logstash]#011logstash/async.go:111#011connect
Jul 29 19:35:16 filebeat[75346]: 2019-07-29T19:35:16.957Z#011WARN#011transport/tcp.go:53#011DNS lookup failure "https": lookup https on 168.63.129.16:53: no such host

Is this setup technically possible and sane? 此设置在技术上是否可行且理智? What should be the host what I should specify in filebeat and what should be the logstash input type? 我应该在filebeat中指定的主机是什么,logstash输入类型应该是什么? Will specifying the tls.crt specified in filebeat help in authenticating with /logstash? 指定filebeat中指定的tls.crt是否有助于使用/ logstash进行身份验证?

It looks like you want to use a self-signed SSL certificate with a invalid hostname. 您似乎想使用具有无效主机名的自签名SSL证书。 There are two ways to make that hostname works in your self managed network: 有两种方法可以使主机名在您的自管网络中起作用:

  • add a IP record in /etc/hosts for the hostname, the hostname https://example.com/logstash will work in your filebeat config. 在/ etc / hosts中添加一个IP记录作为主机名,该主机名https://example.com/logstash将在您的filebeat配置中起作用。
  • create the certificate and add a SubjectAltName (SAN) of your IP, change your filebeat config, use IP instead of https://example.com/logstash hostname. 创建证书并添加 IP 的SubjectAltName(SAN) ,更改您的filebeat配置,使用IP代替https://example.com/logstash主机名。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Filebeat 不会将日志发送到 kubernetes 上的 logstash - Filebeat is not sending logs to logstash on kubernetes 如何在kubernetes的单个filebeat DaemonSet中声明多个output.logstash? - How to declare multiple output.logstash in single filebeat DaemonSet in kubernetes? Kubernetes通过Filebeat到Logstash进行日志管理 - kubernetes log management via filebeat to logstash 无法通过filebeat将日志发送到Kubernetes中的logstash - Can't send logs by filebeat to logstash in Kubernetes 如何将运行在GCP之上的Kubernetes上的pod中的日志发送到elasticsearch / logstash? - How to ship logs from pods on Kubernetes running on top of GCP to elasticsearch/logstash? Minikube Kubernetes 不允许在 Mac 上进入,尽管作为 VM 运行 - Minikube Kubernetes won't allow ingress on Mac despite running as a VM 如何使用filebeat或logstash,fluentd读取pod内kubernetes中的stdout stderr日志 - How to read stdout stderr logs in kubernetes within pod using filebeat or logstash,fluentd 无法访问在 AWS 上运行的 Kubernetes 集群上通过 nginx 入口控制器公开的 Spring Boot 微服务 - Unable to access Spring Boot microservice exposed via nginx ingress controller on Kubernetes cluster running on AWS 如何从外部访问在 VM 中运行的 Kubernetes 节点 - How to access externally to a Kubernetes Node running in VM 如何在 kubernetes 上部署具有持久卷的 Logstash? - How to deploy logstash with persistent volume on kubernetes?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM