pivotal-cf / metric-registrar-cli

Allow users to register metric sources for CF
Apache License 2.0
7 stars 3 forks source link

Metric Registrar CLI

Plugin for the CF CLI that allows users to register metric sources for collection.

Installing Plugin

cf install-plugin -r CF-Community "metric-registrar"

Usage

There are two types of registries

Metrics Endpoint

Registering a metrics endpoint will allow for Prometheus Exposition metrics from the given path to be parsed and emitted to Loggregator.

cf register-metrics-endpoint --help
NAME:
   register-metrics-endpoint - Register a metrics endpoint which will be scraped at the interval defined at deploy

USAGE:
   cf register-metrics-endpoint APP_NAME PATH [--internal-port PORT] [--insecure INSECURE]

OPTIONS:
   --insecure           Use legacy insecure HTTP endpoint
   --internal-port      Port for secure metrics endpoint scraping

Structured Log Format

Registering a structured log format will allow for structured logs of that format to be parsed into metrics and events and emitted to Loggregator.

cf register-log-format --help
NAME:
   register-log-format - Register bound applications so that structured logs of the given format can be parsed

USAGE:
   cf register-log-format APPNAME <json|DogStatsD>

Supported Log Structures

JSON

dogstatsd