prom2all

package module
v0.0.0-...-540fcfe Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: Apache-2.0 Imports: 9 Imported by: 1

README

prom2all

Reuses the prom2json library to transform the result in multiple formats

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LabelToString

func LabelToString(inp map[string]string) (lab []string, err error)

LabelToString consumes a k/v map and returns a sanitized []string{} with key=val pairs. In case the map is empty or all k/v pairs fail the sanitization test, an error is return.

func SanitizeTags

func SanitizeTags(k, v string) (tag string, err error)

SanitizeTags checks whether the tag is compliant with the rules defined in http://opentsdb.net/docs/build/html/user_guide/writing.html#metrics-and-tags. For starters only `^[a-zA-Z0-9\-\./]+$` is allowed. TODO: Add Unicode letters

func ToOpenTSDBv1

func ToOpenTSDBv1(f *prom2json.Family) []string

ToOpenTSDBv1 transforms the metrics(not yet Histograms/Summaries) to OpenTSDB line format (v1), returns an array of lines.

Types

This section is empty.

Jump to

Keyboard shortcuts

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