【问题标题】:How to install multiple logstash instances on a linux machine?如何在一台 linux 机器上安装多个 logstash 实例?
【发布时间】:2017-11-17 23:08:16
【问题描述】:

如何在一台 linux 机器上安装多个 logstash 实例?我想要同时运行 2 个不同的服务(每个都有自己的配置)?

(这可能是一个简单的问题,但只是因为我是 linux 上的菜鸟,我无法弄清楚)

【问题讨论】:

标签: linux logstash amazon-linux


【解决方案1】:

@fylie 发布的链接非常有用,但仍需要一些调整。

这是我的新见解 - make a copy of /etc/init.d/logstash and adjust the name variable near the top of the file - 我不知道,但在 linux 中复制这个文件就足以创建服务。如果我将它复制到一个名为“logstash2”的文件中,我现在可以运行“service logstash2 start”并且它可以工作。

我编辑了新的 /etc/init.d/logstash2 并更改了我新创建的“logstash2”上的 LS_CONF_DIR 和 LS_LOG_DIRto new folders I've created. But it didn't work until I ranchown -R logstash:logstash /var/log/logstash2` 的值目录。

还可以通过在 /etc/sysconfig 中使用服务名称 (logstash2) 创建一个文件并取消对相关行的注释来覆盖 LS_CONF_DIR 和 LS_LOG_DIR 等。

然后为了让它作为启动服务运行,我必须运行: chkconfig --add logstash2

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-06-10
    • 1970-01-01
    • 1970-01-01
    • 2010-11-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多