<?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 Re: Excluding Special Characters from OTEL Splunk Format in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/680771#M113732</link>
    <description>&lt;P&gt;This is a little confusing. &amp;nbsp;I do not see special characters in field values in the provided sample. &amp;nbsp;But I see a mismatch between operators about &lt;FONT face="courier new,courier"&gt;resourceGroup&lt;/FONT&gt;. &amp;nbsp;I assume that &lt;U&gt;extract-audit-group&lt;/U&gt; and &lt;U&gt;filter-group&lt;/U&gt; are intended to match resourceGroup. &amp;nbsp;Is this correct? &amp;nbsp;In the following snippets, &lt;EM&gt;extract-audit-group&lt;/EM&gt; extracts a variable named &lt;FONT face="courier new,courier"&gt;extracted_group&lt;/FONT&gt;, whereas &lt;EM&gt;filter-group&lt;/EM&gt; calls for one named &lt;FONT face="courier new,courier"&gt;attributes.extracted_beta&lt;/FONT&gt;. &amp;nbsp;Maybe &lt;EM&gt;filter-group&lt;/EM&gt; should use &lt;FONT face="courier new,courier"&gt;extracted_group&lt;/FONT&gt; instead?&lt;/P&gt;&lt;PRE&gt;        - id: extract-audit-group

          type: regex_parser

          regex: '\s*\"resourceGroup\"\s*\:\s*\"(?P&amp;lt;extracted_group&amp;gt;[^\"]+)\"\s*'

        - id: filter-group

          type: filter

          expr: 'attributes.extracted_beta == "batch"'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Mar 2024 23:42:28 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2024-03-14T23:42:28Z</dc:date>
    <item>
      <title>Excluding Special Characters from OTEL Splunk Format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/680745#M113725</link>
      <description>&lt;P&gt;We are having difficulty getting exclusions of logs that have fields in Camelcase or have entries that have special characters related to OTEL logs. Fields without capitalization and/or special character values are able to be parsed out, but not others.&lt;/P&gt;
&lt;P&gt;Here is an example log that we are looking at (attached as yaml and key portion).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; filelog/kube-apiserver-audit-log:

        include:

        - /var/log/kubernetes/kube-apiserver.log

        include_file_name: false

        include_file_path: true

        operators:

        - id: extract-audit-group

          type: regex_parser

          regex: '\s*\"resourceGroup\"\s*\:\s*\"(?P&amp;lt;extracted_group&amp;gt;[^\"]+)\"\s*'

        - id: filter-group

          type: filter

          expr: 'attributes.extracted_beta == "batch"'

        - id: remove-extracted-group

          type: remove

          field: attributes.extracted_group

        - id: extract-audit-api

          type: regex_parser

          regex: '\"level\"\:\"(?P&amp;lt;extracted_audit_beta&amp;gt;[^\"]+)\"'

        - id: filter-api

          type: filter

          expr: 'attributes.extracted_audit_beta == "Metadata"'

        - id: remove-extracted-api

          type: remove

          field: attributes.extracted_api

        - id: extract-audit-verb

          type: regex_parser

          regex: '\"verb\"\:\"(?P&amp;lt;extracted_verb&amp;gt;[^\"]+)\"'

        - id: filter-verb

          type: filter

          expr: 'attributes.extracted_verb == "watch" || attributes.extracted_verb == "list"'

        - id: remove-extracted-verb

          type: remove

          field: attributes.extracted_verb

