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
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.
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, 18.104.22.168:8089, 22.214.171.124:8089, 126.96.36.199: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 = 188.8.131.52:8089, 184.108.40.206:8089, 220.127.116.11:8089
This example creates two search groups, NYC and SF, which you can then specify in searches.
Note the following:
serversattribute 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
- 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
defaultattribute 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 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.
Manage distributed server names
Remove a search peer
This documentation applies to the following versions of Splunk® Enterprise: 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.2.4, 6.2.5, 6.2.6, 6.2.7, 6.2.8, 6.2.9, 6.2.10, 6.2.11, 6.2.12, 6.2.13, 6.2.14, 6.2.15