Rcollectd
Rcollectd is a simple and minimal system statistics collector written in Ruby. System statistics collected by Rcollectd is shipped to StatsD.
!NOTE! Rcollectd is not complete or ready to use yet. It is pushed out to GitHub early in an hope to get more ideas and feedback.
Installation
Installing with RubyGems
The Rcollectd Gem is (will be) available at rubygems.org, and you can install it with:
$ gem install rcollectd
Installing from source
If you want to build the Gem from source yourself:
$ git clone git://github.com/pkhamre/rcollectd.git
$ cd rcollectd
$ bundle
$ rake install
Usage
Rcollectd command line options
$ rcollectd --help
Usage: rcollectd [options]
-h, --help display this message
-V, --version display version
-c, --config FILE load configuration options from FILE
-l, --logfile FILE log to a given FILE
-v, --verbose enable verbose logging
-d, --daemonize daemonize - fork into the background
-p, --pidfile FILE write the pid to given FILE
-P, --plugin-dir DIRECTORY Load plugins from this directory
-s, --statsd-host STATSD-HOST specify statsd host
Running as a daemon
$ rcollectd -l /var/log/rcollectd.log -d -p /var/run/rcollectd.pid -P /etc/rcollectd/plugins/ -s statsd.example.org
Running in the foreground
$ rcollectd -v -P /etc/rcollectd/plugins/ -s statsd.example.org
Plugin API
Plugins must be an executable that returns the following output:
<identifier> <value> <timestamp>
Plugins can be written in any language.
To do
- Add support for other metric types, not only gauges
- Add support for YAML configuration file
- Add support for custom metric prefix
- Set default statsd-host
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Added some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request