A collectd plugin that collects metrics from Mcrouter stats file. It runs under collectd Python plugin.
McRouter automatically creates and updates several files useful to monitor it's state, which is by default created under /var/mcrouter/stats
.
More information on stats list here.
Software | version |
---|---|
Collectd | 4.9 or later (for the python plugin) |
Python | 2.6 or later |
- Copy mcrouter_stats.py somewhere accessible by collectd, e.g
/usr/share/collectd/collectd-mcrouter
. - Create a collectd configuration file (e.g
mcrouter_stats.conf
) for the plugin preferably in/etc/collectd/managed_config/
(see the example below). - Restart collectd.
<LoadPlugin python>
Globals true
</LoadPlugin>
<Plugin python>
# mcrouter_stats.py is at "/usr/share/collectd/collectd-mcrouter/mcrouter_stats.py"
ModulePath "/usr/share/collectd/collectd-mcrouter"
Interactive false
Import "mcrouter_stats"
<Module "mcrouter_stats">
Port <mcrouter_port_number>
# McRouter exposes metrics in "/var/mcrouter/stats"
DataDir "/path/to/mcrouter/stats/file"
</Module>
</Plugin>