Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 571 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 571 Bytes

gollectd

This is yet another implementation of a collectd binary protocol parser in Go, heavenly inspired by gocollectd.

Installation

go get github.com/kimor79/gollectd

Usage

import (
    collectd github.com/kimor79/gollectd
)

types, err := collectd.TypesDBFile("/path/to/types.db")

buffer := make([]byte, 1452)
n, _, err := socket.ReadFromUDP(buffer)
packets, err := collectd.Packets(buffer[:n], types)