Tests network connectivity to all Splunk cluster peers on port 8089. Automatically discovers peer nodes from distributed search configuration and validates TCP connectivity.
Quickly diagnose network connectivity issues in Splunk distributed environments by:
- Auto-discovering all configured search peers
- Testing TCP connectivity on management port (8089)
- Identifying unreachable or misconfigured peers
- Validating cluster communication before troubleshooting
- Bash shell (not sh/dash - uses bash-specific
/dev/tcpfeature) - Splunk Enterprise installation with configured distributed search
splunkcommand must be in PATH (or run from$SPLUNK_HOME/bin)- Network access to peer nodes
./testpeers.shScript must run on a Splunk instance with configured search peers (typically a search head).
# Test all peers from current Splunk instance
cd /path/to/test-peers
./testpeers.sh
# Output:
# Testing connectivity to port 8089 on all discovered peers...
#
# Connecting to indexer1.example.com:8089... Success
# Connecting to indexer2.example.com:8089... Failed
# Connecting to indexer3.example.com:8089... Success- Queries
distsearch.confusingsplunk btoolto discover configured peers - Extracts hostnames from peer URIs
- Tests TCP connectivity to port 8089 on each peer (2 second timeout)
- Reports success or failure for each connection
For each discovered peer:
- Success - Port 8089 is reachable
- Failed - Port 8089 is unreachable (network issue, firewall, or peer down)
Summary line shows total succeeded and failed counts.
Testing connectivity to port 8089 on all discovered peers...
Connecting to indexer1.example.com:8089... Success
Connecting to indexer2.example.com:8089... Failed
Connecting to indexer3.example.com:8089... Success
Results: 2 succeeded, 1 failed
- 0 - All peers reachable
- 1 -
splunkcommand not found - 2 - No peers configured
- 3 - One or more peers unreachable
- Requires
splunkcommand in PATH (not justbtool) - Tests management port 8089 only (default Splunk management port)
- 2-second timeout per peer prevents hanging on unreachable hosts
- Uses bash-specific
/dev/tcpfeature for connection testing - Useful for troubleshooting distributed search connectivity issues