Service Metrics v1.5.5

Integrating a Service with Service Metrics

What is Required of Service Authors?

The service author provides a metrics collection executable, packaged as a BOSH release. The metrics collection executable collects relevant metrics from a service, and the Service-metrics job collects and forwards them to the Metron agent.

Service authors must design the executable for frequent calls. The metrics job calls the executable every minute by default, but the operator can change the interval.

The executable can accept command line arguments to produce metrics. There is no pre-defined interface for the arguments, and service authors must decide upon the design for their service. The format of the arguments should be documented for the service author so that they can configure their deployment manifest.

Create a Service Metrics Release

The executable you write must be callable from the command line and optionally accept arguments. See the following example:

./bin/generate-metrics --all --config /var/vcap/jobs/some-service/conf.yml


The return type must be a JSON array. Every element in this array is a metric, and each metric sample must provide the following keys: key, value, unit.

    "key": "average_delay",
    "value": 0.02,
    "unit": "ms"

Pivotal recommends that you follow the Metrics 2.0 spec for unit names, and use SI units and prefixes where appropriate.

Create a pull request or raise an issue on the source for this page in GitHub