简体   繁体   English

Logstash + Kibana + Elasticsearch网站问题

[英]logstash + kibana + elasticsearch web issue

I have 2 elasticsearch nodes in an AWS EC2 environment and I'd like to use logstash + kibana on a separate logging server. 我在AWS EC2环境中有2个Elasticsearch节点,我想在单独的日志记录服务器上使用logstash + kibana。 Logstash works as an indexer and is able to get the logs from the ES nodes (I'm still playing with how/what I need to log) The issue is with Kibana. Logstash用作索引器,并且能够从ES节点获取日志(我仍在研究如何记录/需要记录什么)Kibana出现了问题。

I'd like to be able to use Kibana on the logstash server to monitor the logs on my ES nodes. 我希望能够在Logstash服务器上使用Kibana监视我的ES节点上的日志。 For example: ES nodes: 10.110.65.91/92 Logstash/kibana 10.110.65.93 例如:ES节点:10.110.65.91/92 Logstash / kibana 10.110.65.93

I'd like to be able to hit [http://10.110.65.93/kibana-3.0.0milestone5/#/dashboard/file/default.json] and load Kibana. 我希望能够点击[http://10.110.65.93/kibana-3.0.0milestone5/#/dashboard/file/default.json]并加载Kibana。 Right now it does not load using .93; 目前,它不会使用.93加载; though it does work on .91. 尽管确实可以在.91上运行。 The kibana config for .91 has elasticsearch: "http://"+window.location.hostname+":9200", which I know is not recommended but if I change it to the IP it does not load. .91的kibana配置具有elasticsearch:“ http://” + window.location.hostname +“:9200”,我不建议这样做,但是如果将其更改为IP,它将不会加载。 Kibana config for .93 is elasticsearch: "http://"+10.110.65.91+":9200", .93的Kibana配置为elasticsearch:“ http://” +10.110.65.91+“:9200”,

Security groups are open. 安全组已打开。

Am I missing something? 我想念什么吗?

Suppose I put the following in config.js : 假设我将以下内容放在config.js

elasticsearch: "http://"+127.0.0.1+":9200",

I then load Kibana's dashboard, which comes up blank. 然后,我加载Kibana的仪表板,该仪表板为空白。 I go to check my browser's JavaScript console, and find two errors: 我去检查浏览器的JavaScript控制台,发现两个错误:

Uncaught SyntaxError: Unexpected number (in config.js)
Uncaught ReferenceError: config is not defined (in app.js)

In a nutshell, Kibana fails to render because you gave it a config file that won't compile. 简而言之,Kibana无法渲染是因为您给它提供了一个不会编译的配置文件。

Suppose I try this, instead: 假设我尝试这样做,而不是:

elasticsearch: "http://127.0.0.1:9200",

This compiles! 这样编译! Kibana renders! Kibana渲染! But then throws up a red error message: 但是随后抛出了一条红色错误消息:

Could not contact Elasticsearch at http://127.0.0.1:9200. Please ensure that Elasticsearch is reachable from your system.

Reason being: Kibana is resolving the IP address on the client machine, not the server; 原因是:Kibana正在解析客户端计算机而非服务器上的IP地址; since my workstation isn't an ElasticSearch node, my browser cannot find an ES cluster at 127.0.0.1:9200 . 由于我的工作站不是ElasticSearch节点,因此我的浏览器无法在127.0.0.1:9200处找到ES集群。

Kibana doesn't know about Logstash, and doesn't care, just as long as the rendered page can connect to an ES cluster at the address given. Kibana并不了解Logstash,也不在乎,只要渲染的页面可以在给定的地址连接到ES集群即可。 For your setup, that seems to be http://10.110.65.91:9200 or http://10.110.65.92:9200 . 对于您的设置,这似乎是http://10.110.65.91:9200http://10.110.65.92:9200 You could set up a proxy or firewall around those, whether for security, load balancing, or whatever. 您可以围绕它们设置代理或防火墙,无论是出于安全性,负载平衡还是其他目的。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM