<?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 Conditional Search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Conditional-Search/m-p/685059#M233785</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have this search for tabular format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="webbff" "SUCCESS: REQUEST"
| table _time verificationId code BROWSER BROWSER_VERSION OS OS_VERSION  USER_AGENT status
| rename verificationId as "Verification ID", code as "HRC"
| sort -_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is at BROWSER column where even when user access our app via Edge it still shows as Chrome. I found a dissimilarity between the two logs. One that is accessed via Edge contains "Edg" in the logs.&lt;/P&gt;&lt;P&gt;Edge logs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata={BROWSER=Chrome, LOCALE=, OS=Windows, USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/xxx.xx (KHTML, like Gecko) Chrome/124.0.0.0 Safari/xxx.xx Edg/124.0.0.0, BROWSER_VERSION=124, LONGITUDE=, OS_VERSION=10, IP_ADDRESS=, APP_VERSION=, LATITUDE=})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chrome logs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata={BROWSER=Chrome, LOCALE=, OS=Mac OS X, USER_AGENT=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/xxx.xx (KHTML, like Gecko) Chrome/124.0.0.0 Safari/xxx.xx, BROWSER_VERSION=124, LONGITUDE=, OS_VERSION=10, IP_ADDRESS=, APP_VERSION=, LATITUDE=})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is, how do i create a conditional search for BROWSER like if contains Edg then Edge else BROWSER?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2024 01:37:35 GMT</pubDate>
    <dc:creator>mursidehsani</dc:creator>
    <dc:date>2024-04-23T01:37:35Z</dc:date>
    <item>
      <title>Conditional Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-Search/m-p/685059#M233785</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have this search for tabular format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="webbff" "SUCCESS: REQUEST"
| table _time verificationId code BROWSER BROWSER_VERSION OS OS_VERSION  USER_AGENT status
| rename verificationId as "Verification ID", code as "HRC"
| sort -_time&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is at BROWSER column where even when user access our app via Edge it still shows as Chrome. I found a dissimilarity between the two logs. One that is accessed via Edge contains "Edg" in the logs.&lt;/P&gt;&lt;P&gt;Edge logs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata={BROWSER=Chrome, LOCALE=, OS=Windows, USER_AGENT=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/xxx.xx (KHTML, like Gecko) Chrome/124.0.0.0 Safari/xxx.xx Edg/124.0.0.0, BROWSER_VERSION=124, LONGITUDE=, OS_VERSION=10, IP_ADDRESS=, APP_VERSION=, LATITUDE=})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chrome logs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;metadata={BROWSER=Chrome, LOCALE=, OS=Mac OS X, USER_AGENT=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/xxx.xx (KHTML, like Gecko) Chrome/124.0.0.0 Safari/xxx.xx, BROWSER_VERSION=124, LONGITUDE=, OS_VERSION=10, IP_ADDRESS=, APP_VERSION=, LATITUDE=})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is, how do i create a conditional search for BROWSER like if contains Edg then Edge else BROWSER?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 01:37:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-Search/m-p/685059#M233785</guid>
      <dc:creator>mursidehsani</dc:creator>
      <dc:date>2024-04-23T01:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-Search/m-p/685062#M233787</link>
      <description>&lt;P&gt;Without knowing a bit more about your data and extracted fields, you could do something like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval BROWSER=if(BROWSER="Chrome" AND match(_raw, " Edg\/"), "Edge", BROWSER)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 02:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-Search/m-p/685062#M233787</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2024-04-23T02:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Conditional-Search/m-p/685063#M233788</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/6367"&gt;@bowesmana&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your solution hit the spot! Thank you so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 02:30:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Conditional-Search/m-p/685063#M233788</guid>
      <dc:creator>mursidehsani</dc:creator>
      <dc:date>2024-04-23T02:30:49Z</dc:date>
    </item>
  </channel>
</rss>

