使用Splunk HTTP事件收集器(HEC),如何以每秒1000个事件的最大为1000个事件批量批处理事件

发布于 2025-02-09 13:55:19 字数 494 浏览 2 评论 0 原文

我需要将批处理事件发送到Splunk HTTP事件收集器,例如每秒1000个事件。

以下是发送到Splunk HEC的5个日志事件的示例 -

% curl "https://splunk-example.com:8088/services/collector/raw?channel=093DCD-BC98-8UET-8AFE-8413C3825C4C&sourcetype=test_type&index=test_index"
-H "Authorization: Splunk ******-****-****-****-*********" -d '<log line 1>   <log line 2>  <log line 3>  <log line 4>

  Output:  {"text":"Success","code":0}%

那么,我该如何配置将应用程序日志作为1000事件/秒发送到Splunk Hec?

I need to send the batched events to Splunk HTTP Event Collector, say 1000 events per second.

Below is the example of 5 log events that are sent to Splunk HEC -

% curl "https://splunk-example.com:8088/services/collector/raw?channel=093DCD-BC98-8UET-8AFE-8413C3825C4C&sourcetype=test_type&index=test_index"
-H "Authorization: Splunk ******-****-****-****-*********" -d '<log line 1>   <log line 2>  <log line 3>  <log line 4>

  Output:  {"text":"Success","code":0}%

So how do I configure to send the application logs as 1000 events/seconds to Splunk HEC?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

平定天下 2025-02-16 13:55:19

在您的 props.conf sourceType 的文件中,您应该使用“ shose_linemerge = false” 。那将把每个日志线都分为单独的事件。

现在,如果您的活动是多行怎么办?

然后,该文档应有所帮助:

In your props.conf file for the sourcetype you should use "SHOULD_LINEMERGE = false". That'll break each log line into separate events.

Now, what if your event is multi line?

Then this document should help: https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/Configureeventlinebreaking

时光匆匆的小流年 2025-02-16 13:55:19

发送率配置IE应该在客户端进行。
我认为您不会使用“纯”卷发,而是它将是某种脚本/应用程序。因此,您的节流需要在那里完成。

The send rate configuration i.e throttling should be done on the client side.
I would assume that you will not be using "plain" curl, but rather it will be some sort of script/application. So your throttling needs to be done there.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文