<?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: Search Error labels and level=Error both in same bucket in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529211#M149423</link>
    <description>&lt;P&gt;Have you seen the Splunk SPL for SQL Users manual?&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/SQLtoSplunk" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/SQLtoSplunk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;1) Without knowing the context, you can try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;level="ERROR" OR ("Failed" OR "Exception" OR "Fatal")&lt;/LI-CODE&gt;&lt;P&gt;2) The easiest way to do that is via the UI.&amp;nbsp; Edit the dashboard and click on the hamburger (triple-dot) icon in the panel&amp;nbsp; Select "Edit Drilldown".&amp;nbsp; Choose "Link to search" from the dropdown then select Custom.&amp;nbsp; Enter the search you want to run.&amp;nbsp; Use tokens to employ fields from the dashboard.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Nov 2020 20:14:38 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2020-11-12T20:14:38Z</dc:date>
    <item>
      <title>Search  strings and conditions together</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529179#M149415</link>
      <description>&lt;P&gt;Splunk is too powerful. But i wish the search criteria language would have been more generic something like sql &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have 3 buckets for error, warning and info for each source type.&lt;/P&gt;&lt;P&gt;Need help from experts&lt;/P&gt;&lt;P&gt;1) to add condition in error bucket like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;level="ERROR" or log contains any of these ("Failed","Exception","Fatal")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) also in dashboard line chart if i clicked on the error line, it should actually take me those error logs. Is it possible ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;application Name&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;Spark application logs&amp;lt;/description&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;title&amp;gt;logs&amp;lt;/title&amp;gt;
      &amp;lt;chart&amp;gt;
        &amp;lt;title&amp;gt;Streaming Error Count&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=myindex  sourcetype=mysourceType1 |  
           timechart count as total_logs count(eval(level="INFO")) as total_info  count(eval(level="WARN")) as total_warn count(eval(level="ERROR")) as total_error span=1h&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-7d@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="charting.chart"&amp;gt;line&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.chart.showDataLabels"&amp;gt;minmax&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;option name="charting.layout.splitSeries"&amp;gt;0&amp;lt;/option&amp;gt;
      &amp;lt;/chart&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 05:47:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529179#M149415</guid>
      <dc:creator>satyajit2007</dc:creator>
      <dc:date>2020-11-13T05:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Search Error labels and level=Error both in same bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529211#M149423</link>
      <description>&lt;P&gt;Have you seen the Splunk SPL for SQL Users manual?&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/SQLtoSplunk" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.1.0/SearchReference/SQLtoSplunk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;1) Without knowing the context, you can try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;level="ERROR" OR ("Failed" OR "Exception" OR "Fatal")&lt;/LI-CODE&gt;&lt;P&gt;2) The easiest way to do that is via the UI.&amp;nbsp; Edit the dashboard and click on the hamburger (triple-dot) icon in the panel&amp;nbsp; Select "Edit Drilldown".&amp;nbsp; Choose "Link to search" from the dropdown then select Custom.&amp;nbsp; Enter the search you want to run.&amp;nbsp; Use tokens to employ fields from the dashboard.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 20:14:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529211#M149423</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-11-12T20:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Search Error labels and level=Error both in same bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529223#M149434</link>
      <description>&lt;P&gt;It gives following error.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Error in 'timechart' command: The eval expression for dynamic field 'level="ERROR" OR ("Failed" OR "Exception" OR "Fatal") ' is invalid. Error='Type checking failed. 'OR' only takes boolean arguments.'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; &amp;lt;query&amp;gt;index=myindex  sourcetype=mySourceTYpe |  
           timechart count as total_logs count(eval(level="INFO")) as total_info  count(eval(level="WARN")) as total_warn count(eval(level="ERROR" OR ("Failed" OR "Exception" OR "Fatal")  )  ) as total_error span=1h&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-7d@h&amp;lt;/earliest&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2020 22:02:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529223#M149434</guid>
      <dc:creator>satyajit2007</dc:creator>
      <dc:date>2020-11-12T22:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Search Error labels and level=Error both in same bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529227#M149437</link>
      <description>&lt;P&gt;The OR condition is not working. will appreciate any help.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 05:45:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529227#M149437</guid>
      <dc:creator>satyajit2007</dc:creator>
      <dc:date>2020-11-13T05:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Search Error labels and level=Error both in same bucket</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529345#M149487</link>
      <description>&lt;P&gt;I think I understand why that failed.&amp;nbsp; Try this alternative.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex  sourcetype=mySourceTYpe 
| eval error = if(level="ERROR" OR searchmatch("Failed") OR searchmatch("Exception") OR searchmatch("Fatal"), 1, 0)
| timechart count as total_logs count(eval(level="INFO")) as total_info  count(eval(level="WARN")) as total_warn sum(error) as total_error span=1h&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 13 Nov 2020 18:16:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Search-strings-and-conditions-together/m-p/529345#M149487</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-11-13T18:16:07Z</dc:date>
    </item>
  </channel>
</rss>

