com.splunk
Class DistributedConfiguration

java.lang.Object
  extended by com.splunk.Resource
      extended by com.splunk.Entity
          extended by com.splunk.DistributedConfiguration
All Implemented Interfaces:
java.util.Map<java.lang.String,java.lang.Object>

public class DistributedConfiguration
extends Entity

The DistributedConfiguration class represents a Splunk distributed search configuration, providing access to Splunk's distributed search options.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class com.splunk.Entity
toUpdate
 
Fields inherited from class com.splunk.Resource
actions, path, refreshArgs, service, title
 
Method Summary
protected  java.lang.String actionPath(java.lang.String action)
          Returns the action path.
 void disable()
          Disable distributed search on this Splunk instance.
 void enable()
          Enable distributed search on this Splunk instance.
 boolean getAutoAddServers()
          Deprecated. Deprecated since Splunk 5.0.
 java.lang.String getBlacklistNames()
          Returns a list of server names that are excluded from being peers.
 java.lang.String getBlacklistUrls()
          Returns a list of server URLs that are excluded from being peers.
 int getCheckTimedOutServersFrequency()
          Returns the frequency at which servers that have timed out are rechecked.
 int getConnectionTimeout()
          Returns the time-out period for connecting to search peers.
 int getHeartbeatFrequency()
          Deprecated. Deprecated since Splunk 5.0.
 java.lang.String getHeartbeatMcastAddress()
          Deprecated. Deprecated since Splunk 5.0.
 int getHeartbeatPort()
          Deprecated. Deprecated since Splunk 5.0.
 int getReceiveTimeout()
          Returns the time-out period for trying to read and receive data from a search peer.
 boolean getRemovedTimedOutServers()
          Indicates whether timed-out servers are removed from the distributed configuration.
 int getSendTimeout()
          Returns the time-out period for trying to write or send data to a search peer.
 java.lang.String getServers()
          Returns a list of peer servers.
 int getServerTimeout()
          Deprecated. Use specific getConnectionTimeout, getReceiveTimeout, and getSendTimeout. Returns the server time-out period.
 boolean getShareBundles()
          Indicates whether this server uses bundle replication to share search-time configuration with search peers.
 boolean getSkipOurselves()
          Deprecated. Deprecated since Splunk 5.0.
 int getStatusTimeout()
          Returns the time-out period for gathering a search peer's basic information.
 int getTtl()
          Deprecated. Deprecated since Splunk 5.0.
 boolean isDistSearchEnabled()
          Indicates whether distributed search is enabled.
 void setAutoAddServers(boolean autoAdd)
          Deprecated. Deprecated since Splunk 5.0.
 void setBlacklistNames(java.lang.String names)
          Sets the blacklist server names that are excluded from being peers.
 void setBlacklistURLs(java.lang.String names)
          Sets the blacklist server names or URIs that are excluded from being peers.
 void setCheckTimedOutServersFrequency(int frequency)
          Sets the server recheck frequency.
 void setConnectionTimeout(int seconds)
          Sets the time-out period for establishing a search peer connection.
 void setDisabled(boolean disabled)
          Sets whether the distributed configuration is enabled or disabled.
 void setHeartbeatFrequency(int seconds)
          Deprecated. Deprecated since Splunk 5.0.
 void setHeartbeatMcastAddr(java.lang.String mCastAddress)
          Deprecated. Deprecated since Splunk 5.0.
 void setHeartbeatPort(int port)
          Deprecated. Deprecated since Splunk 5.0.
 void setReceiveTimeout(int seconds)
          Sets the time-out period for reading and receiving data from a search peer.
 void setRemoveTimedOutServers(boolean removeTimedOutServers)
          Sets whether to remove a server connection that cannot be made within the time-out period specified by connectionTimeout, sendTimeout, or receiveTimeout.
 void setSendTimeout(int seconds)
          Sets the time-out period for writing and sending data to a search peer.
 void setServers(java.lang.String servers)
          Sets the initial peer server list.
 void setShareBundles(boolean shareBundles)
          Sets whether this server uses bundle replication to share search-time configuration with search peers.
 void setSkipOurselves(boolean skipOurselves)
          Deprecated. Deprecated since Splunk 5.0.
 void setStatusTimeout(int seconds)
          Sets the time-out period for connecting to a search peer for getting its basic information.
 void setTTL(int value)
          Deprecated. Deprecated since Splunk 5.0.
 
Methods inherited from class com.splunk.Entity
clear, containsKey, containsValue, entrySet, get, getMetadata, isDisabled, isEmpty, isNameChangeAllowed, keySet, put, putAll, refresh, remove, remove, size, update, update, validate, values
 
Methods inherited from class com.splunk.Resource
getName, getPath, getService, getTitle, invalidate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

actionPath

