如何监视LogStash是否已满载? [英] How to monitor if LogStash is fully loaded?

查看:160
本文介绍了如何监视LogStash是否已满载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用LogStash收集我的服务的使用日志.我想知道我是否知道LogStash是否已完全加载,是否应该添加更多服务器来处理日志?我不想错过任何日志.

I am using LogStash to collect the usage logs of my service. I am wondering how could I know if a LogStash is fully loaded and should add more servers to handle the logs? I don't want to miss any of the logs.

任何建议都会有所帮助,在此先感谢:)

Any suggestion would be helpful, thanks in advance:)

推荐答案

首先,Logstash仅解析日志并将日志事件发送到存储位置,例如:Elasticsearch!

First, Logstash is only parsing the logs and send the logs event to a place to store, ex: Elasticsearch!

如果您将Elasticsearch用作日志存储,则可以尝试安装奇迹. 它是elastcisearch的插件,安装后,您想使用它来查看日志服务状态,例如:磁盘空间,CPU,内存使用情况. 因此,您想使用它来监视您的服务并知道该服务是否已满载.

If you are using elasticsearch as your logs storage, you can try to install marvel. It is a plugin of elastcisearch, after you have install it, you want use it to view your log service status, ex: disk space, CPU, memory usage. So you want use it to monitor your service and know whether the service is fully loaded.

已更新:

如评论中所述,您的输出为file. 您需要的是经纪人. Logstash的默认消息队列是20个事件.因此,如您所说,当队列已满时,一些日志将被丢弃.因此,您需要一个代理来缓冲您的日志. logstash的推荐代理为Redis.您可以运行两个Logstash实例,一个实例是从服务器接收日志,(输入是tcp,输出是redis),另一个是您的索引器(输入是redis,输出是文件).

As discuss in the comments, your output is file. What you need is an broker. Logstash default message queue is 20 events. So, when the queue is full, as your say, some logs will be drop. So, you need an broker to buffer your logs. The recommandate broker for logstash is Redis. You can run two Logstash instances, one is receive the logs from server, (input is tcp and output is redis), the other one is your indexer (input is redis and output is file).

这篇关于如何监视LogStash是否已满载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