Knowledge Base: Sensor
The Dash Sensor daemon will generate metrics for programs or infrastructure which have an externally-accessible means to gather statistics or runtime data. Sensor currently supports memcached, apache, nginx and starling out of the box.
Installation
Just install the RubyGem:
$ sudo gem install fiveruns-dash-sensor -s http://gems.github.com
To start Sensor, just run:
$ fiveruns-dash-sensor -c /path/to/config.rb
The Dash web interface should give you a sample config.rb when you create a Sensor application. Save that config.rb to wherever you'd like. The default location is ~/.fiveruns-dash-sensor/config.rb. See the Example Configuration below for more detail.
To fork off the daemon process, run:
$ fiveruns-dash-sensor -d
To stop it, just kill the associated PID.
Example Configuration
You'll need to uncomment the sensor.token line and
one or more of the sensor.plugin lines.
# Example configuration for FiveRuns Dash Sensor daemon.
# Configure your Dash sensor instance here.
# This file should reside in ~/.fiveruns-dash-sensor/config.rb
#
# We suggest you have a single Dash Sensor instance running per machine
# and an application token per environment. So if you have 8 machines
# in your application's production cluster, you would have 8 sensor instances
# running for one application named "<App> Production Cluster".
#sensor.token = '<your-app-token>'
# One line per piece of infrastructure you wish to monitor.
# The plugins are in the plugins directory.
# Available options and their defaults are listed.
#sensor.plugin 'memcached', :iface => 'localhost', :port => 11211
#sensor.plugin 'starling', :iface => 'localhost', :port => 22122
#sensor.plugin 'apache', :url => 'http://localhost/server-status?auto'
#sensor.plugin 'nginx', :url => 'http://localhost/nginx_status'
Plugins
Currently Sensor has four plugins:
apache: Uses mod_status to gather MB Transferred and Requestsnginx: Uses nginx_status to gather Active Connections and Requestsmemcached: Uses the STATS command to gather Cache Hit Rate and Current Sizestarling: Uses the STATS command to gather total Unprocessed and Processed Item counts.