Every repository with this icon (
Every repository with this icon (
tree bb1c679ccd8b2b1c8cf62ea4bc5bc852aba89bb8
parent 094b36444ccff3758a90f1b5b25b5bd99fb3fb27
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sun Mar 22 19:43:15 -0700 2009 | |
| |
README.md | Fri Aug 07 07:47:41 -0700 2009 | |
| |
Rakefile | Sat Mar 21 23:33:20 -0700 2009 | |
| |
TODO.md | Fri Aug 07 07:35:17 -0700 2009 | |
| |
app/ | Fri Aug 07 07:00:42 -0700 2009 | |
| |
autotest/ | Sun Mar 22 00:22:42 -0700 2009 | |
| |
bin/ | Thu Jul 16 09:44:56 -0700 2009 | |
| |
config.ru | Tue Jul 14 04:06:26 -0700 2009 | |
| |
config/ | Fri Aug 07 07:30:06 -0700 2009 | |
| |
cucumber.yml | Sun Mar 22 00:22:42 -0700 2009 | |
| |
doc/ | Sat Mar 21 23:33:20 -0700 2009 | |
| |
features/ | Thu Aug 06 03:39:33 -0700 2009 | |
| |
gems/ | Tue May 26 02:40:08 -0700 2009 | |
| |
lib/ | Fri Aug 07 07:36:00 -0700 2009 | |
| |
log/ | Wed May 27 17:37:05 -0700 2009 | |
| |
merb/ | Sat Mar 21 23:33:20 -0700 2009 | |
| |
public/ | Tue Jul 14 04:07:04 -0700 2009 | |
| |
spec/ | Fri Aug 07 07:03:02 -0700 2009 | |
| |
tasks/ | Sun May 24 16:45:06 -0700 2009 |
flapjack-admin
An admin interface for the Flapjack monitoring system.
You administer checks through flapjack-admin, then run flapjack-populator to place the checks on beanstalkd. A flapjack-worker will then pull the check off queue, and flapjack-notifier will notify if the check reports and bad result.
Dependencies (Ubuntu Hardy)
Install the following dependencies:
sudo apt-get install rubygems build-essential \
ruby-dev libxml2-dev \
libsqlite3-dev libxslt1-dev libopenssl-ruby
Setup
- clone the repo
cdinto cloned repobin/thor merb:gem:redeployMERB_ENV=production bin/rake db:automigrate(this will create a sqlite database for you to use)bin/merb -e production- Go to http://localhost:4000/ in your browser
Now create some checks, and then see the next section about populating jobs.
Populating jobs
FIXME: this is deprecated, now the web interface handles this
Once you've created jobs in the admin interface, you want to pop them onto the worker queue. flapjack-admin provides a simple tool to do this for you.
To flush out the previous jobs, you need to restart the beanstalkd.
sudo /etc/init.d/beanstalkd stop
sudo /etc/init.d/beanstalkd start
Then, to populate jobs:
bin/flapjack-populator sqlite3://$(pwd)/production.db
Restarting beanstalkd from flapjack-admin
Once you've set up a bunch of checks in flapjack-admin, you'll want to push them onto your beanstalkd. flapjack-admin will attempt to do this for you when you create a batch of checks through the interface.
As there are many ways to deploy Flapjack (different distributions, security models, Passenger vs. Thin/Mongrel), it's up to the user to tell flapjack-admin how to restart the beanstalkd.
Don't fret, this is really easy. You need to specify the restart logic to
Merb.config.restart_beanstalkd in config/environments/production.rb.
There's example block in config/environments/development.rb, which is what I
use to restart beanstalkd on my development machine.
Put simply, it looks something like this:
Merb::Config.use do |c|
c[:restart_beanstalkd] = Proc.new do
# magic restart logic here!
end
end
You can test this by running a rake task:
$ MERB_ENV='development' bin/rake test_beanstalkd_restart
Sub out development with test/production to test those environments.
This approach is a bit of a cop out, but you can't please all the people all the time. As flapjack-admin matures, a prefered way of restarting beanstalkd will emerge.
Testing
To run Cucumber features:
$ bin/cucumber features
The Cucumber features live under features/







