Author: buildbot Date: Fri Dec 20 01:19:52 2013 New Revision: 891122 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 Fri Dec 20 01:19:52 2013 @@ -86,87 +86,41 @@ <tbody> <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"> -<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[ - <dependency> +<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"> +<script class="theme: Default; brush: xml; gutter: false" type="syntaxhighlighter"><![CDATA[ <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-splunk</artifactId> <version>${camel-version}</version> </dependency> ]]></script> -</div></div> - -<h3 id="Splunk-URIformat">URI format </h3> -<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - splunk://[endpoint]?[options] +</div></div><h3 id="Splunk-URIformat">URI format</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ splunk://[endpoint]?[options] ]]></script> -</div></div> - -<h3 id="Splunk-ProducerEndpoints:">Producer Endpoints: </h3> -<div class="confluenceTableSmall"> +</div></div><h3 id="Splunk-ProducerEndpoints:">Producer Endpoints:</h3><div class="confluenceTableSmall"> <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> - -<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"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - from("direct:start").convertBodyTo(SplunkEvent.class) +</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"> +<script class="theme: Default; brush: java; gutter: false" 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></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"> <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> - -<p><strong>Example</strong></p> -<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - from("splunk://normal?delay=5s&username=user&password=123&initEarliestTime=-10s&search=search index=myindex sourcetype=someSourcetype") +</div><p><strong>Example</strong></p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" 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></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"> <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" ro wspan="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></tbody></table> -</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"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - from("twitter://search?type=polling&keywords=music&delay=10&consumerKey=abc&consumerSecret=def&accessToken=hij&accessTokenSecret=xxx") +</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"> +<script class="theme: Default; brush: java; gutter: false" 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"); ]]></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"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ -@Converter +</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"> +<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[@Converter public class Tweet2SplunkEvent { @Converter public static SplunkEvent convertTweet(Status status) { @@ -191,24 +145,11 @@ public class Tweet2SplunkEvent { } } ]]></script> -</div></div> - -<p>Search Splunk for tweets</p> -<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> -<script class="theme: Default; brush: java; gutter: false" type="syntaxhighlighter"><![CDATA[ - from("splunk://normal?username=foo&password=bar&initEarliestTime=-2m&search=search index=camel-tweets sourcetype=twitter") +</div></div><p>Search Splunk for tweets</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +<script class="theme: Default; brush: java; gutter: false" 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> - - -<h3 id="Splunk-SeeAlso">See Also</h3> +</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> <td valign="top">