<?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 multiple Case conditions? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681593#M232910</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using multiple case conditions but the condition is not matching. In the third line of the code used AND condition for message=*End of GL* AND tracepoint=*Exception* .If the condition match make to success.In my case its showing both SUCCESS and ERROR in the table.&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;| eval Status=case(
    like('Status' ,"%SUCCESS%") ,"SUCCESS", 
    like('message' ,"%End of GL-import flow%") AND  like('tracePoint',"%EXCEPTION%") ,"SUCCESS",
    like('tracePoint',"%EXCEPTION%") AND like('priority' ,"%ERROR%"),"ERROR",
    like('Status',"%ERROR%"),"ERROR",
    like('priority',"%WARN%"),"WARN",
    like('priority',"GLImport Job Already Running, Please wait for the job to complete%"),"WARN",
    like('message',"%End of GL Import process - No files found for import to ISG%"), "ERROR", 1==1, "") &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>Thu, 21 Mar 2024 17:37:31 GMT</pubDate>
    <dc:creator>karthi2809</dc:creator>
    <dc:date>2024-03-21T17:37:31Z</dc:date>
    <item>
      <title>multiple Case conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681593#M232910</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using multiple case conditions but the condition is not matching. In the third line of the code used AND condition for message=*End of GL* AND tracepoint=*Exception* .If the condition match make to success.In my case its showing both SUCCESS and ERROR in the table.&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;| eval Status=case(
    like('Status' ,"%SUCCESS%") ,"SUCCESS", 
    like('message' ,"%End of GL-import flow%") AND  like('tracePoint',"%EXCEPTION%") ,"SUCCESS",
    like('tracePoint',"%EXCEPTION%") AND like('priority' ,"%ERROR%"),"ERROR",
    like('Status',"%ERROR%"),"ERROR",
    like('priority',"%WARN%"),"WARN",
    like('priority',"GLImport Job Already Running, Please wait for the job to complete%"),"WARN",
    like('message',"%End of GL Import process - No files found for import to ISG%"), "ERROR", 1==1, "") &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>Thu, 21 Mar 2024 17:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681593#M232910</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-03-21T17:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Case conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681595#M232911</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;when your field names are not contained any special characters, it’s safer and easier to left ‘ away.&lt;/P&gt;&lt;P&gt;Basically those conditions seems to be ok.&lt;/P&gt;&lt;P&gt;Can you give some samples which are not working?&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 17:55:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681595#M232911</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-21T17:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Case conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681597#M232912</link>
      <description>&lt;P&gt;The condition is not working for me&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;like('message' ,"%End of GL-import flow%") AND like('tracePoint',"EXCEPTION") ,"SUCCESS",&lt;BR /&gt;&lt;/STRONG&gt;If the message value=&lt;STRONG&gt;End of GL-import flow&lt;/STRONG&gt; and tracepoint values=Exception then it should be SUCCESS.Screen shot attached below&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="mulesoft" applicationName="p-oracle-finance-ext" environment=DEV 
    (*End of GL-import flow*) OR (tracePoint="EXCEPTION") OR (priority="WARN" AND message="GLImport Job Already Running, Please wait for the job to complete*") 
    OR ( message="End of GL Import process - No files found for import to ISG") 
| rename content.File.fstatus as Status 
| eval Status=case(
    like('Status' ,"SUCCESS") ,"SUCCESS", 
    like('message' ,"%End of GL-import flow%") AND  like('tracePoint',"EXCEPTION") ,"SUCCESS",
    like('tracePoint',"EXCEPTION") AND like('priority' ,"%ERROR%"),"ERROR",
    like('Status',"ERROR"),"ERROR",
    like('priority',"WARN"),"WARN",
    like('priority',"GLImport Job Already Running, Please wait for the job to complete%"),"WARN",
    like('message',"%End of GL Import process - No files found for import to ISG%"), "ERROR", 1==1, "") 
| stats values(content.File.fid) as "TransferBatch/OnDemand" values(content.File.fname) as "BatchName/FileName" values(content.File.fprocess_message) as ProcessMsg 
    values(Status) as Status values(content.File.isg_file_batch_id) as OracleBatchID values(content.File.total_rec_count) as "Total Record Count" values(message) as message values(timestamp) as timestamp values(content.errorType) as errorType by correlationId 
| eval ProcessMsg= coalesce(ProcessMsg,errorType,message) 
| eventstats min(timestamp) AS Start_Time, max(timestamp) AS End_Time by correlationId 
| eval StartTime=round(strptime(Start_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval EndTime=round(strptime(End_Time, "%Y-%m-%dT%H:%M:%S.%QZ")) 
| eval ElapsedTimeInSecs=EndTime-StartTime 
| eval "Total Elapsed Time"=strftime(ElapsedTimeInSecs,"%H:%M:%S") 
| table Status Start_Time "TransferBatch/OnDemand" "BatchName/FileName" ProcessMsg OracleBatchID "Total Record Count" ElapsedTimeInSecs "Total Elapsed Time" correlationId 
| join correlationId type=left 
    [ search index="mulesoft" applicationName="p-oracle-finance-ext" environment=DEV 
        (message="API: START: /v1/revpro-to-oracle/onDemand*") OR (message="API: START: /v1/fin_Zuora_GL_Revpro_JournalImport") OR (message="API: START: /v1/revproGLImport/onDemand*") 
    | eval JobType=case(
        like('message',"API: START: /v1/revproGLImport/onDemand%"),"OnDemand",
        like('message',"API: START: /v1/revpro-to-oracle/onDemand%"),"OnDemand",
        like('message',"API: START: /v1/fin_Zuora_GL_Revpro_JournalImport"),"Scheduled") 
    | table JobType correlationId ] 
| table Status JobType Start_Time "TransferBatch/OnDemand" "BatchName/FileName" ProcessMsg OracleBatchID "Total Record Count" ElapsedTimeInSecs "Total Elapsed Time" correlationId 
| fields - ElapsedTimeInSecs 
| where JobType!=" "&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 18:04:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681597#M232912</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-03-21T18:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Case conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681601#M232913</link>
      <description>&lt;P&gt;Based on your SPL and screenshot it seems to be a MV field. Some yours stats have combined it from several correlationId or what ever you have after by on stats.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 18:26:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681601#M232913</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-21T18:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Case conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681603#M232915</link>
      <description>&lt;P&gt;Stats combined the unique correlation ID.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Mar 2024 18:31:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681603#M232915</guid>
      <dc:creator>karthi2809</dc:creator>
      <dc:date>2024-03-21T18:31:32Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Case conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681641#M232932</link>
      <description>&lt;P&gt;You need to show sample data that doesn't work with the case function fails to produce expected result, then the actual results. &amp;nbsp;The stats just makes troubleshooting more difficult. &amp;nbsp;But even if you want to include stats, you still need to show sample data.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 06:10:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681641#M232932</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2024-03-22T06:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: multiple Case conditions?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681652#M232935</link>
      <description>And at same time it convert that field (result of case) to multivalue field which contains both those values.&lt;BR /&gt;As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt; said, you must provide sample data which produce that "error", if you want that we can help you.</description>
      <pubDate>Fri, 22 Mar 2024 09:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/multiple-Case-conditions/m-p/681652#M232935</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2024-03-22T09:10:29Z</dc:date>
    </item>
  </channel>
</rss>

