Splunk Search

Count per host

EH
Engager

I'm trying to rename the IP's of our servers to splunknodes

host_ip host_name

ip-111-11-1-11Searchhead
ip-111-11-1-12Searchhead
ip-111-11-1-10Masternode
ip-111-11-2-11Indexer
ip-111-11-2-12Indexer
ip-111-11-2-10Deploymentserver


How do I get it to count the duplicates?:

host_ip host_name

ip-111-11-1-11Searchhead1
ip-111-11-1-12Searchhead2
ip-111-11-1-10Masternode
ip-111-11-2-11Indexer1
ip-111-11-2-12Indexer2
ip-111-11-2-10Deploymentserver

 

Thanks in advance!

Labels (3)
0 Karma
1 Solution

rafadvega
Path Finder

Hi!! try this:

 

your search
| streamstats count by host_name
| eval host_name=host_name.count
| fields - count

 

rafadvega_0-1636731797517.png

 

View solution in original post

rafadvega
Path Finder

Hi!! try this:

 

your search
| streamstats count by host_name
| eval host_name=host_name.count
| fields - count

 

rafadvega_0-1636731797517.png

 

Get Updates on the Splunk Community!

What's New in Splunk Cloud Platform 9.2.2403?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2403! Analysts can ...

Stay Connected: Your Guide to July and August Tech Talks, Office Hours, and Webinars!

Dive into our sizzling summer lineup for July and August Community Office Hours and Tech Talks. Scroll down to ...

Edge Processor Scaling, Energy & Manufacturing Use Cases, and More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...