Splunk Search

search comparison to validate all forwarders point to indexers in the idx cluster

fisuser1
Contributor

GM, through the years we have added several indexers to our cluster. we are no looking to retire a few generation 1 indexers. does anyone have a search that can do a comparison of what forwarders are/are not reporting to certain indexers in the cluster by index name? perhaps a table to display all forwarder client servers not utilizing all indexers? my fear is we retire a set of gen 1 indexers and all forwarders are not reporting into ALL indexers so users will no longer see their data.

Tags (1)
0 Karma

adonio
Ultra Champion

try this search and filter down the road as you see fit:
| tstats max(_time) as last_event where index=* by host index splunk_server
the splunk_server field is your indexers

0 Karma

FrankVl
Ultra Champion

But that doesn't really tell you anything about which forwarders are sending to which indexers, right? in some cases the host field will hold the forwarder name, but plenty of data feed architectures where the host field contains the original host and not the forwarder.

0 Karma

adonio
Ultra Champion

yup, but its a start ... you can approach it in many ways
you can do after the search ... stats values(splunk_server) as indexers by host or whatever
if you insist on that, you can use index=_* instead of index=* in the above search.
or you can use the field hostname or origianl_hostname whatever it might be

0 Karma

adonio
Ultra Champion

imho it will be easier to check your outputs.conf and modify the it according to your needs
also, have i mind that if your forwarders are setup correctly, they will keep on sending data to the new indexers

0 Karma

FrankVl
Ultra Champion

That is certainly also a good angle of attack, but that does depend a bit on how well managed the outputs.conf is. If there are all kinds of forwarders with different local configs or so, that becomes a bit more difficult. Getting a baseline from the actual logs where they are sending could then help identify forwarders that need attention.

0 Karma

adonio
Ultra Champion

good point, @FrankVl will put an answer with a search covering the desired results

0 Karma

FrankVl
Ultra Champion

The "by index" part might be a bit tricky (I also don't fully understand how that is relevant to be honest).

To see which forwarders are sending to which indexers, try something like this:

index=_internal sourcetype=splunkd group=tcpin_connections | stats count by host,hostname

Ideally add filters to limit the host field to only match your indexers and the hostname field to only match your forwarders.

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!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

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

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...