<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Drop messages when using OTEL collector in Kubernetes in Splunk Cloud Platform</title>
    <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/649138#M2337</link>
    <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;I'm using the Splunk OpenTelemetry collector to send logs from k8s to Splunk through HEC input. It's running as DaemonSet.&lt;/P&gt;&lt;P&gt;The collector is deployed via Helm Chart:&amp;nbsp;&lt;A href="https://github.com/signalfx/splunk-otel-collector-chart" target="_blank" rel="noopener"&gt;https://github.com/signalfx/splunk-otel-collector-chart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would like to exclude logs with specific string, for example: "Connection reset by peer", but cannot find the configuration that would be able to do that. It looks like the processors can do that:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://opentelemetry.io/docs/collector/configuration/#processors" target="_blank" rel="noopener"&gt;https://opentelemetry.io/docs/collector/configuration/#processors&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And also there is a default configuration for opentelemetry in the chart, but I cannot understand how to add filter to it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/signalfx/splunk-otel-collector-chart/blob/main/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl#L35" target="_blank" rel="noopener"&gt;https://github.com/signalfx/splunk-otel-collector-chart/blob/main/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl#L35&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Has anyone encountered such issue or do you have any advices for this case?&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jul 2023 14:13:58 GMT</pubDate>
    <dc:creator>d_kazakov</dc:creator>
    <dc:date>2023-07-04T14:13:58Z</dc:date>
    <item>
      <title>Drop messages when using OTEL collector in Kubernetes</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/649138#M2337</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;I'm using the Splunk OpenTelemetry collector to send logs from k8s to Splunk through HEC input. It's running as DaemonSet.&lt;/P&gt;&lt;P&gt;The collector is deployed via Helm Chart:&amp;nbsp;&lt;A href="https://github.com/signalfx/splunk-otel-collector-chart" target="_blank" rel="noopener"&gt;https://github.com/signalfx/splunk-otel-collector-chart&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would like to exclude logs with specific string, for example: "Connection reset by peer", but cannot find the configuration that would be able to do that. It looks like the processors can do that:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://opentelemetry.io/docs/collector/configuration/#processors" target="_blank" rel="noopener"&gt;https://opentelemetry.io/docs/collector/configuration/#processors&lt;/A&gt;&lt;/P&gt;&lt;P&gt;And also there is a default configuration for opentelemetry in the chart, but I cannot understand how to add filter to it:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/signalfx/splunk-otel-collector-chart/blob/main/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl#L35" target="_blank" rel="noopener"&gt;https://github.com/signalfx/splunk-otel-collector-chart/blob/main/helm-charts/splunk-otel-collector/templates/config/_otel-collector.tpl#L35&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Has anyone encountered such issue or do you have any advices for this case?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 14:13:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/649138#M2337</guid>
      <dc:creator>d_kazakov</dc:creator>
      <dc:date>2023-07-04T14:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Drop messages when using OTEL collector in Kubernetes</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672380#M2694</link>
      <description>&lt;P&gt;I am also looking for something like this. Does anyone tried to do this and is that worked?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 09:54:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672380#M2694</guid>
      <dc:creator>dhimanv</dc:creator>
      <dc:date>2023-12-20T09:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Drop messages when using OTEL collector in Kubernetes</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672383#M2695</link>
      <description>&lt;P&gt;Hey, dhimanv!&lt;/P&gt;&lt;P&gt;I've managed to achieve it. Splunk OnDemand request assisted with this issue. So there are a couple of options, but in my case, these filters worked to cut some fields in the JSON body to decrease the amount of GB we ingest:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;logsCollection:&lt;BR /&gt;containers:&lt;BR /&gt;enabled: true&lt;BR /&gt;useSplunkIncludeAnnotation: true&lt;BR /&gt;extraOperators:&lt;BR /&gt;- type: router&lt;BR /&gt;default: noop-router&lt;BR /&gt;routes:&lt;BR /&gt;- expr: body contains "timestamp" and attributes.log matches "^{.*}$"&lt;BR /&gt;output: remove-nginx-keys&lt;BR /&gt;- expr: body contains "timestamp" and attributes.log matches "^{.*}\\n$"&lt;BR /&gt;output: remove-nginx-keys&lt;BR /&gt;- type: json_parser&lt;BR /&gt;id: remove-nginx-keys&lt;BR /&gt;parse_from: attributes.log&lt;BR /&gt;parse_to: attributes.log&lt;BR /&gt;- type: remove&lt;BR /&gt;field: 'attributes.log.cf_ray'&lt;BR /&gt;on_error: send&lt;BR /&gt;- type: remove&lt;BR /&gt;field: 'attributes.log.proxyUpstreamName'&lt;BR /&gt;on_error: send&lt;BR /&gt;- type: remove&lt;BR /&gt;field: 'attributes.log.proxyAlternativeUpstreamName'&lt;BR /&gt;on_error: send&lt;BR /&gt;- type: remove&lt;BR /&gt;field: 'attributes.log.upstreamAddr'&lt;BR /&gt;on_error: send&lt;BR /&gt;- type: remove&lt;BR /&gt;field: 'attributes.log.upstreamStatus'&lt;BR /&gt;on_error: send&lt;BR /&gt;- type: remove&lt;BR /&gt;field: 'attributes.log.requestID'&lt;BR /&gt;on_error: send&lt;BR /&gt;- id: noop-router&lt;BR /&gt;type: noop&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So the JSON goes from:&lt;/DIV&gt;&lt;DIV&gt;{"timestamp": "2023-12-20T10:05:17+00:00", "requestID": "ID", "proxyUpstreamName": "service-name", "proxyAlternativeUpstreamName": "","upstreamStatus": "200", "upstrea&lt;BR /&gt;mAddr": "IP:4444", "Host": "DNS", "httpRequest":{"requestMethod": "POST", "requestUrl": "/request", "status": 200, "requestSize": "85", "responseSize": "14", "userAgent": "Google", "remoteIp": "IP", "referer": "", "latency": "0.003 s", "protocol": "HTTP/2.0"}, "cf_ray":&lt;BR /&gt;"1239kvksad2139kc923"}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;To:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;{ [-]&lt;BR /&gt;Host: web.web.eu&lt;BR /&gt;httpRequest: { [-]&lt;BR /&gt;latency: 0.092 s&lt;BR /&gt;protocol: HTTP/1.1&lt;BR /&gt;referer: referer&lt;BR /&gt;remoteIp: IP&lt;BR /&gt;requestMethod: GET&lt;BR /&gt;requestSize: 834&lt;BR /&gt;requestUrl: /request&lt;BR /&gt;responseSize: 133&lt;BR /&gt;status: 200&lt;BR /&gt;userAgent: agent&lt;BR /&gt;}&lt;BR /&gt;timestamp: 2023-12-20T10:05:08+00:00&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hope this helps!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Dec 2023 10:13:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672383#M2695</guid>
      <dc:creator>d_kazakov</dc:creator>
      <dc:date>2023-12-20T10:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Drop messages when using OTEL collector in Kubernetes</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672384#M2696</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/249079"&gt;@d_kazakov&lt;/a&gt;&amp;nbsp; for response.&lt;BR /&gt;&lt;BR /&gt;I was looking for solution like if a log entry contains a specific string, then that entire log entry should be excluded to push to Splunk indexer.&lt;BR /&gt;&lt;BR /&gt;Let me check if this solution work in that case or need to alert it.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 10:18:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672384#M2696</guid>
      <dc:creator>dhimanv</dc:creator>
      <dc:date>2023-12-20T10:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: Drop messages when using OTEL collector in Kubernetes</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672385#M2697</link>
      <description>&lt;P&gt;In this case, you can update filters like this:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;gateway:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; enabled: true&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; resources:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; requests:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; cpu: 100m&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; memory: 500Mi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; limits:&lt;/SPAN&gt; &lt;SPAN class=""&gt;memory: 500Mi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; replicaCount: 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; config:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; processors:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; filter/filter:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; logs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; log_record:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - 'IsMatch(body, ".*bot.*") == false'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;service:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;pipelines:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;logs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;processors:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- filter/filter&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;This way, when data is coming to the gateway it will be filtered an all log entries with "bot" in the body will be removed.&lt;/P&gt;&lt;P&gt;BTW, previous configuration also must be under gateway&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 10:27:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/Drop-messages-when-using-OTEL-collector-in-Kubernetes/m-p/672385#M2697</guid>
      <dc:creator>d_kazakov</dc:creator>
      <dc:date>2023-12-20T10:27:56Z</dc:date>
    </item>
  </channel>
</rss>

