<?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: Extract browser type and device from User agent in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577583#M201280</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;yeah. I will need to speak to my Admin for that. Apart from this is there any other way to do this?&lt;/P&gt;&lt;P&gt;For example, extract the information by writing in SPL. I've done something like this but not sure if it is 100% correct -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval device = case((useragent LIKE "%Mobile%" OR useragent LIKE "%Mobile%Safari%" OR useragent LIKE "%iPhone%" OR useragent LIKE "Android%Firefox%" OR useragent LIKE "%UCBrowser%" OR useragent LIKE "%IEMobile%" OR useragent LIKE "%Dalvik%Android%" OR useragent LIKE "%Android-STV100%" ), "Mobile Device", useragent LIKE "%Windows NT%", "Windows", useragent LIKE "%Macintosh%", "Macintosh", (useragent LIKE "%Ubuntu%Linux%" OR useragent LIKE "%X11%OpenVAS%"), "Linux", true() ,"others")

| eval browser = case(match(useragent,"Firefox"),"FireFox", match(useragent,"Chrome") AND NOT match(useragent,"Edge"),"Chrome", match(useragent,"Safari") AND NOT match(useragent,"Chrome"),"Safari", match(useragent, "MSIE|Trident|Edge"), "IE", NOT match(useragent, "Chrome|Firefox|Safari|MSIE|Trident|Edge"), "OTHERS")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Dec 2021 09:58:00 GMT</pubDate>
    <dc:creator>shashank_24</dc:creator>
    <dc:date>2021-12-07T09:58:00Z</dc:date>
    <item>
      <title>Extract browser type and device from User agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577370#M201209</link>
      <description>&lt;P&gt;Hi, I've been reading number of posts about how to extract the OS and browser details but I don't think there is a better or clean way to do this.&lt;/P&gt;&lt;P&gt;I've a similar requirement where in my logs there is a user agent field. Now what I want is to know the browser details along with device like if it's a desktop, mobile etc.&lt;/P&gt;&lt;P&gt;Just posting this to see if anyone has figured out anything on this which can save time writing complex SPLs?&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Dec 2021 19:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577370#M201209</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2021-12-05T19:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extract browser type and device from User agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577371#M201210</link>
      <description>&lt;P&gt;There's an app for that.&amp;nbsp; Check out TA -user-agents at&amp;nbsp;&lt;A href="https://splunkbase.splunk.com/app/1843/#/details" target="_blank"&gt;https://splunkbase.splunk.com/app/1843/#/details&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Dec 2021 20:44:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577371#M201210</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-05T20:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extract browser type and device from User agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577467#M201241</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;Thanks for the response. How does this app work? Does it create any extra field in the event?&lt;/P&gt;&lt;P&gt;And is it only compatible with certain format of the events. We have audit logs from ping federate which contains a field called useragent.&lt;/P&gt;&lt;P&gt;Just trying to understand even if i get this app installed, what is the way to extract the required information?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 13:14:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577467#M201241</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2021-12-06T13:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extract browser type and device from User agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577509#M201254</link>
      <description>&lt;P&gt;Sorry, but I don't have any details about the TA.&amp;nbsp; Why not download it to your test system and try it out?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 19:06:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577509#M201254</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-06T19:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract browser type and device from User agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577583#M201280</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;yeah. I will need to speak to my Admin for that. Apart from this is there any other way to do this?&lt;/P&gt;&lt;P&gt;For example, extract the information by writing in SPL. I've done something like this but not sure if it is 100% correct -&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval device = case((useragent LIKE "%Mobile%" OR useragent LIKE "%Mobile%Safari%" OR useragent LIKE "%iPhone%" OR useragent LIKE "Android%Firefox%" OR useragent LIKE "%UCBrowser%" OR useragent LIKE "%IEMobile%" OR useragent LIKE "%Dalvik%Android%" OR useragent LIKE "%Android-STV100%" ), "Mobile Device", useragent LIKE "%Windows NT%", "Windows", useragent LIKE "%Macintosh%", "Macintosh", (useragent LIKE "%Ubuntu%Linux%" OR useragent LIKE "%X11%OpenVAS%"), "Linux", true() ,"others")

| eval browser = case(match(useragent,"Firefox"),"FireFox", match(useragent,"Chrome") AND NOT match(useragent,"Edge"),"Chrome", match(useragent,"Safari") AND NOT match(useragent,"Chrome"),"Safari", match(useragent, "MSIE|Trident|Edge"), "IE", NOT match(useragent, "Chrome|Firefox|Safari|MSIE|Trident|Edge"), "OTHERS")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 09:58:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577583#M201280</guid>
      <dc:creator>shashank_24</dc:creator>
      <dc:date>2021-12-07T09:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extract browser type and device from User agent</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577621#M201288</link>
      <description>&lt;P&gt;You have the general idea, however &lt;FONT face="courier new,courier"&gt;like&lt;/FONT&gt; is a function (used the same way as &lt;FONT face="courier new,courier"&gt;match&lt;/FONT&gt;) rather than an operator.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval device = case((like(useragent, "%Mobile%") OR like(useragent, "%Mobile%Safari%") OR like(useragent, "%iPhone%") OR like(useragent, "Android%Firefox%") OR like(useragent, "%UCBrowser%") OR like(useragent, "%IEMobile%") OR like(useragent, "%Dalvik%Android%") OR like(useragent, "%Android-STV100%") ), "Mobile Device", like(useragent, "%Windows NT%"), "Windows", like(useragent, "%Macintosh%"), "Macintosh", (like(useragent, "%Ubuntu%Linux%") OR like(useragent, "%X11%OpenVAS%")), "Linux", true() ,"others")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Dec 2021 13:39:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extract-browser-type-and-device-from-User-agent/m-p/577621#M201288</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-12-07T13:39:44Z</dc:date>
    </item>
  </channel>
</rss>

