com.splunk
Class UdpInput

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

public class UdpInput
extends Input

The UdpInput class represents a UDP data input.


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
content, toUpdate
 
Fields inherited from class com.splunk.Resource
actions, path, refreshArgs, service, title
 
Method Summary
 UdpConnections connections()
          Returns an object that contains the inbound UDP connections.
 java.lang.String getConnectionHost()
          Returns the style of host connection.
 java.lang.String getGroup()
          Returns the group for this UDP input.
 java.lang.String getHost()
          Returns the source host for this UDP input, where this indexer gets its data.
 java.lang.String getIndex()
          Returns the index name for this UDP input.
 InputKind getKind()
          Returns the input kind for this input.
 boolean getNoAppendingTimeStamp()
          Indicates whether Splunk prepends a timestamp and host name to incoming events.
 boolean getNoPriorityStripping()
          Indicates whether Splunk removes the priority field from incoming events.
 int getPort()
          Returns the port that this input is listening on.
 java.lang.String getQueue()
          Returns the queue for this UDP input.
 int getRcvBuf()
          Deprecated. This is not used anymore. No replacement.
 java.lang.String getSource()
          Returns the initial source key for this UDP input.
 java.lang.String getSourceType()
          Returns the event source type for this UDP input.
 void setConnectionHost(java.lang.String connection_host)
          Sets the value of the from-host field for the remote server that is sending data.
 void setHost(java.lang.String host)
          Sets the host from which the indexer gets data.
 void setIndex(java.lang.String index)
          Sets the index in which to store all generated events.
 void setNoAppendingTimeStamp(boolean no_appending_timestamp)
          Sets whether Splunk should prepend a timestamp and host name to incoming events.
 void setNoPriorityStripping(boolean no_priority_stripping)
          Sets whether Splunk should strip the priority field from incoming events.
 void setQueue(java.lang.String queue)
          Sets how the input processor should deposit the events it reads.
 void setSource(java.lang.String source)
          Sets the initial value for the source key for events from this input.
 void setSourceType(java.lang.String sourcetype)
          Sets the source type for events from this input.
 void submit(java.lang.String eventBody)
          Send a string to this UDP input.
 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
actionPath, clear, containsKey, containsValue, disable, enable, entrySet, get, getContent, getMetadata, isDisabled, isEmpty, isNameChangeAllowed, keySet, put, putAll, refresh, remove, remove, size, 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

connections

public UdpConnections connections()
Returns an object that contains the inbound UDP connections.

Returns:
The UDP connections object.

getConnectionHost

public java.lang.String getConnectionHost()
Returns the style of host connection. Valid values are: "ip", "dns", and "none".

Returns:
The style of host connection, or null if not specified.

getGroup

public java.lang.String getGroup()
Returns the group for this UDP input.

Returns:
The group.

getHost

public java.lang.String getHost()
Returns the source host for this UDP input, where this indexer gets its data.

Returns:
The source host, or null if not specified.

getIndex

public java.lang.String getIndex()
Returns the index name for this UDP input.

Returns:
The index name.

getKind

public InputKind getKind()
Returns the input kind for this input.

Overrides:
getKind in class Input
Returns:
The input kind.

getQueue

public java.lang.String getQueue()
Returns the queue for this UDP input. Valid values are: "parsingQueue" and "indexQueue".

Returns:
The queue, or null if not specified.

getRcvBuf

public int getRcvBuf()
Deprecated. This is not used anymore. No replacement.

Returns the value of the _rcvbuf attribute for this UDP input.

Returns:
The _rcvbuf value.

getSource

public java.lang.String getSource()
Returns the initial source key for this UDP input. Typically, this value is the input file path.

Returns:
The source, or null if not specified.

getSourceType

public java.lang.String getSourceType()
Returns the event source type for this UDP input.

Returns:
The event source type, or null if not specified.

getNoAppendingTimeStamp

public boolean getNoAppendingTimeStamp()
Indicates whether Splunk prepends a timestamp and host name to incoming events.

Returns:
true if Splunk does not prepend a timestamp and host name to incoming events, false if it does.

getNoPriorityStripping

public boolean getNoPriorityStripping()
Indicates whether Splunk removes the priority field from incoming events.

Returns:
true if Splunk does not remove the priority field from incoming syslog events, false if it does.

setConnectionHost

public void setConnectionHost(java.lang.String connection_host)
Sets the value of the from-host field for the remote server that is sending data. Valid values are:

Parameters:
connection_host - The connection host information.

setHost

public void setHost(java.lang.String host)
Sets the host from which the indexer gets data.

Parameters:
host - The host.

setIndex

public void setIndex(java.lang.String index)
Sets the index in which to store all generated events.

Parameters:
index - The index.

setNoAppendingTimeStamp

public void setNoAppendingTimeStamp(boolean no_appending_timestamp)
Sets whether Splunk should prepend a timestamp and host name to incoming events.

Parameters:
no_appending_timestamp - true to not prepend a timestamp and host name to incoming events, false to prepend that information.

setNoPriorityStripping

public void setNoPriorityStripping(boolean no_priority_stripping)
Sets whether Splunk should strip the priority field from incoming events.

Parameters:
no_priority_stripping - true to not strip the priority field, false to remove it.

setQueue

public void setQueue(java.lang.String queue)
Sets how the input processor should deposit the events it reads. Valid values are:

Parameters:
queue - The queue-processing type.

setSource

public void setSource(java.lang.String source)
Sets the initial value for the source key for events from this input. The source key is used during parsing and indexing. The source field is used for searches. As a convenience, the source string is prepended with "source::".

Note: Overriding the source key is generally not recommended. Typically, the input layer provides a more accurate string to aid in problem analysis and investigation, accurately recording the file from which the data was retrieved. Consider the use of source types, tagging, and search wildcards before overriding this value.

Parameters:
source - The source.

setSourceType

public void setSourceType(java.lang.String sourcetype)
Sets the source type for events from this input.

Parameters:
sourcetype - The source type.

submit

public void submit(java.lang.String eventBody)
            throws java.io.IOException
Send a string to this UDP input.

Parameters:
eventBody - The text to send.
Throws:
java.io.IOException

getPort

public int getPort()
Returns the port that this input is listening on.


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 the update method to additionally update this input's path if the RestrictToHost property is changed.

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