Skip to content


Repository files navigation

metricsd Build Status

a metrics collecting agent for linux written in go


I was looking for a simple replacement for diamond. It's codebase is a bit weird to navigate, and it has built up lots of cruft over the years.

I also wanted to learn a bit of golang, and this seemed like a perfect excuse to write my own metrics collector.


  • written in golang, so it is shippable as a single binary
  • simple configuration via an ini file
  • assumes linux as operating system
  • supports metrics 2.0 standard
  • easy generation of new collectors


You can setup metricsd via the following short script:

make dependencies
go get
go build

Then you can execute the script using an ini-file of your choice:

./metricsd --config="path/to/config.ini"


Most configuration is handled via an ini file. You can specify the ini file file via the --config flag when calling metricsd:

metricsd --config="path/to/config.ini"

By default, the ini file is set to the path /etc/metricsd/metricsd.ini.

You can also specify a debug level for metricsd via the --loglevel flag as follows:

metricsd --loglevel=debug
metricsd --loglevel=info
metricsd --loglevel=warning
metricsd --loglevel=error
metricsd --loglevel=fatal
metricsd --loglevel=panic

The default loglevel is warning.

metricsd configuration

metricsd has a few configuration fields that can be set via the ini file:

interval = 30
loop = false
  • interval: Default 30. Time in seconds to query for metrics.
  • loop: Default false. If set to true, then metricsd will continue running, collecting metrics at the configured interval.

collectors and shippers

Collectors and Shippers are configured in an ini file. You must specify enabled = true under the stanza for that collector/shipper in order to enable it. Other configuration for the respective collector/shipper can also be place in those sections.

Below is a sample config.ini that enables every collector and shipper:

debug = true
enabled = true
url = tcp://
prefix = servers

enabled = true
index = metricsd-data
type = metricsd
url =

enabled = true
url = redis://
list = metricsd

enabled = true

enabled = true

enabled = true

enabled = true

enabled = true

enabled = true

enabled = true

enabled = true

enabled = true


golang metrics collecting agent for linux







No releases published


No packages published