Splunk Search

Count per host

EH
Explorer

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!

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...

SOCin’ it to you at Splunk University

Splunk University is expanding its instructor-led learning portfolio with dedicated Security tracks at .conf25 ...

Credit Card Data Protection & PCI Compliance with Splunk Edge Processor

Organizations handling credit card transactions know that PCI DSS compliance is both critical and complex. The ...