README.md in sidewatch-0.0.3 vs README.md in sidewatch-0.0.4

- old
+ new

@@ -1,7 +1,10 @@ # Sidewatch +[![Gem Version](https://badge.fury.io/rb/sidewatch.svg)](https://rubygems.org/gems/sidewatch) +[![Build Status](https://travis-ci.org/travelmob/sidewatch.svg)](https://travis-ci.org/travelmob/sidewatch) + Sidewatch uploads Sidekiq metrics to AWS CloudWatch in regular intervals. ## Installation Add this line to your application's Gemfile: @@ -18,14 +21,43 @@ ## Usage To start sidewatch as a daemon process in the background run - ruby bin/sidewatch start + ruby bin/sidewatch start [--config <path to config file>] To run sidewatch in the foreground, e.g. for testing, run - ruby bin/sidewatch run + ruby bin/sidewatch run [--config <path to config file>] + +## Configuration + +### Using ENV variables + +Sidewatch will use the same environment variables as Sidekiq to determine the Redis server to connect to, i.e. either `REDIS_PROVIDER` or `REDIS_URL`. Please refer to the [Sidekiq wiki](https://github.com/mperham/sidekiq/wiki/Using-Redis#using-an-env-variable) for more information. + +Sidewatch uses the AWS SDK v2 to connect to CloudWatch. The SDK expects AWS credentials to be provided in one of these locations: + +* `ENV['AWS_ACCESS_KEY_ID']` and `ENV['AWS_SECRET_ACCESS_KEY']` +* The shared credentials ini file at `~/.aws/credentials` +* From an instance profile when running on EC2 + +Please refer to the [SDK's documentation](http://docs.aws.amazon.com/sdkforruby/api/index.html#Configuration) for more information. + +### Using the config file + +When starting Sidewatch, you can pass a config file using the `--config` parameter. The config file should be in YAML format and supports the following keys: + +````yaml +logfile: "/var/log/sidewatch.log" +sidekiq: + namespace: "Sidekiq" # namespace used when uploading AWS CloudWatch metrics + redis: + url: "redis://localhost:6379/0" + namespace: "sidekiq" # Redis key namespace used by Sidekiq +cloudwatch: + region: "us-west-2" +```` ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`)