protected java.lang.String actionPath(java.lang.String action)
Returns the action path.

Overrides:
actionPath in class Entity
Parameters:
action - The requested action.
Returns:
The action path.

disable

public void disable()
Disable distributed search on this Splunk instance. Requires restarting Splunk before it takes effect.

Overrides:
disable in class Entity

enable

public void enable()
Enable distributed search on this Splunk instance. Requires restarting Splunk before it takes effect.

Overrides:
enable in class Entity

getAutoAddServers

@Deprecated
public boolean getAutoAddServers()
Deprecated. Deprecated since Splunk 5.0.

Indicates whether Splunk automatically adds all discovered servers.

Returns:
true if Splunk automatically adds servers, false if not.

getBlacklistNames

public java.lang.String getBlacklistNames()
Returns a list of server names that are excluded from being peers.

Returns:
A comma-separated list of excluded servers by name, or null if not available.

getBlacklistUrls

public java.lang.String getBlacklistUrls()
Returns a list of server URLs that are excluded from being peers.

Returns:
A comma-separated list of excluded servers by URL in the format "x.x.x.x:port", or null if not available.

getConnectionTimeout

public int getConnectionTimeout()
Returns the time-out period for connecting to search peers.

Returns:
The connection time-out period, in seconds, or -1 if not specified.

getCheckTimedOutServersFrequency

public int getCheckTimedOutServersFrequency()
Returns the frequency at which servers that have timed out are rechecked. If removeTimedOutServers is false, this setting has no effect.

Returns:
The frequency, in seconds, to recheck timed-out servers. If 0, servers are not rechecked. The default is 60 seconds.

getHeartbeatFrequency

@Deprecated
public int getHeartbeatFrequency()
Deprecated. Deprecated since Splunk 5.0.

Returns the period between heartbeat checks on other servers' health.

Returns:
The heartbeat period, in seconds. If 0, heartbeat checks are disabled.

getHeartbeatMcastAddress

@Deprecated
public java.lang.String getHeartbeatMcastAddress()
Deprecated. Deprecated since Splunk 5.0.

Returns the multicast address where each Splunk server sends and listens for heartbeat messages.

Returns:
The multicast address for discovery and heartbeat messages, or null if not available.

getHeartbeatPort

@Deprecated
public int getHeartbeatPort()
Deprecated. Deprecated since Splunk 5.0.

Returns the port where each Splunk server sends and listens for heartbeat messages.

Returns:
The heartbeat port, or -1 if not specified.

getReceiveTimeout

public int getReceiveTimeout()
Returns the time-out period for trying to read and receive data from a search peer.

Returns:
The receive time-out period, in seconds, or -1 if not specified.

getRemovedTimedOutServers

public boolean getRemovedTimedOutServers()
Indicates whether timed-out servers are removed from the distributed configuration.

Returns:
true if timed-out servers are removed from the distributed configuration, false if not.

getServerTimeout

public int getServerTimeout()
Deprecated. Use specific getConnectionTimeout, getReceiveTimeout, and getSendTimeout. Returns the server time-out period.

Returns:
The server time-out period, in seconds.

getSendTimeout

public int getSendTimeout()
Returns the time-out period for trying to write or send data to a search peer.

Returns:
The send time-out period, in seconds, or -1 if not specified.

getServers

public java.lang.String getServers()
Returns a list of peer servers.

Returns:
The comma-separated list of peer servers, or null if not available.

getShareBundles

public boolean getShareBundles()
Indicates whether this server uses bundle replication to share search-time configuration with search peers.

Note: If set to false, the search head assumes that the search peers can access the correct bundles using an NFS share.

Returns:
true if this server uses bundle replication, false if not.

getSkipOurselves

@Deprecated
public boolean getSkipOurselves()
Deprecated. Deprecated since Splunk 5.0.

Indicates whether this server participates in a search or call. If set to true, this server is skipped and does not participate. This setting is used for building a node that only merges the results from other servers.

Returns:
true if the server does not participate as a server in any search, false if it does.

getStatusTimeout

public int getStatusTimeout()
Returns the time-out period for gathering a search peer's basic information.

Returns:
The time-out period, in seconds.
See Also:
ServiceInfo

getTtl

@Deprecated
public int getTtl()
Deprecated. Deprecated since Splunk 5.0.

Returns the time-to-live (ttl) of heartbeat messages.

Returns:
The time-to-live of heartbeat messages.

isDistSearchEnabled

public boolean isDistSearchEnabled()
Indicates whether distributed search is enabled.

Returns:
true if distributed search is enabled, false if disabled.

setAutoAddServers

@Deprecated
public void setAutoAddServers(boolean autoAdd)
Deprecated. Deprecated since Splunk 5.0.

Sets whether to automatically add discovered servers.

Parameters:
autoAdd - true to add servers automatically, false if not.

