GeoMesa Metrics¶
GeoMesa provides integration with the DropWizard Metrics library for real-time
reporting with the geomesa-metrics
module.
Reporters are available for SLF4J, CloudWatch, Graphite, and Ganglia.
Configuration¶
Reporters are configured via TypeSafe Config. All reporters share a few common properties:
Configuration Property |
Description |
---|---|
|
The Java TimeUnit used to report rates, e.g |
|
The Java TimeUnit used to report durations, e.g. |
|
A fallback to use if |
|
How often the reporter should run, e.g. |
Logging Reporter¶
GeoMesa includes a logging reporter using SLF4J.
Configuration Property |
Description |
---|---|
|
Must be |
|
The name of the logger to use, e.g. |
|
The level to write out log messages at, e.g. |
Example configuration:
{
type = "slf4j"
units = "milliseconds"
interval = "60 seconds"
logger = "org.locationtech.geomesa.metrics"
level = "debug"
}
CloudWatch Reporter¶
The CloudWatch reporter can be included by adding a dependency on
org.locationtech.geomesa:geomesa-metrics-cloudwatch
. The CloudWatch reporter uses the default credentials
and region specified in your AWS profile config.
Configuration Property |
Description |
---|---|
|
Must be |
|
The CloudWatch namespace to use |
|
Boolean - report the raw value of count metrics instead of reporting only the count difference since the last report |
|
Boolean - POSTs to CloudWatch all values. Otherwise, the reporter does not POST values which are zero in order to save costs |
Example configuration:
{
type = "cloudwatch"
units = "milliseconds"
interval = "60 seconds"
namespace = "mynamespace"
raw-counts = false
zero-values = false
}
Ganglia Reporter¶
The Ganglia reporter can be included by adding a dependency on
org.locationtech.geomesa:geomesa-metrics-ganglia
. Using Ganglia requires additional GPL-licensed
dependencies info.ganglia.gmetric4j:gmetric4j:1.0.7
and org.acplt:oncrpc:1.0.7
, which are excluded by default.
Configuration Property |
Description |
---|---|
|
Must be |
|
The host/group to send events to |
|
Integer - The port to send events to |
|
One of |
|
Integer - the time-to-live for Ganglia messages |
|
Boolean - defines the Ganglia protocol version, either v3.1 or v3.0 |
Example configuration:
{
type = "ganglia"
group = "example"
port = 8649
addressing-mode = "multicast"
ttl = 32
ganglia311 = true
rate-units = "seconds"
duration-units = "milliseconds"
interval = "10 seconds"
}
Graphite Reporter¶
The Graphite reporter can be included by adding a dependency on
org.locationtech.geomesa:geomesa-metrics-graphite
.
Configuration Property |
Description |
---|---|
|
Must be |
|
The connection string to the Graphite instance |
|
Prefix prepended to all metric names |
|
Boolean to enable or disable SSL connections |
Example configuration:
{
type = "graphite"
url = "localhost:9000"
ssl = false
prefix = "example"
rate-units = "seconds"
duration-units = "milliseconds"
interval = "10 seconds"
}
If SSL is enabled, standard Java system properties can be used to control key stores and trust stores, i.e.
javax.net.ssl.keyStore
, etc.
Extensions¶
Additional reporters can be added at runtime by implementing
org.locationtech.geomesa.metrics.core.ReporterFactory
and registering the new class as a
service provider.