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 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址