All Replicated installations come with a StatsD/Graphite/Carbon container that can be used by the application to report data to StatsD. Application YAML can also include optional custom monitors that will be used to display additional charts in Replicated dashboard. Applications can also query Graphite directly.

Defining Metrics

Add custom_metrics as a root element to the application YAML. The following elements are supported:

target - This is the full key name for your metric. It should use the Graphite naming conventions. The format is restricted to regex rules supported by Carbon.

retention - The retention period defined using the new Carbon format: frequency:history

aggregation_method - One of the aggregation methods supported by Carbon: average, sum, min, max, and last.

xfiles_factor - This is a value between 0 and 1 that defines what percentage of samples must be present in order for aggregate to a non-null value.

Detailed information about retention, aggregation_method, and xfiles_factor can be found in Carbon documentation.

Ports

By default, Replicated will expose the ports for Graphite (2443), StatsD (8125) and the Carbon plaintext (2003) and pickle (2004) protocols. The address of these services can be accessed via the cluster.local address on their standard ports or discovered through use of the template functions StatsdAddress, CarbonPlaintextAddress and CarbonPickleAddress.

Custom CSS

Custom CSS can be used to define background colors for each metric’s tile and chart background. CSS class name must match the name specified in the css_class_name tag.

Integration API

StatsD host can be discovered via Replicated Console Settings. The following Go function will return the current endpoint. Note that this value can change, and applications should periodically query Integration API to obtain the current endpoint.

Installed Configuration

The Graphite/StatsD/Carbon container managed by Replicated has some baked in configurations. These defaults will apply to all data that matches the specified patterns. If application sends data to this container and the application has no matching custom_metrics, these defaults will be applied permanently.