小编Log*_*han的帖子

如何减少Logstash内存使用率

我正在使用在独立系统(无云或群集)中运行的Logstash-5.6.5(在Windows中)。计划观看一些日志文件并将其发布到本地运行elasticsearch。但是,当检查Logstash的内存使用情况时,如果没有配置监视任何文件的配置,则显示大约600MB内存使用情况。当我进一步添加输入文件管道配置时,它进一步增加了内存(为观看3个日志文件,它总共增加了70MB,但我计划增加多达20个日志)。

1.这是预期的行为吗?
2.有什么方法可以通过logstash减少大量内存使用?

performance memory-management logstash logstash-file logstash-configuration

8
推荐指数
1
解决办法
4604
查看次数

如何将Logstash输出验证到安全的Elasticsearch URL(版本5.6.5)

我正在使用Logstash和Elasticsearch版本5.6.5。到目前为止,已将Elasticsearch输出与HTTP协议一起使用,并且未进行身份验证。现在,使用基本身份验证(用户/密码)和CA认证的HTTPS URL保护Elasticsearch。我对Elasticsearch服务器没有任何控制权。我只是用它从Logstash输出到。

现在,当我尝试使用基本身份验证配置elasticsearch的HTTPS URL时,它无法创建管道。

输出配置

output { 
 elasticsearch {
   hosts => ["https://myeslasticsearch.server.io"]
   user => "esusername"
   password => "espassword"
   ssl => true
 }
}
Run Code Online (Sandbox Code Playgroud)

失误

 1. Error registering plugin {:plugin=>"#<LogStash::OutputDelegator:0x50aa9200
 2. Pipeline aborted due to error {:exception=>#<URI::InvalidComponentError: bad component(expected user component):
Run Code Online (Sandbox Code Playgroud)

如何解决这个问题?我注意到有一个名为的字段cacert,它需要一些PEM文件。但是我不确定该放在哪里,因为Elasticsearch服务器使用的是CA认证的SSL,而不是自签名的SSL。

附加问题:我没有安装任何xpack。是否需要从Logstash向HTTPS输出到Elasticsearch的“ xpack”购买?

authentication https elasticsearch logstash logstash-configuration

3
推荐指数
1
解决办法
2711
查看次数

在无头健身房jupyter Python 2.7中获取“ AttributeError:'ImageData'对象没有属性'data'“

我试图在无头服务器中运行健身房,并在jupyter中进行渲染。Python版本2.7。

我已经开始使用jupyter xvfb-run -a -s "-screen 0 1400x900x24" jupyter notebook

下面是我运行的Jupyte单元。

import matplotlib.pyplot as plt
import gym
from IPython import display
%matplotlib inline

env = gym.make('CartPole-v0')
env.reset()

plt.imshow(env.render(mode='rgb_array'))
display.display(plt.gcf())    
display.clear_output(wait=True)
env.step(env.action_space.sample()) # take a random action

env.close()
Run Code Online (Sandbox Code Playgroud)

但是我得到的错误如下:

AttributeError: 'ImageData' object has no attribute 'data'
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

我在论坛上进行了大量搜索,但找不到解决方案。在此先感谢您帮助我解决此错误,并让我在jupyter笔记本中渲染体育馆。

python-2.7 jupyter-notebook openai-gym

2
推荐指数
1
解决办法
1370
查看次数