statsd-exporter-convert

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 23, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

README

statsd-exporter-convert

statsd-exporter-convert assists with converting from the legacy text based statsd_exporter configuration to the YAML based one.

Usage

Clone this repository and build it using Go 1.9+. Binary releases are also available.

Run it with a single file as the only argument:

statsd-exporter-convert <path/to/my/mappings>

It will print the YAML to STDOUT.

Note: only minor validation is done on the input.

Example

If we converted the included mapping file which contains:

test.dispatcher.*.*.*
name="dispatcher_events_total"
processor="$1"
action="$2"
outcome="$3"
job="test_dispatcher"

*.signup.*.*
name="signup_events_total"
provider="$2"
outcome="$3"
job="${1}_server"

We would get

mappings:
- match: test.dispatcher.*.*.*
  name: dispatcher_events_total
  labels:
    action: $2
    job: test_dispatcher
    outcome: $3
    processor: $1
- match: '*.signup.*.*'
  name: signup_events_total
  labels:
    job: ${1}_server
    outcome: $3
    provider: $2

LICENSE

see LICENSE

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL