go-rrd is a Go client for talking to rrdtool's rrdcached.
- Full rrdcached Support.
go get -u github.com/multiplay/go-rrd
Using go-rrd is simple just create a client and then send commands e.g.
package main
import (
"log"
"time"
"github.com/multiplay/go-rrd"
)
func main() {
c, err := rrd.NewClient("192.168.1.102:10011")
if err != nil {
log.Fatal(err)
}
defer c.Close()
if err := c.Create(
"test.rrd",
[]DS{NewGauge("watts", time.Minute*5, 0, 24000)},
[]RRA{NewAverage(0.5, 1, 864000)},
); err != nil {
log.Fatal(err)
}
}
go-rrd is available under the BSD 2-Clause License.