简体   繁体   English

Moogsoft 是否有 log4j 附加程序?

[英]Is there a log4j appender for Moogsoft?

Our current approach is to:我们目前的做法是:

  1. Send all events to Splunk (through Splunk's own log4j-appender ).将所有事件发送到 Splunk(通过Splunk 自己的 log4j-appender )。
  2. Define Splunk alerts, which trigger Moogsoft.定义触发 Moogsoft 的 Splunk 警报。

Obviously, this increases the latency and relies on Splunk more than necessary.显然,这会增加延迟并且不必要地依赖 Splunk。 Which makes me wonder, if someone has already developed a Moogsoft-appender for log4j.这让我想知道,是否有人已经为 log4j 开发了 Moogsoft-appender。

A simple search hasn't brought anything up -- hence this question.一个简单的搜索没有提出任何问题——因此这个问题。

i haven't done this, but log4j has a SocketAppender https://howtodoinjava.com/log4j/log4j-socketappender-and-socket-server-example/我还没有这样做,但 log4j 有一个 SocketAppender https://howtodoinjava.com/log4j/log4j-socketappender-and-socket-server-example/

that might fit with Moogsofts SocketLam https://docs.moogsoft.com/en/configure-the-socket-lam.html可能适合 Moogsofts SocketLam https://docs.moogsoft.com/en/configure-the-socket-lam.html

Alternatively: https://github.com/logstash/log4j-jsonevent-layout gives json layout to log4j which then could be received with a REST Lam或者: https : //github.com/logstash/log4j-jsonevent-layout为 log4j 提供 json 布局,然后可以通过 REST Lam 接收

I don't know of anyone that has put together an actual appender, but I don't think you'd need one.我不知道有谁把实际的 appender 放在一起,但我认为你不需要一个。 An HTTP appender with a JSON layout sending to a Moogsoft REST adapter should be able to do the job, and might be a lot easier to set up than handling raw bytes off a socket.带有JSON 布局HTTP appender发送到Moogsoft REST 适配器应该能够完成这项工作,并且可能比从套接字处理原始字节更容易设置。

I haven't done it so I'm not sure how much work it would be to set up.我还没有这样做,所以我不确定要设置多少工作。 I suspect there's some work involved on either the log4j side to get the layout to look like Moogsoft wants it, or on the Moogsoft side to normalize what it gets sent.我怀疑在 log4j 端需要做一些工作来使布局看起来像 Moogsoft 想要的那样,或者在 Moogsoft 端对发送的内容进行规范化。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM