librato/collectd-librato — pull request #7 by criccomini (2012-07-01 20:07:11+00:00)
Title: Add Regex to keep only matching metric_names

Adding a Regex field to keep only metrics that match one of the regexs. It's using CSV split, but that should be fine, since you don't usually have commas in your metrics names.

Here's an example of its use:

Globals true

# collectd-librato.py is at /opt/collectd-librato-0.0.6/lib/collectd-librato.py
ModulePath "/opt/collectd-librato-0.0.6/lib"

Import "collectd-librato"

APIToken GTB_LIBRATO_SECRET
Email "foo@bar.com"
FlushIntervalSecs 120
Regex "collectd.cpu.*,collectd.df.df.dev.free,collectd.df.df.root.free,collectd.interface.if_packets.eth0.*,collectd.memcached.*,collectd.nginx.*,collectd.users.users,collectd.kestrel.bytes.queue_game-tweets.*,collectd.kestrel.*queue_.*_items$,collectd.kestrel.*queue_.*_total$,collectd.kestrel.*queue_.*_total_$,collectd.kestrel.*queue_.*_expir$,collectd.kestrel.*queue_.*_expire$,collectd.kestrel.*queue_.*_discar$,collectd.kestrel.*queue_.*_childr$"