Documentation
¶
Overview ¶
Parse data from the collectd network plugin This is modeled after collectd's own network.c
Index ¶
Constants ¶
View Source
const ( TypeCounter = 0 TypeGauge = 1 TypeDerive = 2 TypeAbsolute = 3 )
View Source
const ( ParseHost = 0x0000 ParseTime = 0x0001 ParsePlugin = 0x0002 ParsePluginInstance = 0x0003 ParseType = 0x0004 ParseTypeInstance = 0x0005 ParseValues = 0x0006 ParseInterval = 0x0007 ParseTimeHR = 0x0008 ParseIntervalHR = 0x0009 // Notifications ParseMessage = 0x0100 ParseSeverity = 0x0101 ParseSignature = 0x0200 ParseEncryption = 0x0210 )
Variables ¶
View Source
var ErrorInvalid = errors.New("Invalid packet")
View Source
var ErrorUnknownDataType = errors.New("Unknown data source type")
View Source
var ErrorUnknownType = errors.New("Unknown value type")
View Source
var ErrorUnsupported = errors.New("Unsupported packet")
View Source
var ValueTypeNames = map[string]uint8{ "absolute": TypeAbsolute, "counter": TypeCounter, "derive": TypeDerive, "gauge": TypeGauge, }
View Source
var ValueTypeValues = map[uint8]string{ TypeAbsolute: "absolute", TypeCounter: "counter", TypeDerive: "derive", TypeGauge: "gauge", }
Functions ¶
Types ¶
type Packet ¶
type Packet struct { Hostname string Interval uint64 IntervalHR uint64 Plugin string PluginInstance string Time uint64 TimeHR uint64 Type string TypeInstance string Values []Value }
func (Packet) FormatName ¶
type Types ¶
func TypesDBFile ¶
Click to show internal directories.
Click to hide internal directories.