All Apps and Add-ons

much time to get results

alvaro_garcia
Explorer

Hi,
I am trying this app in a Splunk 6.1 version.
The app works fine, but takes much time in the command.lookup (159 seconds for 1449 events)
Is there any way to accelerate de process?

Tags (1)

gesman
Communicator

The only way I found how to get fast stats on Browser usage is to study all browser user agent strings and crafting a custom query like this (my user agent field is named ua - change it accordingly for your case):

sourcetype=...
| fields ua
| eval ua_type = 
    if (match(ua, "Opera| OPR/"), "Opera", 
      if (match(ua, "CriOS|Chrome"), "Chrome", 
        if (match(ua, "Firefox"), "Firefox", 
          if (match(ua, "\((iPad|iPhone|iPod|Macintosh);"), "Safari", 
            if (match(ua, "IEMobile"), "IEMobile", 
              if (match(ua, "MSIE|Trident"), "MSIE", 
                if (match(ua, "Linux") AND match(ua, "Android"), "Android Browser", 
                  if (match(ua, "CFNetwork") AND match(ua, "Darwin"), "Apple Safari Crawler", 
                    "Other"
      ))))))))
| where ua_type != "Apple Safari Crawler" AND ua_type != "Other"
| top ua_type limit=0
| rename ua_type as "Browser Type"
| sort - count

This search query will run like 500 faster. If I'll have time - i could include more variables, such as platform and device into it. Browscap gets really huge and using it as a lookup method will slow things more and more with every update.

Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...