apiVersion: v1
data:
  prometheus-statsd.conf: |-
    # Note: DO NOT REMOVE THIS FILE FROM THE CHART
    # prometheus-statsd-exporter won't work without it.
    # Instead keep it fully commented if you have no valid mappings
    #
    # This file should contain the prometheus-statsd-exporter configuration
    # For reference on how to write it, see
    # https://github.com/prometheus/statsd_exporter/blob/master/README.md
    #
    # You can map your statsd metrics to prometheus ones, by mapping the hierarchical
    #  names you get for statsd into prometheus labels; so say you have a metric
    # called serviceA.dcA.serverA.endpoints.foobar.time   and you want to transform
    # it to a metrics called "mean_response_time" with labels
    #  {service: serviceA, datacenter: dcA, host: serverA, endpoint: foobar} you
    # need to create a mapping as follows:
    #
    #  mappings:
    #    - match: serviceA.*.*.endpoints.*.mean_response_time
    #      name: "mean_response_time"
    #      labels:
    #        service: $1
    #        datacenter: $2
    #        host: $3
    #        endpoint: $4
    #
    # If the app is a service-runner based one, consider uncommenting the following
    # Note: statsd timer metrics are millisecond based, but prometheus-statsd-exporter makes them
    # second based to conform to prometheus, so all metrics are divided by 1000
    #mappings:
    #  - match: '*.gc.*'
    #    name: service_runner_gc_seconds
    #    timer_type: histogram
    #    buckets: [5e-4, 1e-3, 5e-3, 10e-3, 15e-3, 30e-3, 50e-3]
    #    labels:
    #      service: $1
    #      event: $2
    #
    #  - match: '*.heap.*'
    #    # service-runner abuses timer for heap data
    #    name: service_runner_${2}_heap_kilobytes
    #    timer_type: histogram
    #    buckets: [1e+3, 1e+4, 1e+5, 1e+6, 1e+7]
    #    labels:
    #      service: $1
    #
    # This will match standard service-runner request metrics of the form:
    #    <service_name>.<endpoint>.<method>.<http_status>, e.g.:
    #    mathoid.-info.GET.200
    #
    #  - match: '^([a-z0-9-]+)\.([^.]+)\.(GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH)\.([0-9][0-9][0-9]|ALL|[0-9]xx)$'
    #    match_type: regex
    #    name: service_runner_request_duration_seconds
    #    timer_type: histogram
    #    buckets:  [0.01, 0.05, 0.1, 0.3, 1]
    #    labels:
    #      service: $1
    #      uri: $2
    #      method: $3
    #      status: $4
kind: ConfigMap
metadata:
  labels:
    app: shellbox
    chart: shellbox-1.0.1
    heritage: Helm
    release: RELEASE-NAME
  name: shellbox-RELEASE-NAME-metrics-config
