<?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: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357634#M105798</link>
    <description>&lt;P&gt;OK, assuming that the problem is that a field called &lt;CODE&gt;errorMsg&lt;/CODE&gt; does not exist, try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=its_akana* source="/apps/logs/*" host=ent5*ll5app ("at the below stack trace. Not closed in the same method" OR
"Cannot get a connection, pool exhausted" OR
"com.digev.fw.exception.GException: Execution of a DB command failed" OR
"com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR" OR
"com.mongodb.MongoSocketOpenException" OR
"com.mongodb.MongoTimeoutException" OR
"Data truncation" OR
"ERROR [DBStatementAndResultSetTracker] PreparedStatementTracker" OR
"Error encountered in WS-Security engine" OR
"Error in creating Prepared statement for the query" OR
"federation member auth token cannot be refreshed" OR
"GC overhead limit exceeded" OR
"Illegal character" OR
"java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer" OR
"java.lang.StackOverflowError" OR
"Log block not closed correctly. Enable log block tracking to see diagnostic information" OR
"Log frame is closed at the below stack trace" OR
"No corresponding startTraceBlock() is seen" OR
"No key found in WSDL for service" OR
"No process found" OR
"No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error" OR
"OutOfMemoryError" OR
"Timeout waiting for idle object" OR
"Unable to initialize SiteMinder agent" OR
"UsageJDBCWriter.writeUsage" OR
"Wsdl does not conform to wsdl schema" OR
"org.elasticsearch.action.UnavailableShardsException" OR
"None of the configured nodes are available") 

| rename COMMENT AS "You can get rid of the following line if you ever get the field extraction working"
| rex "(?&amp;lt;errorMsg&amp;gt;at the below stack trace. Not closed in the same method|Cannot get a connection, pool exhausted|com.digev.fw.exception.GException: Execution of a DB command failed|com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR|com.mongodb.MongoSocketOpenException|com.mongodb.MongoTimeoutException|Data truncation|ERROR [DBStatementAndResultSetTracker] PreparedStatementTracker|Error encountered in WS-Security engine|Error in creating Prepared statement for the query|federation member auth token cannot be refreshed|GC overhead limit exceeded|Illegal character|java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer|java.lang.StackOverflowError|Log block not closed correctly. Enable log block tracking to see diagnostic information|Log frame is closed at the below stack trace|No corresponding startTraceBlock() is seen|No key found in WSDL for service|No process found|No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error|OutOfMemoryError|Timeout waiting for idle object|Unable to initialize SiteMinder agent|UsageJDBCWriter.writeUsage|Wsdl does not conform to wsdl schema|org.elasticsearch.action.UnavailableShardsException|None of the configured nodes are available)"

| chart count BY host errorMsg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Mar 2017 16:51:48 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-03-20T16:51:48Z</dc:date>
    <item>
      <title>Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357611#M105775</link>
      <description>&lt;P&gt;Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?&lt;/P&gt;

&lt;P&gt;edit: here's what I'm trying to do&lt;BR /&gt;
ie, "eval myField=( "value1", "value2", "value3") | stats count by myField"&lt;/P&gt;

&lt;P&gt;Where "value1", "value2", "value3" are literal strings.&lt;/P&gt;

&lt;P&gt;I want to get a count for how many "value1"s, "value2"s, and "value3"s there are&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357611#M105775</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-15T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357612#M105776</link>
      <description>&lt;P&gt;Could you please post some sudo query on what you want to achieve, possible with some examples?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:31:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357612#M105776</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-15T15:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357613#M105777</link>
      <description>&lt;P&gt;Not quite clear from your question, but an example would be helpful.&lt;/P&gt;

