Splunk® Enterprise

Distributed Search

Download manual as PDF

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Download topic as PDF

Create distributed search groups

You can group your search peers to facilitate searching on a subset of them. Groups of search peers are known as "distributed search groups." You specify distributed search groups in the distsearch.conf file.

For example, say you have a set of search peers in New York and another set in San Francisco, and you want to perform searches across peers in just a single location. You can do this by creating two search groups, NYC and SF.

Distributed search groups are particularly useful when configuring the distributed management console. See Monitoring Splunk Enterprise.


In distsearch.conf, create these stanzas:

[distributedSearch]
# This stanza lists the full set of search peers.
servers = 192.168.1.1:8089, 192.168.1.2:8089, 175.143.1.1:8089, 175.143.1.2:8089, 175.143.1.3:8089

[distributedSearch:NYC]
# This stanza lists the set of search peers in New York.
default = false
servers = 192.168.1.1:8089, 192.168.1.2:8089

[distributedSearch:SF]
# This stanza lists the set of search peers in San Francisco.
default = false
servers = 175.143.1.1:8089, 175.143.1.2:8089, 175.143.1.3:8089

This example creates two search groups, NYC and SF, which you can then specify in searches.

Note the following:

  • The servers attribute lists groups of search peers by IP address and management port.
  • The servers list for each search group must be a subset of the list in the general [distributedSearch] stanza.
  • The group lists can overlap. For example, you can add a third group named "Primary_Indexers" that contains some peers from each location.
  • If you set a group's default attribute to "true," the peers in that group will be the ones queried when the search does not specify a search group. Otherwise, if you set all groups to "false," the full set of search peers in the [distributedSearch] stanza will be queried when the search does not specify a search group.

To use a search group in a search, specify the search group like this:

sourcetype=access_combined status=200 action=purchase splunk_server_group=NYC | stats count by product

This search runs against only the peers in the NYC location.

Note: This feature is not valid for single-site indexer clustering. In indexer clustering, the cluster replicates data arbitrarily across the set of search peers, or "peer nodes". You cannot know whether any particular set of data will reside on any particular peer.

PREVIOUS
Manage distributed server names
  NEXT
Remove a search peer

This documentation applies to the following versions of Splunk® Enterprise: 6.3.0, 6.3.1, 6.3.2, 6.3.3, 6.3.4, 6.3.5, 6.3.6, 6.3.7, 6.3.8, 6.3.9, 6.3.10, 6.3.11, 6.3.12, 6.3.13, 6.4.0, 6.4.1, 6.4.2, 6.4.3, 6.4.4, 6.4.5, 6.4.6, 6.4.7, 6.4.8, 6.4.9, 6.4.10, 6.4.11


Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters