Splunk Search

Group Login Requests By UA String

Bassik
Path Finder

Hi All,

I'm new to Splunk but have been working with it over a few months now. I'm trying to distinguish unique website logins by our customers from mobile devices. At the moment I have come up with 2 searches but one does what the other doesn't and vica versa.

Method 1
stats count(eval(match(cs_User_Agent, "iPhone"))) as "iPhone", count(eval(match(cs_User_Agent, "iPad"))) as "iPad", count(eval(match(cs_User_Agent, "Android"))) as "Android", count(eval(match(cs_User_Agent, "Macintosh"))) as "Macintosh", count(eval(match(cs_User_Agent, "Windows"))) as "Windows", count(eval(NOT match(cs_User_Agent, "Macintosh|iPhone|iPad|Android|Windows"))) as "Other" by a_request

This gives me the results I want but I cannot display this in a PIE chart???

Method 2
| rex field=cs_User_Agent "(?iPhone|Android|Macintosh|Windows|iPad)" | stats count(eval(a_request)) as Logins BY Device

This displays in a PIE chart but I cannot determine the "Other" field for all other Device login requests.

I need assistance in one or the other. I'm a quick learner but still in early stages of understanding the syntax.

Many thanks!

Tags (1)
0 Karma
1 Solution

Bassik
Path Finder

Well i figured it out... just needed a | transpose on method 2

View solution in original post

0 Karma

Bassik
Path Finder

Well i figured it out... just needed a | transpose on method 2

0 Karma
Get Updates on the Splunk Community!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...