Author: buildbot
Date: Sat Jul 25 16:18:46 2015
New Revision: 959546
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/splunk.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/splunk.html
==============================================================================
--- websites/production/camel/content/splunk.html (original)
+++ websites/production/camel/content/splunk.html Sat Jul 25 16:18:46 2015
@@ -86,68 +86,58 @@
<tr>
<td valign="top" width="100%">
<div class="wiki-content maincontent"><h2 id="Splunk-SplunkComponent">Splunk
Component</h2><p><strong>Available as of Camel 2.13</strong></p><p>The Splunk
component provides access to <a shape="rect" class="external-link"
href="http://docs.splunk.com/Documentation/Splunk/latest"
rel="nofollow">Splunk</a> using the Splunk provided <a shape="rect"
class="external-link" href="https://github.com/splunk/splunk-sdk-java"
rel="nofollow">client</a> api, and it enables you to publish and search for
events in Splunk.</p><p>Maven users will need to add the following dependency
to their pom.xml for this component:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: xml; gutter: false; theme: Default"
style="font-size:12px;"> <dependency>
+<script class="brush: xml; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ <dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-splunk</artifactId>
<version>${camel-version}</version>
</dependency>
-</pre>
+]]></script>
</div></div><h3 id="Splunk-URIformat">URI format</h3><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"> splunk://[endpoint]?[options]
-</pre>
-</div></div><h3 id="Splunk-ProducerEndpoints:">Producer Endpoints:</h3><div
class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Endpoint </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>
Description</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> stream </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Streams data to a named index or the default if not
specified. <br clear="none">
-When using stream mode be aware of that Splunk has some internal buffer (about
1MB or so) before events gets to the index. <br clear="none">
-If you need realtime, better use submit or tcp mode. </p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> submit </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> submit mode. Uses Splunk rest
api to publish events to a named index or the default if not specified.
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> tcp
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> tcp mode.
Streams data to a tcp port, and requires a open receiver port in
Splunk.</p></td></tr></tbody></table></div>
-</div><p>When publishing events the message body should contain a
SplunkEvent.</p><p><strong>Example</strong></p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
from("direct:start").convertBodyTo(SplunkEvent.class)
-
.to("splunk://submit?username=user&password=123&index=myindex&sourceType=someSourceType&source=mySource")...
-</pre>
-</div></div><p>In this example a converter is required to convert to a
SplunkEvent class.</p><h3 id="Splunk-ConsumerEndpoints:">Consumer
Endpoints:</h3><div class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Endpoint </p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>
Description</p></th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>normal </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Performs normal search and requires a search query in
the search option.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>savedsearch</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Performs search based on a search query saved in
splunk and requires the name of the query in the savedSearch
option.</p></td></tr></tbody></table></div>
-</div><p><strong>Example</strong></p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
from("splunk://normal?delay=5s&username=user&password=123&initEarliestTime=-10s&search=search
index=myindex sourcetype=someSourcetype")
- .to("direct:search-result");
-</pre>
-</div></div><p>camel-splunk creates a route exchange per search result with a
SplunkEvent in the body.</p><h3 id="Splunk-URIOptions">URI Options</h3><div
class="confluenceTableSmall">
-<div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Default Value </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Context </p></th><th colspan="1"
rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>host </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> localhost </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Both </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Splunk host.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>port </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> 8089 </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Both </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Splunk port</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p> username </p
></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p> Both </p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p> Username for
>Splunk</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
>password </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null
></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Both
></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Password for
>Splunk</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
>connectionTimeout </p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p> 5000 </p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p> Both </p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p> Timeout in MS when connecting to Splunk
>server</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
>useSunHttpsHandler </p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p> false <
/p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Both </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> Use
sun.net.www.protocol.https.Handler Https hanlder to establish the Splunk
Connection. <br clear="none">
-Can be useful when running in application servers to avoid app. server https
handling.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
index </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Producer
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Splunk index to
write to</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
sourceType </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Producer
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Splunk sourcetype
arguement</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
source </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Producer
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Splunk source
arguement
</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
tcpReceiverPort </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> 0
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Producer
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Splunk tcp
receiver port when using tcp producer endpoint.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> initEarliestTime </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Consumer </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Initial start offset of the first search.
Required</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
earliestTime </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Consumer
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Earliest time of
the search time
window.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
latestTime </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> null
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Consumer
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Latest time of
the search time window.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> count </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> 0 </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Consumer </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> A number that indicates the maximum number of entities
to return. <br clear="none">
-Note this is not the same as maxMessagesPerPoll which currently is
unsupported</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p> search </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> null </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> Consumer </p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p> The Splunk query to run</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p> savedSearch </p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p> null </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> Consumer </p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p> The name of the query saved in Splunk to
run</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>
streaming </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> false
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> Consumer
</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> <strong>C
amel 2.14.0</strong> : Stream exchanges as they are received from Splunk,
rather than returning all of them in one batch. This has the benefit of
receiving results faster, as well as requiring less memory as exchanges aren't
buffered in the component.</p></td></tr></tbody></table></div>
-</div><h3 id="Splunk-Messagebody">Message body</h3><p>Splunk operates on data
in key/value pairs. The SplunkEvent class is a placeholder for such data, and
should be in the message body <br clear="none"> for the producer. Likewise it
will be returned in the body per search result for the consumer.</p><h3
id="Splunk-UseCases">Use Cases</h3><p>Search Twitter for tweets with music and
publish events to Splunk</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
from("twitter://search?type=polling&keywords=music&delay=10&consumerKey=abc&consumerSecret=def&accessToken=hij&accessTokenSecret=xxx")
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[ splunk://[endpoint]?[options]
+]]></script>
+</div></div><h3 id="Splunk-ProducerEndpoints:">Producer Endpoints:</h3><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Endpoint</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>stream</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Streams data to a named index or the default if not
specified. <br clear="none"> When using stream mode be aware of that Splunk has
some internal buffer (about 1MB or so) before events gets to the index. <br
clear="none"> If you need realtime, better use submit or tcp
mode.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>submit</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>submit mode. Uses Splunk rest api to publish events to
a named index or the default if not specified.</p></td></tr><tr><td colspan="1"
rowspan="1"
class="confluenceTd"><p>tcp</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>tcp mode. Streams data to a tcp port, and requires a
open receiver port in Splunk.</p></td></tr></tbody></table></div></div><p>When
publishing events the message body should contain a SplunkEvent.  See
comment under message body.</p><p><strong>Example</strong></p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
from("direct:start").convertBodyTo(SplunkEvent.class)
+
.to("splunk://submit?username=user&password=123&index=myindex&sourceType=someSourceType&source=mySource")...
+]]></script>
+</div></div><p>In this example a converter is required to convert to a
SplunkEvent class.</p><h3 id="Splunk-ConsumerEndpoints:">Consumer
Endpoints:</h3><div class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Endpoint</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>normal</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Performs normal search and requires a search query in
the search option.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>savedsearch</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Performs search based on a search query saved in splunk
and requires the name of the query in the savedSearch
option.</p></td></tr></tbody></table></div></div><p><strong>Example</strong></p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeC
ontent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
from("splunk://normal?delay=5s&username=user&password=123&initEarliestTime=-10s&search=search
index=myindex sourcetype=someSourcetype")
+ .to("direct:search-result");
+]]></script>
+</div></div><p>camel-splunk creates a route exchange per search result with a
SplunkEvent in the body.</p><h3 id="Splunk-URIOptions">URI Options</h3><div
class="confluenceTableSmall"><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1"
class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Context</p></th><th colspan="1" rowspan="1"
class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>host</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>localhost</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Both</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Splunk host.</p></td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd"><p>port</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>8089</p></td><td colspan="1" rowspan="1"
class="confluenceTd"
><p>Both</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Splunk
>port</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p>username</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Both</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Username for Splunk</p></td></tr><tr><td colspan="1"
>rowspan="1" class="confluenceTd"><p>password</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Both</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Password for Splunk</p></td></tr><tr><td colspan="1"
>rowspan="1" class="confluenceTd"><p>connectionTimeout</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>5000</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Both</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Timeout in MS when connecting to Splunk
>server</p></td></tr><tr
><td colspan="1" rowspan="1"
>class="confluenceTd"><p>useSunHttpsHandler</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Both</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Use sun.net.www.protocol.https.Handler Https handler
>to establish the Splunk Connection. <br clear="none"> Can be useful when
>running in application servers to avoid app. server https
>handling.</p></td></tr><tr><td colspan="1" rowspan="1"
>class="confluenceTd"><p>index</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Splunk index to write to</p></td></tr><tr><td
>colspan="1" rowspan="1" class="confluenceTd"><p>sourceType</p></td><td
>colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan=
"1" class="confluenceTd"><p>Splunk sourcetype arguement</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>source</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Producer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Splunk source arguement</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>tcpReceiverPort</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>0</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Producer</p></td><td colspan="1"
rowspan="1" class="confluenceTd"><p>Splunk tcp receiver port when using tcp
producer endpoint.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">raw</td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd">Producer</td><td colspan="1" rowspan="1"
class="confluenceTd"><p><strong>Camel 2.16.0</strong> : Should the body be
inserted raw (
true/false). <br clear="none">If true, the body will be transformed to a
string before it's send to Splunk.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>initEarliestTime</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Initial start offset of the first search.
Required</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>earliestTime</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Earliest time of the search time
window.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>latestTime</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p></td><td colspan="1" row
span="1" class="confluenceTd"><p>Latest time of the search time
window.</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>count</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>0</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>A number that indicates the maximum number of entities
to return. <br clear="none"> Note this is not the same as maxMessagesPerPoll
which currently is unsupported</p></td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd"><p>search</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>Consumer</p></td><td colspan="1" rowspan="1"
class="confluenceTd"><p>The Splunk query to run</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p>savedSearch</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1"
rowspan="1" class="confluenceTd"
><p>Consumer</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The
>name of the query saved in Splunk to run</p></td></tr><tr><td colspan="1"
>rowspan="1" class="confluenceTd"><p>streaming</p></td><td colspan="1"
>rowspan="1" class="confluenceTd"><p>false</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p>Consumer</p></td><td colspan="1" rowspan="1"
>class="confluenceTd"><p><strong>Camel 2.14.0</strong> : Stream exchanges as
>they are received from Splunk, rather than returning all of them in one
>batch. This has the benefit of receiving results faster, as well as requiring
>less memory as exchanges aren't buffered in the
>component.</p></td></tr></tbody></table></div></div><h3
>id="Splunk-Messagebody">Message body</h3><p>Splunk operates on data in
>key/value pairs. The SplunkEvent class is a placeholder for such data, and
>should be in the message body <br clear="none"> for the producer. Likewise it
>will be returned in the body per search result for the consumer.</p><p>As o
f Camel 2.16.0 you can send raw data to Splunk by setting the raw option on
the producer endpoint. This is useful for eg. json/xml and other payloads where
Splunk has build in support. </p><h3 id="Splunk-UseCases">Use
Cases</h3><p>Search Twitter for tweets with music and publish events to
Splunk</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
from("twitter://search?type=polling&keywords=music&delay=10&consumerKey=abc&consumerSecret=def&accessToken=hij&accessTokenSecret=xxx")
.convertBodyTo(SplunkEvent.class)
-
.to("splunk://submit?username=foo&password=bar&index=camel-tweets&sourceType=twitter&source=music-tweets");
-</pre>
+
.to("splunk://submit?username=foo&password=bar&index=camel-tweets&sourceType=twitter&source=music-tweets");
+]]></script>
</div></div><p>To convert a Tweet to a SplunkEvent you could use a converter
like</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">@Converter
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[@Converter
public class Tweet2SplunkEvent {
@Converter
public static SplunkEvent convertTweet(Status status) {
- SplunkEvent data = new SplunkEvent("twitter-message", null);
- //data.addPair("source", status.getSource());
- data.addPair("from_user", status.getUser().getScreenName());
- data.addPair("in_reply_to", status.getInReplyToScreenName());
+ SplunkEvent data = new SplunkEvent("twitter-message", null);
+ //data.addPair("source", status.getSource());
+ data.addPair("from_user", status.getUser().getScreenName());
+ data.addPair("in_reply_to", status.getInReplyToScreenName());
data.addPair(SplunkEvent.COMMON_START_TIME, status.getCreatedAt());
data.addPair(SplunkEvent.COMMON_EVENT_ID, status.getId());
- data.addPair("text", status.getText());
- data.addPair("retweet_count", status.getRetweetCount());
+ data.addPair("text", status.getText());
+ data.addPair("retweet_count", status.getRetweetCount());
if (status.getPlace() != null) {
- data.addPair("place_country", status.getPlace().getCountry());
- data.addPair("place_name", status.getPlace().getName());
- data.addPair("place_street", status.getPlace().getStreetAddress());
+ data.addPair("place_country",
status.getPlace().getCountry());
+ data.addPair("place_name", status.getPlace().getName());
+ data.addPair("place_street",
status.getPlace().getStreetAddress());
}
if (status.getGeoLocation() != null) {
- data.addPair("geo_latitude",
status.getGeoLocation().getLatitude());
- data.addPair("geo_longitude",
status.getGeoLocation().getLongitude());
+ data.addPair("geo_latitude",
status.getGeoLocation().getLatitude());
+ data.addPair("geo_longitude",
status.getGeoLocation().getLongitude());
}
return data;
}
}
-</pre>
+]]></script>
</div></div><p>Search Splunk for tweets</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">
from("splunk://normal?username=foo&password=bar&initEarliestTime=-2m&search=search
index=camel-tweets sourcetype=twitter")
- .log("${body}");
-</pre>
+<script class="brush: java; gutter: false; theme: Default"
type="syntaxhighlighter"><![CDATA[
from("splunk://normal?username=foo&password=bar&initEarliestTime=-2m&search=search
index=camel-tweets sourcetype=twitter")
+ .log("${body}");
+]]></script>
</div></div><h3 id="Splunk-Othercomments">Other comments</h3><p>Splunk comes
with a variety of options for leveraging machine generated data with prebuilt
apps for analyzing and displaying this. <br clear="none"> For example the jmx
app. could be used to publish jmx attributes, eg. route and jvm metrics to
Splunk, and displaying this on a dashboard.</p><p></p><h3
id="Splunk-SeeAlso">See Also</h3>
<ul><li><a shape="rect" href="configuring-camel.html">Configuring
Camel</a></li><li><a shape="rect"
href="component.html">Component</a></li><li><a shape="rect"
href="endpoint.html">Endpoint</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li></ul></div>
</td>
@@ -155,7 +145,7 @@ public class Tweet2SplunkEvent {
<div class="navigation">
<div class="navigation_top">
<!-- NavigationBar -->
-<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49132"><a
shape="rect" href="overview.html">Overview</a></h3><ul
class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a
shape="rect" href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3
id="Navigation-Documentationhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49534"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li>
<li><a shape="rect" href="architecture.html">Architecture</a></li><li><a
shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration
Patterns</a></li><li><a shape="rect" href="dsl.html">DSL</a></li><li><a
shape="rect" href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
+<div class="navigation_bottom" id="navigation_bottom"><h3
id="Navigation-Overview"><a shape="rect"
href="overview.html">Overview</a></h3><ul class="alternate"><li><a shape="rect"
href="index.html">Home</a></li><li><a shape="rect"
href="download.html">Download</a></li><li><a shape="rect"
href="getting-started.html">Getting Started</a></li><li><a shape="rect"
href="faq.html">FAQ</a></li></ul><h3 id="Navigation-Documentation"><a
shape="rect" href="documentation.html">Documentation</a></h3><ul
class="alternate"><li><a shape="rect" href="user-guide.html">User
Guide</a></li><li><a shape="rect" href="manual.html">Manual</a></li><li><a
shape="rect" href="books.html">Books</a></li><li><a shape="rect"
href="tutorials.html">Tutorials</a></li><li><a shape="rect"
href="examples.html">Examples</a></li><li><a shape="rect"
href="cookbook.html">Cookbook</a></li><li><a shape="rect"
href="architecture.html">Architecture</a></li><li><a shape="rect"
href="enterprise-integration-patterns.html">Enterprise
Integration Patterns</a></li><li><a shape="rect"
href="dsl.html">DSL</a></li><li><a shape="rect"
href="components.html">Components</a></li><li><a shape="rect"
href="data-format.html">Data Format</a></li><li><a shape="rect"
href="languages.html">Languages</a></li><li><a shape="rect"
href="security.html">Security</a></li><li><a shape="rect"
href="security-advisories.html">Security Advisories</a></li></ul><h3
id="Navigation-Search">Search</h3><form
enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box"
action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
@@ -163,7 +153,7 @@ public class Tweet2SplunkEvent {
<input type="submit" name="sa" value="Search">
</div>
</form>
-<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49115"><a
shape="rect" href="community.html">Community</a></h3><ul
class="alternate"><li><a shape="rect"
href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developershttps://cwi
ki.apache.org/confluence/pages/viewpage.action?pageId=49124"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"><li><a
shape="rect" href="developers.html">Developer Guide</a></li><li><a shape="rect"
href="source.html">Source</a></li><li><a shape="rect"
href="building.html">Building</a></li><li><a shape="rect"
href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
href="irc-room.html">IRC Room</a></li></ul><h3
id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
class="alternate"><li><a shape="rect" class="external-link"
href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
class="external-link"
href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
shape="rect" class="external-link"
href="http://www.apache.org/security/">Security</a></li></ul></div>
+<script type="text/javascript"
src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script><h3
id="Navigation-Community"><a shape="rect"
href="community.html">Community</a></h3><ul class="alternate"><li><a
shape="rect" href="support.html">Support</a></li><li><a shape="rect"
href="contributing.html">Contributing</a></li><li><a shape="rect"
href="discussion-forums.html">Discussion Forums</a></li><li><a shape="rect"
href="mailing-lists.html">Mailing Lists</a></li><li><a shape="rect"
href="user-stories.html">User Stories</a></li><li><a shape="rect"
href="news.html">News</a></li><li><a shape="rect"
href="articles.html">Articles</a></li><li><a shape="rect"
href="site.html">Site</a></li><li><a shape="rect"
href="team.html">Team</a></li><li><a shape="rect" class="external-link"
href="http://camel-extra.googlecode.com/" rel="nofollow">Camel
Extra</a></li></ul><h3 id="Navigation-Developers"><a shape="rect"
href="developers.html">Developers</a></h3><ul class="alternate"
><li><a shape="rect" href="developers.html">Developer Guide</a></li><li><a
>shape="rect" href="source.html">Source</a></li><li><a shape="rect"
>href="building.html">Building</a></li><li><a shape="rect"
>href="javadoc.html">JavaDoc</a></li><li><a shape="rect"
>href="irc-room.html">IRC Room</a></li></ul><h3
>id="Navigation-ApacheSoftwareFoundation">Apache Software Foundation</h3><ul
>class="alternate"><li><a shape="rect" class="external-link"
>href="http://www.apache.org/licenses/">License</a></li><li><a shape="rect"
>class="external-link"
>href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li><li><a
> shape="rect" class="external-link"
>href="http://www.apache.org/foundation/thanks.html">Thanks</a></li><li><a
>shape="rect" class="external-link"
>href="http://www.apache.org/security/">Security</a></li></ul></div>
<!-- NavigationBar -->
</div>
</div>