Repository: camel Updated Branches: refs/heads/master 6436bc714 -> a4a630e06
Added camel-ganglia docs to gitbook Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a4a630e0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a4a630e0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a4a630e0 Branch: refs/heads/master Commit: a4a630e069f3da4d8b07445c245400140985b181 Parents: 6436bc7 Author: Andrea Cosentino <anco...@gmail.com> Authored: Fri Mar 25 11:33:17 2016 +0100 Committer: Andrea Cosentino <anco...@gmail.com> Committed: Fri Mar 25 11:33:17 2016 +0100 ---------------------------------------------------------------------- .../camel-ganglia/src/main/docs/ganglia.adoc | 144 +++++++++++++++++++ docs/user-manual/en/SUMMARY.md | 1 + 2 files changed, 145 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/a4a630e0/components/camel-ganglia/src/main/docs/ganglia.adoc ---------------------------------------------------------------------- diff --git a/components/camel-ganglia/src/main/docs/ganglia.adoc b/components/camel-ganglia/src/main/docs/ganglia.adoc new file mode 100644 index 0000000..f0ffc50 --- /dev/null +++ b/components/camel-ganglia/src/main/docs/ganglia.adoc @@ -0,0 +1,144 @@ +[[Ganglia-Gangliacomponent]] +Ganglia component +~~~~~~~~~~~~~~~~~ + +[[Ganglia-AvailableasofCamel2.15.0]] +Available as of Camel 2.15.0 +++++++++++++++++++++++++++++ + +Provides a mechanism to send a value (the message body) as a metric to +the http://ganglia.info[Ganglia] monitoring system. Uses the gmetric4j +library. Can be used in conjunction with standard +http://ganglia.info[Ganglia] and +https://github.com/ganglia/jmxetric[JMXetric] for monitoring metrics +from the OS, JVM and business processes through a single platform. + +You should have a Ganglia gmond agent running on the machine where your +JVM runs. The gmond sends a heartbeat to the Ganglia infrastructure, +camel-ganglia can't send the heartbeat itself currently. + +On most Linux systems (Debian, Ubuntu, Fedora and RHEL/CentOS with EPEL) +you can just install the Ganglia agent package and it runs automatically +using multicast configuration. You can configure it to use regular UDP +unicast if you prefer. + +Maven users will need to add the following dependency to their `pom.xml` +for this component: + + + +[source,xml] +------------------------------------------------------------ +<dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-ganglia</artifactId> + <version>x.x.x</version> + <!-- use the same version as your Camel core version --> +</dependency> +------------------------------------------------------------ + +[[Ganglia-URIformat]] +URI format +~~~~~~~~~~ + +[source,java] +------------------------------ +ganglia:address:port[?options] +------------------------------ + +You can append query options to the URI in the following format, +`?option=value&option=value&...` + +[[Ganglia-GangliacomponentandendpointURIoptions]] +Ganglia component and endpoint URI options +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +// component options: START +The Ganglia component supports 1 options which are listed below. + +[width="100%",cols="2s,1m,8",options="header"] +|======================================================================= +| Name | Java Type | Description +| configuration | GangliaConfiguration | To use the shared configuration +|======================================================================= +// component options: END + +// endpoint options: START +The Ganglia component supports 16 endpoint options which are listed below: + +[width="100%",cols="2s,1,1m,1m,5",options="header"] +|======================================================================= +| Name | Group | Default | Java Type | Description +| host | producer | 239.2.11.71 | String | Host name for Ganglia server +| port | producer | 8649 | int | Port for Ganglia server +| dmax | producer | 0 | int | Minumum time in seconds before Ganglia will purge the metric value if it expires. Set to 0 and the value will remain in Ganglia indefinitely until a gmond agent restart. +| groupName | producer | java | String | The group that the metric belongs to. +| metricName | producer | metric | String | The name to use for the metric. +| mode | producer | MULTICAST | UDPAddressingMode | Send the UDP metric packets using MULTICAST or UNICAST +| prefix | producer | | String | Prefix the metric name with this string and an underscore. +| slope | producer | BOTH | GMetricSlope | The slope +| spoofHostname | producer | | String | Spoofing information IP:hostname +| tmax | producer | 60 | int | Maximum time in seconds that the value can be considered current. After this Ganglia considers the value to have expired. +| ttl | producer | 5 | int | If using multicast set the TTL of the packets +| type | producer | STRING | GMetricType | The type of value +| units | producer | | String | Any unit of measurement that qualifies the metric e.g. widgets litres bytes. Do not include a prefix such as k (kilo) or m (milli) other tools may scale the units later. The value should be unscaled. +| wireFormat31x | producer | true | boolean | Use the wire format of Ganglia 3.1.0 and later versions. Set this to false to use Ganglia 3.0.x or earlier. +| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange +| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). +|======================================================================= +// endpoint options: END + + +[[Ganglia-Messagebody]] +Message body +~~~~~~~~~~~~ + +Any value (such as a string or numeric type) in the body is sent to the +Ganglia system. + +[[Ganglia-ReturnvalueAndResponse]] +Return value / response +~~~~~~~~~~~~~~~~~~~~~~~ + +Ganglia sends metrics using unidirectional UDP or multicast. There is +no response or change to the message body. + +[[Ganglia-Examples]] +Examples +~~~~~~~~ + +[[Ganglia-SendingaStringmetric]] +Sending a String metric +^^^^^^^^^^^^^^^^^^^^^^^ + +The message body will be converted to a String and sent as a metric +value. Unlike numeric metrics, String values can't be charted but +Ganglia makes them available for reporting. The os_version string at +the top of every Ganglia host page is an example of a String metric. + +[source,java] +------------------------------------------------------------------------ +from("direct:string.for.ganglia") + .setHeader(GangliaConstants.METRIC_NAME, simple("my_string_metric")) + .setHeader(GangliaConstants.METRIC_TYPE, GMetricType.STRING) + .to("direct:ganglia.tx"); + +from("direct:ganglia.tx") + .to("ganglia:239.2.11.71:8649?mode=MULTICAST&prefix=test"); +------------------------------------------------------------------------ + +[[Ganglia-Sendinganumericmetric]] +Sending a numeric metric +^^^^^^^^^^^^^^^^^^^^^^^^ + +[source,java] +------------------------------------------------------------------------ +from("direct:value.for.ganglia") + .setHeader(GangliaConstants.METRIC_NAME, simple("widgets_in_stock")) + .setHeader(GangliaConstants.METRIC_TYPE, GMetricType.UINT32) + .setHeader(GangliaConstants.METRIC_UNITS, simple("widgets")) + .to("direct:ganglia.tx"); + +from("direct:ganglia.tx") + .to("ganglia:239.2.11.71:8649?mode=MULTICAST&prefix=test"); +------------------------------------------------------------------------ http://git-wip-us.apache.org/repos/asf/camel/blob/a4a630e0/docs/user-manual/en/SUMMARY.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md index af78053..82754a4 100644 --- a/docs/user-manual/en/SUMMARY.md +++ b/docs/user-manual/en/SUMMARY.md @@ -133,6 +133,7 @@ * [Freemarker](freemarker.adoc) * [FTP](ftp.adoc) * [GAE](gae.adoc) + * [Ganglia](ganglia.adoc) * [Ironmq](ironmq.adoc) * [JMS](jms.adoc) * [JMX](jmx.adoc)