com.splunk
Class OutputGroup

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

public class OutputGroup
extends Entity

The OutputGroup class represents an output group, providing access to the configuration of a group of one or more data-forwarding destinations.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Method Summary
 boolean getAutoLB()
          Indicates whether this forwarder performs automatic load balancing.
 java.lang.String getMethod()
          Returns the type of output processor for this forwarder group.
 java.lang.String[] getServers()
          Returns the list of servers for this forwarder group.
 void setAutoLB(boolean autoLB)
          Sets whether this forwarder performs automatic load balancing.
 void setCompressed(boolean compressed)
          Sets whether this forwarder sends compressed data.
 void setDropEventsOnQueueFull(int dropEventsOnQueueFull)
          Sets how long to wait before throwing out all new events until the output queue has space.
 void setHeartbeatFrequency(int frequency)
          Sets the frequency between heartbeat packets that are sent to the receiving server.
 void setMaxQueueSize(java.lang.String maxQueueSize)
          Sets the maximum size of the forwarder's output queue.
 void setMethod(java.lang.String method)
          Sets the type of output processor.
 void setSendCookedData(boolean sendCookedData)
          Sets whether to forward cooked data.
 void setServers(java.lang.String servers)
          Sets the list of servers included in this group.
 void update()
          Updates the entity with the accumulated arguments, established by the individual setter methods for each specific entity class.
 void update(java.util.Map<java.lang.String,java.lang.Object> args)
          Updates the entity with the values you previously set using the setter methods, and any additional specified arguments.
 
Methods inherited from class com.splunk.Entity
clear, containsKey, containsValue, disable, enable, entrySet, get, getMetadata, isDisabled, isEmpty, keySet, put, putAll, refresh, remove, remove, size, validate, values
 
Methods inherited from class com.splunk.Resource
getName, getPath, getService, getTitle, invalidate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Method Detail

getAutoLB

public boolean getAutoLB()
Indicates whether this forwarder performs automatic load balancing.

Returns:
true if the forwarder performs automatic load balancing, false if not.

getMethod

public java.lang.String getMethod()
Returns the type of output processor for this forwarder group. Valid values are: "tcpout", "syslog", and "httpout".

Returns:
The output processor type, or null if not specified.

getServers

public java.lang.String[] getServers()
Returns the list of servers for this forwarder group.

Returns:
The server list.

setServers

public void setServers(java.lang.String servers)
Sets the list of servers included in this group.

Parameters:
servers - A comma-separated list of servers.

setAutoLB

public void setAutoLB(boolean autoLB)
Sets whether this forwarder performs automatic load balancing. If set to true, the forwarder performs automatic load balancing. In automatic mode, the forwarder selects a new indexer every autoLBFrequency seconds. If the connection to the current indexer is lost, the forwarder selects a new live indexer to forward data to. Do not change the default setting, unless you have some overriding need to use round-robin load balancing. Round-robin load balancing (autoLB is false) was previously the default load-balancing method. Starting with release 4.2, however, round-robin load balancing has been deprecated, and the default has been changed to automatic load balancing (autoLB is true).

Parameters:
autoLB - true to perform automatic load balancing on this forwarder, false if not.
See Also:
getAutoLB(), OutputDefault.getAutoLBFrequency()

setCompressed

public void setCompressed(boolean compressed)
Sets whether this forwarder sends compressed data. The receiver port must also have compression enabled for this to work.

Parameters:
compressed - true for this forwarder to send compressed data, false if not.

setDropEventsOnQueueFull

public void setDropEventsOnQueueFull(int dropEventsOnQueueFull)
Sets how long to wait before throwing out all new events until the output queue has space. The default value is -1, which means to not drop events.

Caution: Do not set this value to a positive integer if you are monitoring files.

Setting this to -1 or 0 causes the output queue to block when it gets full, which causes further blocking up the processing chain. If any target group's queue is blocked, no more data reaches any other target group.

Using auto load-balancing is the best way to minimize this condition, because, in that case, multiple receivers must be down or jammed before queue blocking can occur.

Parameters:
dropEventsOnQueueFull - The time to wait before throwing out events, in seconds, or -1 to not drop events.
See Also:
getAutoLB()

setHeartbeatFrequency

public void setHeartbeatFrequency(int frequency)
Sets the frequency between heartbeat packets that are sent to the receiving server.

Note: Heartbeats are only sent when SendCookedData is true.

Parameters:
frequency - The frequency, in seconds.
See Also:
OutputDefault.getSendCookedData()

setMaxQueueSize

public void setMaxQueueSize(java.lang.String maxQueueSize)
Sets the maximum size of the forwarder's output queue. This value also sets the maximum size of the wait queue to three times this value, if you have enabled indexer acknowledgment (the useACK attribute is set to true in the forwarder's outputs.conf).

Although the wait queue and the output queues are both configured by this attribute, they are separate queues. The setting determines the maximum size of the queue's in-memory (RAM) buffer.

For heavy forwarders that send parsed data, maxQueueSize is the maximum number of events. Because events are typically much shorter than data blocks, the memory consumed by the queue on a parsing forwarder will likely be much smaller than on a non-parsing forwarder, if you use this version of the setting.

If you specify an integer (for example, "100"), maxQueueSize indicates the maximum number of queued events (for parsed data) or blocks of data (for unparsed data). A block of data is approximately 64KB. For non-parsing forwarders that send unparsed data, such as universal forwarders, maxQueueSize is the maximum number of data blocks.

If specified as an integer followed by "KB", MB", or "GB" (for example, "100MB"), maxQueueSize indicates the maximum RAM allocated to the queue buffer. The default is 500KB (which means a maximum size of 500KB for the output queue and 1500KB for the wait queue, if any).

Parameters:
maxQueueSize - The maximum queue size as a number, or a number followed by "KB", MB", or "GB".

setMethod

public void setMethod(java.lang.String method)
Sets the type of output processor. Valid values are "tcpout" and "syslog".

Parameters:
method - The output processor type.

setSendCookedData

public void setSendCookedData(boolean sendCookedData)
Sets whether to forward cooked data.

Parameters:
sendCookedData - true for Splunk to process events before sending them, false to send raw and untouched events.

update

public void update(java.util.Map<java.lang.String,java.lang.Object> args)
Updates the entity with the values you previously set using the setter methods, and any additional specified arguments. The specified arguments take precedent over the values that were set using the setter methods.

Overrides:
update in class Entity
Parameters:
args - The arguments to update.

update

public void update()
Updates the entity with the accumulated arguments, established by the individual setter methods for each specific entity class.

Overrides:
update in class Entity