INTEXT-21 Add Splunk adapter

For reference see: https://jira.springsource.org/browse/INTEXT-21
This commit is contained in:
Jarred Li
2012-09-26 13:48:14 +08:00
committed by Gunnar Hillert
parent 68d0ee607b
commit deb09cdf9c
72 changed files with 7331 additions and 0 deletions

View File

@@ -0,0 +1,113 @@
Spring Integration Splunk Adapter
=================================================
The SI adapter includes Outbound Channel Adapter and Inbound Channel Adapter.
Inbound channel adapter :
-----------------------------------------------------------------------------
Inbound channel adapter is used to get data out of Splunk and put into
Spring Integration's channel. There are 5 ways to get data out of Splunk:
* Blocking
* Non blocking
* Saved search
* Realtime
* Export
### Blocking search:
~~~~~xml
<int-splunk:inbound-channel-adapter id="splunkInboundChannelAdapter"
auto-startup="true" search="search spring:example"
splunk-server-ref="splunkServer"
channel="inputFromSplunk" mode="blocking" earliestTime="-1d" latestTime="now" initEarliestTime="-1d">
<int:poller fixed-rate="5" time-unit="SECONDS"/>
</int-splunk:inbound-channel-adapter>
~~~~~
### Non blocking search:
~~~~~xml
<int-splunk:inbound-channel-adapter id="splunkInboundChannelAdapter"
auto-startup="true" search="search spring:example"
splunk-server-ref="splunkServer"
channel="inputFromSplunk" mode="normal" earliestTime="-1d" latestTime="now" initEarliestTime="-1d">
<int:poller fixed-rate="5" time-unit="SECONDS"/>
</int-splunk:inbound-channel-adapter>
~~~~~
### Saved search:
~~~~~xml
<int-splunk:inbound-channel-adapter id="splunkInboundChannelAdapter"
auto-startup="true" savedSearch="test" splunk-server-ref="splunkServer"
channel="inputFromSplunk" mode="saved" earliestTime="-1d" latestTime="now" initEarliestTime="-1d">
<int:poller fixed-rate="5" time-unit="SECONDS"/>
</int-splunk:inbound-channel-adapter>
~~~~~
### Realtime search:
~~~~~xml
<int-splunk:inbound-channel-adapter id="splunkInboundChannelAdapter"
auto-startup="true" search="search spring:example" splunk-server-ref="splunkServer" channel="inputFromSplunk"
mode="realtime" earliestTime="-5s" latestTime="rt" initEarliestTime="-1d">
<int:poller fixed-rate="5" time-unit="SECONDS"/>
</int-splunk:inbound-channel-adapter>
~~~~~
### Export:
~~~~~xml
<int-splunk:inbound-channel-adapter id="splunkInboundChannelAdapter"
auto-startup="true" search="search spring:example" splunk-server-ref="splunkServer" channel="inputFromSplunk"
mode="export" earliestTime="-5d" latestTime="now" initEarliestTime="-1d">
<int:poller fixed-rate="5" time-unit="SECONDS"/>
</int-splunk:inbound-channel-adapter>
~~~~~
Outbound channel adapter:
----------------------------------------------------------------------------------------------
Outbound channel adapter is used to put data into Splunk from
channels in Spring Integration. There are 3 kinds of method to put data
* REST(submit)
* stream
* tcp
### Submit:
~~~~~xml
<int-splunk:outbound-channel-adapter
id="splunkOutboundChannelAdapter" auto-startup="true" order="1"
channel="outputToSplunk"
splunk-server-ref="splunkServer" pool-server-connection="true"
sourceType="spring-integration" source="example2" ingest="submit">
</int-splunk:outbound-channel-adapter>
~~~~~
### Stream:
~~~~~xml
<int-splunk:outbound-channel-adapter
id="splunkOutboundChannelAdapter" auto-startup="true" order="1"
channel="outputToSplunk" splunk-server-ref="splunkServer"
ingest="stream">
</int-splunk:outbound-channel-adapter>
~~~~~
### tcp
~~~~~xml
<int-splunk:outbound-channel-adapter
id="splunkOutboundChannelAdapter" auto-startup="true" order="1"
channel="outputToSplunk" splunk-server-ref="splunkServer"
ingest="tcp" tcpPort="9999">
</int-splunk:outbound-channel-adapter>
~~~~~
Development
-----------------
### To build:
./gradlew build
### To generate Eclipse metadata (.classpath and .project files), do the following:
./gradlew eclipse