Modifier and Type | Method and Description |
---|---|
Socket |
attach()
Returns a socket attached to this raw TCP input.
|
void |
attachWith(ReceiverBehavior behavior)
Submits events to this raw TCP input, reusing the connection.
|
TcpConnections |
connections()
Returns an object that contains the inbound raw TCP connections.
|
String |
getConnectionHost()
Returns the style of host connection.
|
String |
getGroup()
Returns the group of this raw TCP input.
|
String |
getHost()
Returns the source host of this raw TCP input where this indexer gets its
data.
|
String |
getIndex()
Returns the index name of this raw TCP input.
|
InputKind |
getKind()
Returns the input kind of this input.
|
int |
getPort()
Returns the port that this input is listening on.
|
String |
getQueue()
Returns the queue for this raw TCP input.
|
int |
getRcvBuf()
Deprecated.
Returns the value of the
_rcvbuf attribute for this
TCP input. |
String |
getRestrictToHost()
Returns the incoming host restriction for this raw TCP input.
|
String |
getSource()
Returns the initial source key for this raw TCP input.
|
String |
getSourceType()
Returns the source type for events from this raw TCP input.
|
boolean |
getSSL()
Indicates whether this raw TCP input is using secure socket layer (SSL).
|
void |
setConnectionHost(String connection_host)
Sets the value for the from-host field for the remote server that
is sending data.
|
void |
setDisabled(boolean disabled)
Sets whether this input is enabled or disabled.
|
void |
setHost(String host)
Sets the host from which the indexer gets data.
|
void |
setIndex(String index)
Sets the index in which to store all generated events.
|
void |
setQueue(String queue)
Sets how the input processor should deposit the events it reads.
|
void |
setRawTcpDoneTimeout(int rawTcpDoneTimeout)
Sets the timeout value for adding a Done key.
|
void |
setSource(String source)
Sets the initial value for the source key for events from this
input.
|
void |
setSourceType(String sourcetype)
Sets the source type for events from this raw TCP input.
|
void |
setSSL(boolean SSL)
Sets whether to use secure socket layer (SSL).
|
void |
submit(String eventBody)
Submit a single event to this raw TCP input by opening the connection,
submitting the event, and closing the connection.
|
void |
update(Map<String,Object> args)
Updates the entity with the values you previously set using the setter
methods, and any additional specified arguments.
|
actionPath, clear, containsKey, containsValue, disable, enable, entrySet, get, getContent, getMetadata, isDisabled, isEmpty, isNameChangeAllowed, keySet, put, putAll, refresh, remove, remove, size, update, validate, values
getName, getPath, getService, getTitle, getUpdated, invalidate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
public Socket attach() throws IOException
IOException
- The IOException instancepublic void attachWith(ReceiverBehavior behavior) throws IOException
run
method of the ReceiverBehavior
object, then handles
setting up and tearing down the socket.
For an example of how to use this method, see
How to
get data into Splunk on
dev.splunk.com.behavior
- The ReceiverBehavior instanceIOException
- The IOException instancepublic TcpConnections connections()
public String getConnectionHost()
null
if not specified.public String getGroup()
public String getHost()
null
if not specified.public String getIndex()
null
if not specified.public InputKind getKind()
public String getQueue()
null
if not specified.public int getRcvBuf()
_rcvbuf
attribute for this
TCP input._rcvbuf
value.public String getRestrictToHost()
null
if not specified.public String getSource()
null
if not specified.public String getSourceType()
null
if not specified.public boolean getSSL()
true
if this input is using SSL, false
if not.public void setSSL(boolean SSL)
SSL
- true
to use SSL, false
if not.public void setConnectionHost(String connection_host)
connection_host
- The connection host information.public void setDisabled(boolean 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.
disabled
- true
to disable this input, false
to
enable it.public void setHost(String host)
host
- The host name.public void setIndex(String index)
index
- The index name.public void submit(String eventBody) throws IOException
attachWith
to open a single connection.eventBody
- A string that contains the event.IOException
- The IOException instanceattachWith(com.splunk.ReceiverBehavior)
public void setQueue(String queue)
queue
- The queue-processing type.public void setRawTcpDoneTimeout(int rawTcpDoneTimeout)
name
remains
idle after receiving data for this specified number of seconds, it adds
a Done key, implying that the last event has been completely received.rawTcpDoneTimeout
- The timeout value, in seconds.public void setSource(String 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.
source
- The source.public void setSourceType(String sourcetype)
sourcetype
- The source type.public int getPort()
public void update(Map<String,Object> args)
update
method to additionally update this input's
path if the RestrictToHost
property is changed.Copyright © 2022 Splunk, Inc.. All rights reserved.