Skip to content

ua-parser is not providing the device brand and model details #63

@ChimbuChinnadurai

Description

@ChimbuChinnadurai

logstash ua-parser is not providing the device brand and model details. Below is the useragent string which i parsed in the python parser and can see its provided the device branch & model details which is very helpful for our reports.

"clientUserAgent": "MobileApp/1.3.19-Release (iPhone9,3; CPU iPhone OS 12_4 like Mac OS X)"

python ua-parser output:

"clientUserAgent": {
  "user_agent": {
    "major": null,
    "patch": null,
    "minor": null,
    "family": "Mobile Safari UI/WKWebView"
  },
  "device": {
    "brand": "Apple",
    "model": "iPhone9,3",
    "family": "iPhone"
  },
  "os": {
    "major": "12",
    "patch_minor": null,
    "patch": null,
    "minor": "4",
    "family": "iOS"
  },
  "string": "MobileApp/1.3.19-Release (iPhone9,3; CPU iPhone OS 12_4 like Mac OS X)"
}

But logstash ua-parser is missing the device branch and model details. Used the mutate filter and renamed the output.

logstash ua-parser output:

"clientUserAgent.device.family": "iPhone",
"clientUserAgent.os.family": "iOS",
"clientUserAgent.os.patch": "1",
"clientUserAgent.os.major": "12",
"clientUserAgent.os.minor": "4",
"clientUserAgent.user_agent.family": "Mobile Safari UI/WKWebView",
"clientUserAgent.string": "MobileApp/1.3.19-Release (iPhone9,3; CPU iPhone OS 12_4 like Mac OS X)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions