All Apps and Add-ons

Splunk App for Web Analytics: http_user_agent missing for browsers in compatibility mode

Contributor

Fields such as ua_family and ua_major are showing up as unknown for browsers operating in compatibility mode.
I've tried updating the Python code from the TA-user-agents app, which appears to be what's in the /bin directory, minus the regexes.json file, and still no luck.

How can I get the app to recognize browsers working in compatibility mode?

The raw data has the information, but the lookup doesn't.

New Member

You can also use https://yamlonline.com/ for the yaml validator as well as yaml converter to json,csv,xml,base64 also for beautify and minify YAML.

0 Karma

Splunk Employee
Splunk Employee

Update on the previous answer. The app uses the json version of the yaml file. It is called regexes.json and can be found in the folder
SplunkAppForWebAnalytics/bin/ua_parser

You can convert the regexes.yaml file found here:
https://github.com/ua-parser/uap-core/blob/master/regexes.yaml

into json format and then copy it to that folder to update the the signatures for the user agents.

I used this service to make the conversion:
http://convertjson.com/yaml-to-json.htm

j

Splunk Employee
Splunk Employee

Hi
Download the latest version of the parser from there:
https://github.com/ua-parser/uap-python

Install it locally and then copy the file "regexes.yaml" that is created after install to the SplunkAppForWebAnalytics/bin/ua_parser folder.

There is also a copy of this file on the github page that you can use directly:
https://github.com/ua-parser/uap-core/blob/master/regexes.yaml

Let me know how you get along.

j

0 Karma

You might also check out WURFL InSight for Splunk. It automatically parses the UA string to detect the device and its capabilities. It works with an always-updated library of devices and their capabilities.

You will need a license to get it up and running, but it will simplify your life incredibly if you are looking for mobile device analytics.

Get a license or inquiry here: https://www.scientiamobile.com/page/wurfl-insight-splunk

Splunk Employee
Splunk Employee

Hi Lazarix

Can you double check that the field http_user_agent is present in the events where the browser is in compatibility mode? Might be the issue.

I believe you should be able to get around it by updating the the ua-parser. you can get the latest version from github from source:

https://github.com/ua-parser

Let me know how you get along.

j

0 Karma

Contributor

Unfortunately, adding the python version of that code now breaks it and doesn't show browser or operating system information in the audience dashboard

0 Karma

Contributor

I've re-installed the app and set it up from default and the data is now working again. Browsers still showing up as unknown for those working in compatibility mode.

I've updated the UA-Parser from the github link, but no change.

0 Karma

Path Finder

Same for me as well, we are trying to update the web-analytics app due to the large amount of "unknown" browsers being returned in the app dashboards. Has anyone figured out how to successfully update ua_parser in Splunk?

0 Karma

Contributor

The http_user_agent field does show browsers in compatibility mode, so yes the events are showing for that field.

0 Karma

Contributor

Hi Jbjerke, thanks for replying. Is it the PHP ua-parser? as there are parsers for every kind of code type on there.

Thanks

0 Karma

Contributor

actually, thinking about it, it's probably the python one.

0 Karma
State of Splunk Careers

Access the Splunk Careers Report to see real data that shows how Splunk mastery increases your value and job satisfaction.

Find out what your skills are worth!