&lt;/LI-CODE&gt;
&lt;P&gt;The resourceGroup field is compared to something else and failing, verb and level are succeeding.&lt;/P&gt;
&lt;P&gt;Here is an example log that would be pulled in.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"apiVersion":"batch/v1","component":"sync-agent","eventType":"MODIFIED","kind":"CronJob","level":"info","msg":"sent event","name":"agentupdater-workload","namespace":"vmware-system-tmc","resourceGroup":"batch","resourceType":"cronjobs","resourceVersion":"v1","time":"2024-03-14T18:17:11Z"}&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Mar 2024 19:51:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/680745#M113725</guid>
      <dc:creator>padresman</dc:creator>
      <dc:date>2024-03-14T19:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding Special Characters from OTEL Splunk Format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/680771#M113732</link>
      <description>&lt;P&gt;This is a little confusing. &amp;nbsp;I do not see special characters in field values in the provided sample. &amp;nbsp;But I see a mismatch between operators about &lt;FONT face="courier new,courier"&gt;resourceGroup&lt;/FONT&gt;. &amp;nbsp;I assume that &lt;U&gt;extract-audit-group&lt;/U&gt; and &lt;U&gt;filter-group&lt;/U&gt; are intended to match resourceGroup. &amp;nbsp;Is this correct? &amp;nbsp;In the following snippets, &lt;EM&gt;extract-audit-group&lt;/EM&gt; extracts a variable named &lt;FONT face="courier new,courier"&gt;extracted_group&lt;/FONT&gt;, whereas &lt;EM&gt;filter-group&lt;/EM&gt; calls for one named &lt;FONT face="courier new,courier"&gt;attributes.extracted_beta&lt;/FONT&gt;. &amp;nbsp;Maybe &lt;EM&gt;filter-group&lt;/EM&gt; should use &lt;FONT face="courier new,courier"&gt;extracted_group&lt;/FONT&gt; instead?&lt;/P&gt;&lt;PRE&gt;        - id: extract-audit-group

          type: regex_parser

          regex: '\s*\"resourceGroup\"\s*\:\s*\"(?P&amp;lt;extracted_group&amp;gt;[^\"]+)\"\s*'

        - id: filter-group

          type: filter

          expr: 'attributes.extracted_beta == "batch"'&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 23:42:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/680771#M113732</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-14T23:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding Special Characters from OTEL Splunk Format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/680785#M113736</link>
      <description>&lt;P&gt;Thanks for the response yuanliu, much appreciated, and sorry for the confusion. You're right that those fields should match up - it should look like the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;        - id: extract-audit-group

          type: regex_parser

          regex: '\"resourceGroup\"\:\"(?P&amp;lt;extracted_group&amp;gt;[^\"]+)\"'

        - id: filter-group

          type: filter

          expr: 'attributes.extracted_group == "batch"'

        - id: remove-extracted-group

          type: remove

          field: attributes.extracted_group&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Id field can be named just about anything, so difference among names there doesn't matter. We've gone through quite a few iterations of testing which is why there was a discrepancy there. What we have narrowed down the problem in our testing is&amp;nbsp;&lt;EM&gt;either&amp;nbsp;&lt;/EM&gt;the camelCase is causing a regex issue with the field,&amp;nbsp;&lt;EM&gt;or&amp;nbsp;&lt;/EM&gt;special characters within a value are causing an issue (or both, my hunch is that it is the camelCase, but we haven't had success with either).&amp;nbsp; Putting these results into a regex RE2 parser gets the results we expect, but not with the actual deployed OTEL.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2024 03:13:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/680785#M113736</guid>
      <dc:creator>padresman</dc:creator>
      <dc:date>2024-03-15T03:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding Special Characters from OTEL Splunk Format</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/681871#M113924</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/265939"&gt;@padresman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Will try your example. Gotta be very careful that your expression fields match the capture group you use, as it will store it in "attributes."capture group value" by default.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, make sure to use golang regex on regex101. though your regex appears to be fine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also its wise to iterate and NOT remove the fields you make to see what they look like when they arrive at splunk. Can help make sure your value is what you think it is.....&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 15:12:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Excluding-Special-Characters-from-OTEL-Splunk-Format/m-p/681871#M113924</guid>
      <dc:creator>mattymo</dc:creator>
      <dc:date>2024-03-25T15:12:44Z</dc:date>
    </item>
  </channel>
</rss>

