<?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 Filter messages based on string in array in JSON in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465767#M80260</link>
    <description>&lt;P&gt;I am looking at filtering Kafka messages in Splunk. For that I need to be able to filter which messages show up in my search. However, since I am new to Splunk, I have no idea how to filter the way I want and 2 days of tutorials, reading and messing about haven't brought me any closer to the solution. My even data looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2020-04-01 13:59:55:803 INFO [messageCoordinator] Sent Kafka message {
"body":{
    "id":"messageID",
    "name":"messageName",
    "channels":"affectedChannels",
    "order":messageOrder, 
    ... 
 },
"headers":{
    "deltaFields":[
        "status",
        "otherString"
    ],
    "level":"messageLevel",
    "operationType":"UPDATE",
    "messageType":"messageType",
    "timestamp":1585746000000,
    "trackingId":6651814029
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;Now I need to filter based on headers.deltaFields, which is always present, always a string array but can have multiple values (up to 8 strings) in the array. &lt;/P&gt;

&lt;P&gt;I only want the event to show up in my search if certain strings are within the deltaFields. Any help would be highly appreciated.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 07:50:46 GMT</pubDate>
    <dc:creator>azudet</dc:creator>
    <dc:date>2020-04-02T07:50:46Z</dc:date>
    <item>
      <title>Filter messages based on string in array in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465767#M80260</link>
      <description>&lt;P&gt;I am looking at filtering Kafka messages in Splunk. For that I need to be able to filter which messages show up in my search. However, since I am new to Splunk, I have no idea how to filter the way I want and 2 days of tutorials, reading and messing about haven't brought me any closer to the solution. My even data looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2020-04-01 13:59:55:803 INFO [messageCoordinator] Sent Kafka message {
"body":{
    "id":"messageID",
    "name":"messageName",
    "channels":"affectedChannels",
    "order":messageOrder, 
    ... 
 },
"headers":{
    "deltaFields":[
        "status",
        "otherString"
    ],
    "level":"messageLevel",
    "operationType":"UPDATE",
    "messageType":"messageType",
    "timestamp":1585746000000,
    "trackingId":6651814029
}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;}&lt;/P&gt;

&lt;P&gt;Now I need to filter based on headers.deltaFields, which is always present, always a string array but can have multiple values (up to 8 strings) in the array. &lt;/P&gt;

&lt;P&gt;I only want the event to show up in my search if certain strings are within the deltaFields. Any help would be highly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 07:50:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465767#M80260</guid>
      <dc:creator>azudet</dc:creator>
      <dc:date>2020-04-02T07:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: Filter messages based on string in array in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465768#M80261</link>
      <description>&lt;P&gt;what's your wanted fields?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 10:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465768#M80261</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-02T10:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Filter messages based on string in array in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465769#M80262</link>
      <description>&lt;P&gt;I only want to see the event in the search when I have &lt;CODE&gt;headers.deltafields&lt;/CODE&gt; contains &lt;CODE&gt;'otherString'&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 11:01:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465769#M80262</guid>
      <dc:creator>azudet</dc:creator>
      <dc:date>2020-04-02T11:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filter messages based on string in array in JSON</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465770#M80263</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=your_index sourcetype=yours (otherString AND deltaFields)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just search with strings&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 22:03:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Filter-messages-based-on-string-in-array-in-JSON/m-p/465770#M80263</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-04-02T22:03:19Z</dc:date>
    </item>
  </channel>
</rss>

