Logstash转发器作为Windows服务 [英] Logstash-forwarder as Windows Service
问题描述
我正在努力为Windows 2008 R2 Server上的logstash转发器创建一个Windows服务。
我的设置如下:
Ubuntu服务器14.04 LTS
- 弹性搜索
- Logstash
- Kibana
Windows Server 2008 R2:
<
我目前正在使用Windows编译的Logstash转发器,使用这里的说明将日志成功发送到ELK-Stack ... https://github.com/elastic/logstash-forwarder 。唯一的问题是,我必须在CLI窗口中运行logstash转发器,我无法将其设置为Windows服务。
ve尝试了以下SC命令,该服务已创建,但服务根本无法启动。只需返回以下错误:服务没有及时响应启动或控制请求。
sc create LogstashForwarder binpath =\C:\_Logstash\logstash-forwarder.exe\-config = \C:\_Logstash\logstash-forwarder.conf\start = Auto displayname =Logstash转发器
不幸的是Google也不知道任何答案。
有没有人能够使用SC命令在Windows上启动logstash转发器作为Windows服务?一些很好的建议将非常感激。
如果您的logstash配置正确,请尝试这些步骤。
- 获取 nssm 软
- 解压缩nssm zip logstash的bin文件夹
-
从命令行显示 nssm install logstash
-
在启动的配置屏幕上添加您的蝙蝠的路径
- 添加您的启动目录。
这里您可以获得更多帮助
https://blog.basefarm.com/blog/how-to-install-logstash-on-windows- server-2012-with-kibana-in-iis /
https://github.com/verbosemode/public-notes/blob/master/logstash-windows.md
希望thi帮助
I'm struggling to create a Windows Service for a logstash forwarder on Windows 2008 R2 Server.
My setup looks as follows:
Ubuntu Server 14.04 LTS
- Elasticsearch
- Logstash
- Kibana
Windows Server 2008 R2:
- Application logging to a certain path.
- Ship logs to the ELK Stack via Logstash-forwarder
I'm currently shipping logs successfully to the ELK-Stack via Logstash forwarder compiled for Windows using the instructions here... https://github.com/elastic/logstash-forwarder. The only problem is, that I have to run the logstash forwarder in a CLI window, and I'm not able to set it up as a Windows Service.
I've tryed the following SC command, the service is created but the service will not start at all. Just returning the following error: The service did not respond to the start or control request in a timely fashion.
sc create LogstashForwarder binpath= "\"C:\_Logstash\logstash-forwarder.exe\" -config=\"C:\_Logstash\logstash-forwarder.conf\"" start= Auto displayname= "Logstash forwarder"
Unfortunately Google does not know any answer either.
Does anyone have been able to start the logstash forwarder on Windows as a Windows Service with the SC command? Some good advice will be very appreciated.
If your logstash configuration is correct try these steps.
- Get nssm soft
- Decompress the nssm zip in the bin folder of logstash
Excecute from command line nssm install logstash
Add the path to your bat on the launched config screen
- Add your startup directory too.
Here you can get some more help
https://blog.basefarm.com/blog/how-to-install-logstash-on-windows-server-2012-with-kibana-in-iis/
https://github.com/verbosemode/public-notes/blob/master/logstash-windows.md
Hope this help
这篇关于Logstash转发器作为Windows服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!