Memory redis内存在内存中增长
elasticsearch的内存无限增长,环境病毒ES_MIN_MEM和ES_MAX_MEM无法正常工作。如果我发现了什么问题,我会回来修改这个问题 我发现我可能犯了一个错误。如果日志不太多,logstash将从列表中弹出并删除该项。但如果logstash或elasticsearch被阻止,则redis密钥的长度将无限增长。谢谢你的帮助,我想这个问题可能已经结束了 以下是原问题: 当我在shipper节点使用静态密钥(而不是使用%{type}等)时,密钥的长度将从启动监控系统时开始越来越大。但在redis中,删除过时日志的一般方法是为不同的键设置TTL。因此,我们可以删除同一密钥下的早期日志,同时保留后期日志。 或者我们有其他方法使用redis作为缓存并避免内存溢出?非常感谢。 以下是我的配置文件: 文件:shipper.confMemory redis内存在内存中增长,memory,elasticsearch,redis,monitoring,logstash,Memory,elasticsearch,Redis,Monitoring,Logstash,elasticsearch的内存无限增长,环境病毒ES_MIN_MEM和ES_MAX_MEM无法正常工作。如果我发现了什么问题,我会回来修改这个问题 我发现我可能犯了一个错误。如果日志不太多,logstash将从列表中弹出并删除该项。但如果logstash或elasticsearch被阻止,则redis密钥的长度将无限增长。谢谢你的帮助,我想这个问题可能已经结束了 以下是原问题: 当我在shipper节点使用静态密钥(而不是使用%{type}等)时,密钥的长度将从启动监控系统时开始越来越大。但在
input {
file {
type => "ceph-daemons"
path => "/var/log/ceph/ceph-*.log"
start_position => "end"
}
file {
type => "ceph-activity"
path => "/var/log/ceph/ceph.log"
start_position => "end"
}
file {
type => "nova"
path => "/var/log/nova/*.log"
start_position => "end"
}
}
output {
stdout{ }
redis {
host => "10.1.0.154"
data_type => "list"
key => "logstash"
}
}
文件:central.conf
input {
redis {
host => "10.1.0.154"
type => "redis-input"
data_type => "list"
key => "logstash"
}
}
output {
stdout{ }
elasticsearch {
cluster => "logstash"
}
}
我在logstash文档中发现了以下内容:
data_type
Value can be any of: "list", "channel", "pattern_channel"
There is no default value for this setting.
Specify either list or channel. If redis\_type is list, then we will BLPOP the key. If redis\_type is channel, then we will SUBSCRIBE to the key. If redis\_type is pattern_channel, then we will PSUBSCRIBE to the key. TODO: change required to true
在redis文档中:
When BLPOP returns an element to the client, it also removes the element from the list. This means that the element only exists in the context of the client: if the client crashes while processing the returned element, it is lost forever.
阅读这些文档时我错了吗?不可能将expire设置为列表的元素,在这种情况下,使键过期对您没有帮助。如果要修剪列表中的元素数量,请检查命令。是否有任何方法可以构建“logstash+redis”系统,从而在不手动减少redis内存使用的情况下解决此问题?一般的方法是什么?我知道我们可以根据动态名称使用不同的键,比如“{type}”等等。但是中央节点上的输入部分如何知道它呢?