influxdb

package
v0.0.0-...-527a540 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2017 License: MIT Imports: 2 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Metrics

func Metrics(measurement string) expvar.Func

Metrics returns a expvar.Func which implements Var by calling the function and formatting the returned value using JSON. Use this function when you need control of the measurement name for a data point.

package main

import (
   "expvar"
   "github.com/tevjef/go-runtime-metrics/influxdb"
)

func main {
    expvar.Publish(os.Args[0], influxdb.Metrics("my-measurement-name"))
}

Types

type Point

type Point struct {
	Name   string            `json:"name"`
	Tags   map[string]string `json:"tags"`
	Values collector.Fields  `json:"values"`
}

A structure compatible with Telegraf's InfluxDB input plugin format https://github.com/influxdata/telegraf/tree/master/plugins/inputs/influxdb

Jump to

Keyboard shortcuts

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