<?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: Need alternative to nested if's + wildcard for time sensitive error reporting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192745#M55426</link>
    <description>&lt;P&gt;This would probably work too. The match statement did the trick as well. Thanks for the comment!&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2014 22:47:06 GMT</pubDate>
    <dc:creator>daviduslan</dc:creator>
    <dc:date>2014-03-18T22:47:06Z</dc:date>
    <item>
      <title>Need alternative to nested if's + wildcard for time sensitive error reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192742#M55423</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have the following situation that I was hoping to use nested if's to solve. We have a series of errors that are only actionable if they appear over a period of time. Many of the errors share similar messages, so I was hoping to use wildcards to capture them all. Unfortunately, wildcards don't appear to work in if statements, so I was wondering if anyone with more experience (I'm a huge noob) could point me towards a better method that accomplishes the same goal. Here is my current query:&lt;/P&gt;

&lt;PRE&gt;index=echelon sourcetype=echelon_error | eval error_type=if( message="Redis search failure*", "Search Failure", (if(message="PHP Fatal error:*", "PHP Fatal Errors", (if(message="sendsoaprequest failed*", "Soap Request Failed", (if(message="*Maximum execution time of 600 seconds exceeded*", "Max Execution Exceeded", (if(message="*Error creating performer_profile entry*", "Performer Profile Entry Error", (if(message="*exception='foo*", "MainController Failure", (if(program="/sync-staging.pl", "Staging Sync Error", ""))))))))))))) | Where error_type !="" | bucket _time span=1h | stats count AS program_count by program, error_type, _time | stats count AS program_occurred_in_x_different_hours, sum(program_count) AS error_occurrences_total by program, error_type | where program_occurred_in_x_different_hours &amp;gt; 1&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2014 17:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192742#M55423</guid>
      <dc:creator>daviduslan</dc:creator>
      <dc:date>2014-03-18T17:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need alternative to nested if's + wildcard for time sensitive error reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192743#M55424</link>
      <description>&lt;P&gt;Found the solution, OK to ignore this. Used match within the if.&lt;/P&gt;

&lt;PRE&gt;if( match(message, ".*PHP Fatal error:*."), "PHP Fatal Errors", (if&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:08:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192743#M55424</guid>
      <dc:creator>daviduslan</dc:creator>
      <dc:date>2014-03-18T18:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need alternative to nested if's + wildcard for time sensitive error reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192744#M55425</link>
      <description>&lt;P&gt;Perhaps a case statement would help.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval error_type=case (message like "Redis search failure%", "Search Failure", message like "PHP Fatal error:%", "PHP Fatal Errors", message like "sendsoaprequest failed%", "Soap Request Failed", message "%Maximum execution time of 600 seconds exceeded%", "Max Execution Exceeded", message like "%Error creating performer_profile entry%", "Performer Profile Entry Error", message like "%exception='foo%", "MainController Failure", program="/sync-staging.pl", "Staging Sync Error") | Where error_type NOT NULL | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Mar 2014 18:15:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192744#M55425</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-03-18T18:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need alternative to nested if's + wildcard for time sensitive error reporting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192745#M55426</link>
      <description>&lt;P&gt;This would probably work too. The match statement did the trick as well. Thanks for the comment!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2014 22:47:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-alternative-to-nested-if-s-wildcard-for-time-sensitive/m-p/192745#M55426</guid>
      <dc:creator>daviduslan</dc:creator>
      <dc:date>2014-03-18T22:47:06Z</dc:date>
    </item>
  </channel>
</rss>