setBlacklistNames

public void setBlacklistNames(java.lang.String names)
Sets the blacklist server names that are excluded from being peers.

Parameters:
names - A comma-separated list of server names.

setBlacklistURLs

public void setBlacklistURLs(java.lang.String names)
Sets the blacklist server names or URIs that are excluded from being peers. The format for a URI is "x.x.x.x:port".

Parameters:
names - A comma-separated list of server names or URIs.

setCheckTimedOutServersFrequency

public void setCheckTimedOutServersFrequency(int frequency)
Sets the server recheck frequency.

Note: This attribute is only relevant when removeTimedOutServers is set to true--otherwise, this attribute is ignored.

Parameters:
frequency - The server recheck frequency, in seconds. If set to 0, a recheck does not occur.
See Also:
getRemovedTimedOutServers()

setConnectionTimeout

public void setConnectionTimeout(int seconds)
Sets the time-out period for establishing a search peer connection.

Parameters:
seconds - The connection time-out period, in seconds.

setDisabled

public void setDisabled(boolean disabled)
Sets whether the distributed configuration is enabled or disabled.

Note: Using this method requires you to restart Splunk before this setting takes effect. To avoid restarting Splunk, use the Entity.disable and Entity.enable methods instead, which take effect immediately.

Parameters:
disabled - true to disabled to deployment client, false to enable.
See Also:
Entity.disable(), Entity.enable()

setHeartbeatFrequency

@Deprecated
public void setHeartbeatFrequency(int seconds)
Deprecated. Deprecated since Splunk 5.0.

Sets the heartbeat frequency between peers.

Parameters:
seconds - The time for peer heartbeats, in seconds. If set to 0, heartbeat messages are disabled.

setHeartbeatMcastAddr

@Deprecated
public void setHeartbeatMcastAddr(java.lang.String mCastAddress)
Deprecated. Deprecated since Splunk 5.0.

Sets the heartbeat multicast address. This address is used for server auto discovery. The default address is "224.0.0.37".

Parameters:
mCastAddress - The multicast address for server auto discovery.

setHeartbeatPort

@Deprecated
public void setHeartbeatPort(int port)
Deprecated. Deprecated since Splunk 5.0.

Sets the port where Splunk sends and listens for heartbeat messages.

Parameters:
port - The heartbeat port.

setReceiveTimeout

public void setReceiveTimeout(int seconds)
Sets the time-out period for reading and receiving data from a search peer.

Parameters:
seconds - The receive time-out period, in seconds.

setRemoveTimedOutServers

public void setRemoveTimedOutServers(boolean removeTimedOutServers)
Sets whether to remove a server connection that cannot be made within the time-out period specified by connectionTimeout, sendTimeout, or receiveTimeout. If false, every call to that server attempts to connect, which might result in a slow user interface.

Parameters:
removeTimedOutServers - true to remove timed-out server connections, false to attempt every call to the server.
See Also:
setConnectionTimeout(int), setSendTimeout(int), setReceiveTimeout(int)

setSendTimeout

public void setSendTimeout(int seconds)
Sets the time-out period for writing and sending data to a search peer.

Parameters:
seconds - The send time-out period, in seconds.

setServers

public void setServers(java.lang.String servers)
Sets the initial peer server list. You don't need to set servers here if you are operating completely in autoAddServers mode (discovered servers are automatically added).

Parameters:
servers - A comma-separated list of peer servers.
See Also:
getAutoAddServers(), setAutoAddServers(boolean)

setShareBundles

public void setShareBundles(boolean shareBundles)
Sets whether this server uses bundle replication to share search-time configuration with search peers. If set to false, the search head assumes that the search peers can access the correct bundles using an NFS share and have correctly configured the options for mounted_bundles and bundles_location in the distsearch.conf file.

Parameters:
shareBundles - true to share search-time configuration with peers, false if not.

setSkipOurselves

@Deprecated
public void setSkipOurselves(boolean skipOurselves)
Deprecated. Deprecated since Splunk 5.0.

Sets whether this server skips participation as a server in any search or other call. This setting is used for building a node that only merges the results from other servers.

Parameters:
skipOurselves - true to skip participation, false to participate as a server in searches and calls.

setStatusTimeout

public void setStatusTimeout(int seconds)
Sets the time-out period for connecting to a search peer for getting its basic information.

Parameters:
seconds - The connection time-out period, in seconds.
See Also:
ServiceInfo

setTTL

@Deprecated
public void setTTL(int value)
Deprecated. Deprecated since Splunk 5.0.

Sets the time-to-live (ttl) of heartbeat messages. Increasing this number allows UDP packets to spread beyond the current sub-net to the specified number of hops. Note: This feature only works when routers along the way are configured to pass UDP multicast packets.

Parameters:
value - The time-to-live value of heartbeat messages.