Splunk Search

How can I join and group data from 2 different hosts.

jimjohn
Path Finder

How can I join and group data from 2 different hosts.
Say I have HostA , HostB and ID as common field in 2 hosts.
I want to join 2 hosts by Id and group them and do further processing on grouped result.
Ex:
In HostA I have id 10 repeating 1 time and in HostB id 10 is repeating 10 times.
I want to know how may times id 10 occurs in HostA and HostB. How can I achieve this.
Like this different Ids are in 2 hosts. For each ID I want to find the value.

0 Karma

kristian_kolb
Ultra Champion

How long is a piece of string? There are normally a few different ways of solving most problems, but here is one way;

host=hostA OR host=hostB | chart count over ID by host

and another way;

host=hostA OR host=hostB | stats count by ID, host

and yet another way;

host=hostA OR host=hostB | top 20 ID by host

Hope this helps,

K

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...