<?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: Dynamically analyze fields? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62857#M15512</link>
    <description>&lt;P&gt;ok, I was think about this a different way, could you take your list of fields as just one field and search to see if you have a regex of '=[^O]' ?&lt;/P&gt;</description>
    <pubDate>Wed, 24 Aug 2011 11:58:15 GMT</pubDate>
    <dc:creator>fk319</dc:creator>
    <dc:date>2011-08-24T11:58:15Z</dc:date>
    <item>
      <title>Dynamically analyze fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62855#M15510</link>
      <description>&lt;P&gt;I have some data that looks like this:&lt;/P&gt;

&lt;P&gt;&lt;TIMESTAMP&gt; priority=INFO   thread=&lt;THREAD&gt; location=&lt;JAVA class="" name=""&gt; line=&lt;JAVA line="" number=""&gt; field1=OK,field2=OK,field3=OK....field45=OK&lt;/JAVA&gt;&lt;/JAVA&gt;&lt;/THREAD&gt;&lt;/TIMESTAMP&gt;&lt;/P&gt;

&lt;P&gt;What I need to do is analyze field1 through field45 (the number may change) to see if they all equal 'OK'.  If not 'OK' then alert.  The field names do not all start with the same thing (so no field*).&lt;/P&gt;

&lt;P&gt;I can, however, do something like this in the search:&lt;/P&gt;

&lt;P&gt;| rex "(?i)line=[\d]&lt;EM&gt;\w&lt;/EM&gt;(?P&lt;KV_PAIRS_TO_CHECK&gt;.*)" | fields host,kv_pairs_to_check| makemv kv_pairs_to_check delim=","&lt;/KV_PAIRS_TO_CHECK&gt;&lt;/P&gt;

&lt;P&gt;This is kinda giving me the data I want, but not really, and I haven't been able to figure out how to check every kv pair if the value is 'OK' for all of them.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 09:49:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62855#M15510</guid>
      <dc:creator>sf_user_199</dc:creator>
      <dc:date>2020-09-28T09:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically analyze fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62856#M15511</link>
      <description>&lt;P&gt;how about instead of putting them in a seperate field, use the same field.?&lt;/P&gt;&lt;BR /&gt;
at the moment I am not sure, but if you know the total and the number of OK's are not the same then error, or regex out the OK and report what is left over?&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;
Probably not very helpfull, but maybe someone else can expand on this idea...&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 11:46:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62856#M15511</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-08-24T11:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically analyze fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62857#M15512</link>
      <description>&lt;P&gt;ok, I was think about this a different way, could you take your list of fields as just one field and search to see if you have a regex of '=[^O]' ?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 11:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62857#M15512</guid>
      <dc:creator>fk319</dc:creator>
      <dc:date>2011-08-24T11:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically analyze fields?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62858#M15513</link>
      <description>&lt;P&gt;I won't know the exact numbers, so counting is out.  Looking for =[^O] is a great idea, however.  I'm going to play around with that...&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2011 16:07:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Dynamically-analyze-fields/m-p/62858#M15513</guid>
      <dc:creator>sf_user_199</dc:creator>
      <dc:date>2011-08-24T16:07:50Z</dc:date>
    </item>
  </channel>
</rss>

