Need help with go-collectd?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

112 Stars 31 Forks ISC License 343 Commits 7 Opened issues


Utilities for using collectd together with Golang.

Services available


Need anything else?

Contributors list


Utilities for using collectd together with Go.


package main

import ( "context" "time"



func main() { vl := api.ValueList{ Identifier: api.Identifier{ Host: exec.Hostname(), Plugin: "golang", Type: "gauge", }, Time: time.Now(), Interval: exec.Interval(), Values: []api.Value{api.Gauge(42)}, } exec.Putval.Write(context.Background(), &vl) }


This is a very simple package and very much a Work in Progress, so expect things to move around and be renamed a lot.

The repository is organized as follows:

  • Package
    declares data structures you may already know from the collectd source code itself, such as
  • Package
    declares some utilities for writing binaries to be executed with the exec plugin. It provides some utilities (getting the hostname, e.g.) and an executor which you may use to easily schedule function calls.
  • Package
    declares functions for formatting ValueLists in other format. Right now, only
    is implemented. Eventually I plan to add parsers for some formats, such as the JSON export.
  • Package
    implements collectd's binary network protocol. It offers client and server implementations, see
    for more details.


To use this package in your own programs, simply use

go get
to fetch the packages you need, for example:
go get


Florian "octo" Forster <ff at>

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.