Splunk Search

How to sum the count of three users?

reschal
Explorer

Hi,

in my scenario i have a lot of users for example: user1, user2, user3... and i want to count their logins to a server and create a pie chart. I have the problem that there are some users which have the same name but a different notation for example user1, USER1 and USer1. How can i sum the counts of these 3, allocate it to user1 and create the pie chart?

Thx for your help!

Tags (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi reschal,

you can lower the user names.

Can you please try this?

YOUR_SEARCH | eval user_field =lower(user_field) | stats count by user_field

just add extra eval before stats command.

thanks

View solution in original post

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi reschal,

you can lower the user names.

Can you please try this?

YOUR_SEARCH | eval user_field =lower(user_field) | stats count by user_field

just add extra eval before stats command.

thanks

reschal
Explorer

Thanks, it works 🙂

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi
Can you please accept this question to mark as close?

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...