gmon

package
v0.0.0-...-1a92b66 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2015 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package gmon provides read access to the gmon data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Name      string `xml:"NAME,attr"`
	Owner     string `xml:"OWNER,attr"`
	LatLong   string `xml:"LATLONG,attr"`
	URL       string `xml:"URL,attr"`
	Localtime int    `xml:"LOCALTIME,attr"`
	Hosts     []Host `xml:"HOST"`
}

Cluster as returned by gmon.

type ExtraData

type ExtraData struct {
	ExtraElements []ExtraElement `xml:"EXTRA_ELEMENT"`
}

ExtraData is the set extras on a metric.

type ExtraElement

type ExtraElement struct {
	Name string `xml:"NAME,attr"`
	Val  string `xml:"VAL,attr"`
}

ExtraElement is one extra on a metric.

type Ganglia

type Ganglia struct {
	XMLNAME  xml.Name  `xml:"GANGLIA_XML"`
	Clusters []Cluster `xml:"CLUSTER"`
}

Ganglia is the root document returned by gmon.

func Read

func Read(r io.Reader) (*Ganglia, error)

Read the gmond XML output.

func RemoteRead

func RemoteRead(network, addr string) (*Ganglia, error)

RemoteRead will connect to the given network/address and read from it.

type Host

type Host struct {
	Name         string   `xml:"NAME,attr"`
	IP           string   `xml:"IP,attr"`
	Tags         string   `xml:"TAGS,attr"`
	Reported     int      `xml:"REPORTED,attr"`
	Tn           int      `xml:"TN,attr"`
	Tmax         int      `xml:"TMAX,attr"`
	Dmax         int      `xml:"DMAX,attr"`
	Location     string   `xml:"LOCATION,attr"`
	GmondStarted int      `xml:"GMOND_STARTED,attr"`
	Metrics      []Metric `xml:"METRIC"`
}

Host as returned by gmon.

type Metric

type Metric struct {
	Name      string    `xml:"NAME,attr"`
	Value     string    `xml:"VAL,attr"`
	Unit      string    `xml:"UNITS,attr"`
	Slope     string    `xml:"SLOPE,attr"`
	Tn        int       `xml:"TN,attr"`
	Tmax      int       `xml:"TMAX,attr"`
	Dmax      int       `xml:"DMAX,attr"`
	ExtraData ExtraData `xml:"EXTRA_DATA"`
}

Metric as returned by gmond.

Jump to

Keyboard shortcuts

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