metlia

package module
v0.0.0-...-d0f5d1d Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

README

CLA assistant

WebsiteSlackForumTwitter

Metlia

This is a reporter for the go-metrics library which will post the metrics to ganglia.

Note

ganglia library is used to send metrics to ganglia.

Get this package using

$ go get github.com/appscode/metlia

Usage

import (
	"net"
	"time"

	"github.com/appscode/metlia"
	"github.com/rcrowley/go-metrics"
)

reg := metrics.NewRegistry()
addr, err := net.ResolveUDPAddr("udp4", "127.0.0.1:8649")

go metlia.Ganglia(reg, 30 * time.Second, addr)

License

metlia is licensed under the Apache 2.0 license. See the LICENSE file for details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ganglia

func Ganglia(r metrics.Registry, d time.Duration, addr *net.UDPAddr)

Types

type Reporter

type Reporter struct {
	// Address of Ganglia gmond process
	Addr *net.UDPAddr

	// Registry holds the matrices. That were needed to be
	// reported to Ganglia.
	Registry metrics.Registry

	// Time inerval between two consicutive Ganglia call to
	// store the matrix value to the DB. If not set Default Will
	// be 10secs.
	FlushInterval time.Duration
	// contains filtered or unexported fields
}

func (*Reporter) Send

func (r *Reporter) Send() error

Jump to

Keyboard shortcuts

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