&lt;P&gt;But just a guess, are you looking for something like this ? &lt;A href="https://answers.splunk.com/answers/103700/how-do-i-create-a-field-whose-name-is-the-value-of-another-field-like-backticks-or-eval-in-other-languages.html"&gt;https://answers.splunk.com/answers/103700/how-do-i-create-a-field-whose-name-is-the-value-of-another-field-like-backticks-or-eval-in-other-languages.html&lt;/A&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults| eval aKey="Field1" | eval aValue=123 | eval {aKey}=aValue | table aKey,aValue,Field1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:33:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357613#M105777</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2017-03-15T15:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357614#M105778</link>
      <description>&lt;P&gt;ie, "eval myField=( "value1", "value2", "value3") | stats count by myField"&lt;/P&gt;

&lt;P&gt;Where "value1", "value2", "value3" are literal strings.&lt;/P&gt;

&lt;P&gt;I want to get a count for how many "value1"s, "value2"s, and "value3"s there are&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:34:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357614#M105778</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-15T15:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357615#M105779</link>
      <description>&lt;P&gt;How are the values for string "value1", "value2"... coming, static/fix string or dynamically?&lt;/P&gt;

&lt;P&gt;If they are static/fixed and limited, something like this would work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| eval myField=if(match(myField,"value1"),"value1", match(myField,"value2"),"value2", match(myField,"value3"),"value3") | stats count by myField
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If they are move in number, you can put them in a lookup table file say myfield_value.csv with column name as myfieldvalue, and try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| lookup myfield_value.csv myfieldvalue as myField OUTPUT myfieldvalue as myField  | stats count by myField
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Mar 2017 15:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357615#M105779</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-15T15:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357616#M105780</link>
      <description>&lt;P&gt;Assuming that you are just matching strings in the raw events (the strings are not accessed by a field name), then like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Base Search Here | stats 
