---
name: log-cache-expvar-forwarder

templates:
  ctl: bin/ctl
  environment.sh.erb: bin/environment.sh
  ca.crt.erb: config/certs/ca.crt
  log_cache.crt.erb: config/certs/log_cache.crt
  log_cache.key.erb: config/certs/log_cache.key

packages:
- log-cache-expvar-forwarder

provides:
- name: log-cache-expvar-forwarder
  type: log-cache-expvar-forwarder

consumes:
- name: log-cache
  type: log-cache

properties:
  log_metrics:
    description: Write each metric from the endpoints to Log Cache and stdout.
    default: true
  counters:
    description: |
        A array of Objects that have the following fields:
        - addr: address of the expvar endpoint
        - name: The output name of the Counter
        - source_id: The output sourceID of the Counter
        - template: The golang text/template to find the metric in the expvar
          output.
        - tags: An object that can only have string values. They will be
          passed as tags on the envelope.
    default: ~
  gauges:
    description: |
        A array of Objects that have the following fields:
        - addr: address of the expvar endpoint
        - name: The output name of the Counter
        - unit: The output unit of the Counter
        - source_id: The output sourceID of the Counter
        - template: The golang text/template to find the metric in the expvar
          output.
        - tags: An object that can only have string values. They will be
          passed as tags on the envelope.
    default: ~
