<?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: CASE and MATCH function in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594621#M206961</link>
    <description>&lt;P&gt;Thank you for your reply. I want to create a base search for ITSI KPI configuration. That's why I need it to be extracted and create a single field for it.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Apr 2022 09:24:17 GMT</pubDate>
    <dc:creator>syazwani</dc:creator>
    <dc:date>2022-04-21T09:24:17Z</dc:date>
    <item>
      <title>How to write search with CASE and MATCH function?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594617#M206959</link>
      <description>&lt;P&gt;Hi peeps,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need help to fine tune this query;&lt;/P&gt;
&lt;PRE&gt;index=network sourcetype=ping&lt;BR /&gt;| eval pingsuccess=case(match(ping_status, "succeeded"), Number)&lt;/PRE&gt;
&lt;P&gt;Basically, I want to create a new field for ping success that will show the event count as values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="syazwani_0-1650532081422.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/19173i81BC4B7319682C2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="syazwani_0-1650532081422.png" alt="syazwani_0-1650532081422.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 14:43:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594617#M206959</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2022-04-21T14:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: CASE and MATCH function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594618#M206960</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238134"&gt;@syazwani&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: what are the values of ping_status?&lt;/P&gt;&lt;P&gt;if they are only "succeded" and "failed", you don't need anything:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=network sourcetype=ping
| stats count BY ping_status&lt;/LI-CODE&gt;&lt;P&gt;if you have more values for ping_status that you want to aggregate you could use if or case functions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=network sourcetype=ping
| eval pingsuccess=if(ping_status="succeeded"), "succeeded","failed")
| stats count BY pingsuccess&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 09:19:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594618#M206960</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-21T09:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: CASE and MATCH function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594621#M206961</link>
      <description>&lt;P&gt;Thank you for your reply. I want to create a base search for ITSI KPI configuration. That's why I need it to be extracted and create a single field for it.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 09:24:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594621#M206961</guid>
      <dc:creator>syazwani</dc:creator>
      <dc:date>2022-04-21T09:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: CASE and MATCH function</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594622#M206962</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/238134"&gt;@syazwani&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;using my hint are you able to create the field?&lt;/P&gt;&lt;P&gt;otherwise, could you describe some sample of the values of the ping_status field?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 09:28:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-search-with-CASE-and-MATCH-function/m-p/594622#M206962</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-04-21T09:28:13Z</dc:date>
    </item>
  </channel>
</rss>

