<?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: How to get top user agent distribution in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69238#M10321</link>
    <description>&lt;P&gt;Dave, &lt;/P&gt;

&lt;P&gt;i tried sourcetype=access_combined_wcookie | lookup uas_lookup http_user_agent and i see the events but when i added sourcetype=access_combined_wcookie | lookup uas_lookup http_user_agent | stats count by ua_family i am not getting any results (even though it has matching events). our user agent field name is useragent. Do i need to change anything in the lookup table to match our field names, etc?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:13:22 GMT</pubDate>
    <dc:creator>xvxt006</dc:creator>
    <dc:date>2020-09-28T16:13:22Z</dc:date>
    <item>
      <title>How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69231#M10314</link>
      <description>&lt;P&gt;Hi, we have a filed User_Agent which gets the user agents distribution. But what i would like to get it by browser family instead of showing by version. &lt;BR /&gt;
Meaning right now the output is &lt;/P&gt;

&lt;P&gt;S.No           User Agent         Count              Percentage                                                                                                                                                                                                                                          &lt;/P&gt;

&lt;P&gt;1   Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; MS-RTC LM 8; .NET4.0C; .NET4.0E)  26513   8.818970&lt;BR /&gt;
2   Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)  16544   5.503000&lt;BR /&gt;
3   -   16041   5.335688&lt;BR /&gt;
4   Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; CWADS32; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)  15727   5.231243&lt;BR /&gt;
5   Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) 10227   3.401788&lt;BR /&gt;
6   Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0   6462    2.149443&lt;BR /&gt;
7   Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; CWADS32; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E)  5867    1.951529&lt;BR /&gt;
8   Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11   5464    1.817480&lt;BR /&gt;
9   Mozilla/5.0 (compatible; Googlebot/2.1; +&lt;A href="http://www.google.com/bot.html"&gt;http://www.google.com/bot.html&lt;/A&gt;)    4655    1.548384&lt;BR /&gt;
10  Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11    4555    1.515121&lt;/P&gt;

&lt;P&gt;I want the output to be something like this&lt;/P&gt;

&lt;P&gt;Browser  Requests   %&lt;BR /&gt;
FireFox  4000       2&lt;BR /&gt;
IE       12000      4&lt;/P&gt;</description>
      <pubDate>Wed, 19 Dec 2012 18:05:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69231#M10314</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2012-12-19T18:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69232#M10315</link>
      <description>&lt;P&gt;Hey xvxt006,&lt;/P&gt;

&lt;P&gt;Sorry to plug my own stuff, but this may help:&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/apps/48017/ta-uas_parser" target="_blank"&gt;http://splunk-base.splunk.com/apps/48017/ta-uas_parser&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Put simply, user-agent strings suck, extra parsing is required. This lookup does for you, which should allow you to get the types of stats you are looking for. Something like:&lt;/P&gt;

&lt;P&gt;index=web_data | lookup uas_lookup http_user_agent | stats count by ua_family&lt;/P&gt;

&lt;P&gt;HTH,&lt;/P&gt;

&lt;P&gt;Dave&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69232#M10315</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2020-09-28T12:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69233#M10316</link>
      <description>&lt;P&gt;I suggest that you build a lookup table that contains the following fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;useragent,browser
"Mozilla/5.0 (compatible; Googlebot...",Googlebot
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I didn't put in the full useragent field, as it is pretty long!&lt;/P&gt;

&lt;P&gt;To figure out what user agents should be in the lookup table, you could run this search&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever | stats count by useragent
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Export the results and use them to build the .csv file. Read the transforms.conf file section for lookups, and you will find that you can use wildcards in your lookups! This feature is not available from the Splunk Manager UI; you have to edit the transforms.conf file directly.&lt;/P&gt;

&lt;P&gt;Use the wildcard feature to manage the slight variations in useragents. You will still probably have a lot of entries in your lookup file. Here are some other answers that may help with the lookup:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://splunk-base.splunk.com/answers/52580/can-we-use-wild-characters-in-lookup-table"&gt;http://splunk-base.splunk.com/answers/52580/can-we-use-wild-characters-in-lookup-table&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://splunk-base.splunk.com/answers/28566/how-to-use-wildcard-in-lookup-based-searches-and-alerts"&gt;http://splunk-base.splunk.com/answers/28566/how-to-use-wildcard-in-lookup-based-searches-and-alerts&lt;/A&gt;  &lt;/P&gt;

&lt;P&gt;And links to the docs:&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/knowledge/Addfieldsfromexternaldatasources"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/knowledge/Addfieldsfromexternaldatasources&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0/admin/transformsconf"&gt;http://docs.splunk.com/Documentation/Splunk/5.0/admin/transformsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Once you have the lookup table in Splunk, and the lookup defined, your search will be easy:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever 
| lookup lookup-name useragent OUTPUT browser
| top browser
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Dec 2012 21:07:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69233#M10316</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-12-19T21:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69234#M10317</link>
      <description>&lt;P&gt;Great. Thank you for both of your answers. I will try these.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Dec 2012 15:29:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69234#M10317</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2012-12-20T15:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69235#M10318</link>
      <description>&lt;P&gt;Hi Dave, i have asked my admin to install your addon. I think he installed it under search App. But i am not seeing any of the fields that you have mentioned (I have field discover  On). How to make sure that we have installed it properly.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Dec 2012 15:57:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69235#M10318</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2012-12-24T15:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69236#M10319</link>
      <description>&lt;P&gt;Not sure if it is a current problem, but I couldn't run the script... The red error message "Script for lookup table 'uas_lookup' returned error code 1. Results may be incorrect." is displayed after taking a while running... The columns "os_company    os_family   os_name ua_build_version    ua_company  ua_family   ua_info_url ua_major_version    ua_minor_version    ua_name ua_type" are displayed, but empty... Any way to verify that?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69236#M10319</guid>
      <dc:creator>marcellodesales</dc:creator>
      <dc:date>2020-09-28T16:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69237#M10320</link>
      <description>&lt;P&gt;Without looking at the data coming into it, it's not really something I can debug off of the top of my head. I haven't gotten other reports of that being a problem.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2014 20:28:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69237#M10320</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2014-03-14T20:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69238#M10321</link>
      <description>&lt;P&gt;Dave, &lt;/P&gt;

&lt;P&gt;i tried sourcetype=access_combined_wcookie | lookup uas_lookup http_user_agent and i see the events but when i added sourcetype=access_combined_wcookie | lookup uas_lookup http_user_agent | stats count by ua_family i am not getting any results (even though it has matching events). our user agent field name is useragent. Do i need to change anything in the lookup table to match our field names, etc?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69238#M10321</guid>
      <dc:creator>xvxt006</dc:creator>
      <dc:date>2020-09-28T16:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69239#M10322</link>
      <description>&lt;P&gt;You will need to rename or copy your field to the http_user_agent field. You can do: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=web | rename useragent AS http_user_agent | lookup_uas http_user_agent
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=web | eval http_user_agent = useragent | lookup_uas http_user_agent
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:13:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69239#M10322</guid>
      <dc:creator>dshpritz</dc:creator>
      <dc:date>2020-09-28T16:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69240#M10323</link>
      <description>&lt;P&gt;Anyone Help, please. I'm new to Splunk. Anytime I search with the command top, no result is returned. Any help?&lt;/P&gt;

&lt;P&gt;sourcetype=access_combined_wcookie| top limit=20 url&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69240#M10323</guid>
      <dc:creator>elesinolalekan</dc:creator>
      <dc:date>2020-09-28T16:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69241#M10324</link>
      <description>&lt;P&gt;First, what happens if you simply run the base search&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype=access_combined_wcookie&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;and second, when you look at the results of the base search, is there a field named &lt;CODE&gt;url&lt;/CODE&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 15:35:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69241#M10324</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-05-30T15:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get top user agent distribution</title>
      <link>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69242#M10325</link>
      <description>&lt;P&gt;Thanks for the prompt reply. The search returns "0 Events Found".&lt;BR /&gt;
Yes there is a field named url.&lt;/P&gt;

&lt;P&gt;Sorry about my late reply&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2014 12:38:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/How-to-get-top-user-agent-distribution/m-p/69242#M10325</guid>
      <dc:creator>elesinolalekan</dc:creator>
      <dc:date>2014-06-11T12:38:29Z</dc:date>
    </item>
  </channel>
</rss>