[| makeresults 
 | eval errorMsg="value1::value2::INFO" 
 | makemv delim="::" errorMsg
 | format "" "" "" "" "" "" 
 | rex field=search mode=sed "s/\( errorMsg=| OR errorMsg=/ count(eval(searchmatch(/g s/\" count\(/\")) count(/g s/\s*\)  $/))/ s/\"([^\"]+)\"\)\)/\"\1\"))) AS \"\1\"/g"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you do indeed have field names that contain these strings, then like this (you might have to change the field name &lt;CODE&gt;errorMsg&lt;/CODE&gt; to your field name):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your Base Search Here | stats 
[| makeresults 
| eval errorMsg="value1::value2::value2" 
| makemv delim="::" errorMsg 
| rex field=errorMsg mode=sed "s/[\r\n]//g"
| format "" "" "" "" "" "" 
| rex field=search mode=sed "s/\(| OR / count(eval(/g s/\" count\(/\")) count(/g s/\s*\)  $/))/ s/\"([^\"]+)\"\)\)/\"\1\")) AS \"\1\"/g"]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can make this into a macro.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 21:11:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357616#M105780</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-15T21:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357617#M105781</link>
      <description>&lt;P&gt;Now it throws the following error: Error in 'stats' command: You must specify a rename for the aggregation specifier on the dynamically evaluated field 'count(eval( errorMsg="at the below stack trace. Not closed in the same method"))'.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 15:47:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357617#M105781</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-16T15:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357618#M105782</link>
      <description>&lt;P&gt;Try replacing the last line with this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=search mode=sed "s/\(| OR / count(eval(/g s/\" count\(/\")) count(/g s/\s*\)  $/))/ s/\"(\w+)\"\)\)/\"\1\")) AS \1/g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Mar 2017 18:28:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357618#M105782</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-16T18:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357619#M105783</link>
      <description>&lt;P&gt;Answer updated to account for spacing variances in &lt;CODE&gt;format&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 18:28:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357619#M105783</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-16T18:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357620#M105784</link>
      <description>&lt;P&gt;Still throwing the same error&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 18:37:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357620#M105784</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-16T18:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357621#M105785</link>
      <description>&lt;P&gt;This is the full search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=its_akana* source="/apps/logs/*" host=ent5*ll5app ("at the below stack trace. Not closed in the same method" OR
"Cannot get a connection, pool exhausted" OR
"com.digev.fw.exception.GException: Execution of a DB command failed" OR
"com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR" OR
"com.mongodb.MongoSocketOpenException" OR
"com.mongodb.MongoTimeoutException" OR
"Data truncation" OR
"ERROR [DBStatementAndResultSetTracker] PreparedStatementTracker" OR
"Error encountered in WS-Security engine" OR
"Error in creating Prepared statement for the query" OR
"federation member auth token cannot be refreshed" OR
"GC overhead limit exceeded" OR
"Illegal character" OR
"java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer" OR
"java.lang.StackOverflowError" OR
"Log block not closed correctly. Enable log block tracking to see diagnostic information" OR
"Log frame is closed at the below stack trace" OR
"No corresponding startTraceBlock() is seen" OR
"No key found in WSDL for service" OR
"No process found" OR
"No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error" OR
"OutOfMemoryError" OR
"Timeout waiting for idle object" OR
"Unable to initialize SiteMinder agent" OR
"UsageJDBCWriter.writeUsage" OR
"Wsdl does not conform to wsdl schema" OR
"org.elasticsearch.action.UnavailableShardsException" OR
"None of the configured nodes are available" 
) | stats 
 [| makeresults | eval errorMsg="at the below stack trace. Not closed in the same method::
com.digev.fw.exception.GException: Execution of a DB command failed::
com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERR::
com.mongodb.MongoSocketOpenException::
com.mongodb.MongoTimeoutException::
Data truncation::
ERR [DBStatementAndResultSetTracker] PreparedStatementTracker::
Error encountered in WS-Security engine::
Error in creating Prepared statement for the query::
federation member auth token cannot be refreshed::
GC overhead limit exceeded::
Illegal character::
java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer::
java.lang.StackOverflowError::
Log block not closed correctly. Enable log block tracking to see diagnostic information::
Log frame is closed at the below stack trace::
No corresponding startTraceBlock() is seen::
No key found in WSDL for service::
No process found::
No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error::
OutOfMemoryError::
Timeout waiting for idle object::
Unable to initialize SiteMinder agent::
UsageJDBCWriter.writeUsage::
Wsdl does not conform to wsdl schema::
org.elasticsearch.action.UnavailableShardsException::
None of the configured nodes are available::
Cannot get a connection, pool exhausted" | makemv delim="::" errorMsg
 | format "" "" "" "" "" "" | rex field=search mode=sed "s/\(| OR / count(eval(/g s/\" count\(/\")) count(/g s/\s*\)  $/))/ s/\"(\w+)\"\)\)/\"\1\")) AS \1/g"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Mar 2017 18:39:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357621#M105785</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-16T18:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357622#M105786</link>
      <description>&lt;P&gt;Now we are talking.  The missing piece was that your &lt;CODE&gt;values&lt;/CODE&gt; have spaces.  See my updated answer; it is tested and working but the field names are TERRIBLE.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2017 19:16:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357622#M105786</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-16T19:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357623#M105787</link>
      <description>&lt;P&gt;What I'm trying to get is a count of how many times each string appears per unit time. That doesn't seem to be happening when I run the amended search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=its_akana* source="/apps/logs/*" host=ent5*ll5app ("at the below stack trace. Not closed in the same method" OR
"Cannot get a connection, pool exhausted" OR
"com.digev.fw.exception.GException: Execution of a DB command failed" OR
"com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR" OR
"com.mongodb.MongoSocketOpenException" OR
"com.mongodb.MongoTimeoutException" OR
"Data truncation" OR
"ERROR [DBStatementAndResultSetTracker] PreparedStatementTracker" OR
"Error encountered in WS-Security engine" OR
"Error in creating Prepared statement for the query" OR
"federation member auth token cannot be refreshed" OR
"GC overhead limit exceeded" OR
"Illegal character" OR
"java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer" OR
"java.lang.StackOverflowError" OR
"Log block not closed correctly. Enable log block tracking to see diagnostic information" OR
"Log frame is closed at the below stack trace" OR
"No corresponding startTraceBlock() is seen" OR
"No key found in WSDL for service" OR
"No process found" OR
"No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error" OR
"OutOfMemoryError" OR
"Timeout waiting for idle object" OR
"Unable to initialize SiteMinder agent" OR
"UsageJDBCWriter.writeUsage" OR
"Wsdl does not conform to wsdl schema" OR
"org.elasticsearch.action.UnavailableShardsException" OR
"None of the configured nodes are available" 
) | stats 
 [| makeresults | eval errorMsg="at the below stack trace. Not closed in the same method::
com.digev.fw.exception.GException: Execution of a DB command failed::
com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERR::
com.mongodb.MongoSocketOpenException::
com.mongodb.MongoTimeoutException::
Data truncation::
ERR [DBStatementAndResultSetTracker] PreparedStatementTracker::
Error encountered in WS-Security engine::
Error in creating Prepared statement for the query::
federation member auth token cannot be refreshed::
GC overhead limit exceeded::
Illegal character::
java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer::
java.lang.StackOverflowError::
Log block not closed correctly. Enable log block tracking to see diagnostic information::
Log frame is closed at the below stack trace::
No corresponding startTraceBlock() is seen::
No key found in WSDL for service::
No process found::
No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error::
OutOfMemoryError::
Timeout waiting for idle object::
Unable to initialize SiteMinder agent::
UsageJDBCWriter.writeUsage::
Wsdl does not conform to wsdl schema::
org.elasticsearch.action.UnavailableShardsException::
None of the configured nodes are available::
Cannot get a connection, pool exhausted" | makemv delim="::" errorMsg
 | rex field=errorMsg mode=sed "s/[\r\n]//g"| format "" "" "" "" "" "" | rex field=search mode=sed "s/\(| OR / count(eval(/g s/\" count\(/\")) count(/g s/\s*\)  $/))/ s/\"([^\"]+)\"\)\)/\"\1\")) AS \"\1\"/g"] | stats count by errorMsg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Mar 2017 19:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357623#M105787</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-16T19:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357624#M105788</link>
      <description>&lt;P&gt;Drop this part:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count by errorMsg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Mar 2017 20:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357624#M105788</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-16T20:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357625#M105789</link>
      <description>&lt;P&gt;Why does this not work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=its_akana* source="/apps/logs/*" host=ent5*ll5app ("at the below stack trace. Not closed in the same method" OR
"Cannot get a connection, pool exhausted" OR
"com.digev.fw.exception.GException: Execution of a DB command failed" OR
"com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR" OR
"com.mongodb.MongoSocketOpenException" OR
"com.mongodb.MongoTimeoutException" OR
"Data truncation" OR
"ERROR [DBStatementAndResultSetTracker] PreparedStatementTracker" OR
"Error encountered in WS-Security engine" OR
"Error in creating Prepared statement for the query" OR
"federation member auth token cannot be refreshed" OR
"GC overhead limit exceeded" OR
"Illegal character" OR
"java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer" OR
"java.lang.StackOverflowError" OR
"Log block not closed correctly. Enable log block tracking to see diagnostic information" OR
"Log frame is closed at the below stack trace" OR
"No corresponding startTraceBlock() is seen" OR
"No key found in WSDL for service" OR
"No process found" OR
"No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error" OR
"OutOfMemoryError" OR
"Timeout waiting for idle object" OR
"Unable to initialize SiteMinder agent" OR
"UsageJDBCWriter.writeUsage" OR
"Wsdl does not conform to wsdl schema" OR
"org.elasticsearch.action.UnavailableShardsException" OR
"None of the configured nodes are available"
| stats count by errorMsg
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Mar 2017 20:04:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357625#M105789</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-16T20:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357626#M105790</link>
      <description>&lt;P&gt;That produces a table, which doesn't seem to be picking up the counts of the strings. Each string in the table says 0, but that's not accurate&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 12:40:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357626#M105790</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-17T12:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357627#M105791</link>
      <description>&lt;P&gt;Because errorMsg isn't a native field in the data. It's one I have to create&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2017 12:41:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357627#M105791</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-17T12:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357628#M105792</link>
      <description>&lt;P&gt;OK, try the updated answer (the top one of the 2).&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 22:20:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357628#M105792</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-18T22:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357629#M105793</link>
      <description>&lt;P&gt;Then my other solution ABSOLUTELY POSITIVELY should work (the one that is now the bottom one in the pair of the other answer).&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2017 22:21:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357629#M105793</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-18T22:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to search for a list of strings, and for each match, put that string as the value of the same field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357630#M105794</link>
      <description>&lt;P&gt;Making progress. The search produces a table with counts for the frequency of each literal string, but the search itself does not seem to produce the errorMsg field itself when searching in Verbose mode. I would like to be able to produce the errorMsg field so I can add it to tables, or grab the errorMsg value for alerts, etc&lt;/P&gt;

&lt;P&gt;The full search query is below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=its_akana* source="/apps/logs/*" host=ent5*ll5app ("at the below stack trace. Not closed in the same method" OR
"Cannot get a connection, pool exhausted" OR
"com.digev.fw.exception.GException: Execution of a DB command failed" OR
"com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR" OR
"com.mongodb.MongoSocketOpenException" OR
"com.mongodb.MongoTimeoutException" OR
"Data truncation" OR
"ERROR [DBStatementAndResultSetTracker] PreparedStatementTracker" OR
"Error encountered in WS-Security engine" OR
"Error in creating Prepared statement for the query" OR
"federation member auth token cannot be refreshed" OR
"GC overhead limit exceeded" OR
"Illegal character" OR
"java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer" OR
"java.lang.StackOverflowError" OR
"Log block not closed correctly. Enable log block tracking to see diagnostic information" OR
"Log frame is closed at the below stack trace" OR
"No corresponding startTraceBlock() is seen" OR
"No key found in WSDL for service" OR
"No process found" OR
"No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error" OR
"OutOfMemoryError" OR
"Timeout waiting for idle object" OR
"Unable to initialize SiteMinder agent" OR
"UsageJDBCWriter.writeUsage" OR
"Wsdl does not conform to wsdl schema" OR
"org.elasticsearch.action.UnavailableShardsException" OR
"None of the configured nodes are available" 
) | stats
 [| makeresults | eval errorMsg="at the below stack trace. Not closed in the same method::
com.digev.fw.exception.GException: Execution of a DB command failed::
com.digev.fw.exception.GException: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERR::
com.mongodb.MongoSocketOpenException::
com.mongodb.MongoTimeoutException::
Data truncation::
ERR [DBStatementAndResultSetTracker] PreparedStatementTracker::
Error encountered in WS-Security engine::
Error in creating Prepared statement for the query::
federation member auth token cannot be refreshed::
GC overhead limit exceeded::
Illegal character::
java.lang.NullPointerException at com.soa.jbi.component.http.marshal.impl.OutgoingExchangeInitializer::
java.lang.StackOverflowError::
Log block not closed correctly. Enable log block tracking to see diagnostic information::
Log frame is closed at the below stack trace::
No corresponding startTraceBlock() is seen::
No key found in WSDL for service::
No process found::
No Subject is associated with the call. Only Container identities can invoke this call. Returning authorization error::
OutOfMemoryError::
Timeout waiting for idle object::
Unable to initialize SiteMinder agent::
UsageJDBCWriter.writeUsage::
Wsdl does not conform to wsdl schema::
org.elasticsearch.action.UnavailableShardsException::
None of the configured nodes are available::
Cannot get a connection, pool exhausted" | makemv delim="::" errorMsg
  | format "" "" "" "" "" "" 
  | rex field=search mode=sed "s/\( errorMsg=| OR errorMsg=/ count(eval(searchmatch(/g s/\" count\(/\")) count(/g s/\s*\)  $/))/ s/\"([^\"]+)\"\)\)/\"\1\"))) AS \"\1\"/g"]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-there-a-way-to-search-for-a-list-of-strings-and-for-each/m-p/357630#M105794</guid>
      <dc:creator>Lucas_Henry_</dc:creator>
      <dc:date>2017-03-20T14:19:20Z</dc:date>
    </item>
  </channel>
</rss>

