Deployment Architecture

list common uid on two hosts

nikkuu
New Member

I am trying to list out common uid on two different hosts.
I am using this but this give a visual of all uids including the common ones.
sourcetype=access $host1$ OR $host2$ error=2*| chart max(O) over host by uid

Tags (1)
0 Karma

somesoni2
Revered Legend

It will depend a lot on what's your final output should be. If you just want to know list of uid which are on both hosts, you could do like this

sourcetype=access $host1$ OR $host2$ error=2* | stats dc(host) as host_count by uid | where host_count=2

If you want list hosts as well,

sourcetype=access $host1$ OR $host2$ error=2*| chart dc(uid) over host by uid | addtotals | where Total=2
0 Karma

snoobzilla
Builder

Eventstats should work, though not terribly efficient...

sourcetype=access $host1$ OR $host2$ error=2*
| eventstats dc(host) AS hosts by uid
| search hosts>1
| chart max(O) over host by uid 
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...