<commit_before>Flapjack
========

Flapjack is highly scalable and distributed monitoring system. 

It understands the Nagios plugin format, and can easily be scaled 
from 1 server to 1000. 



Setup dependencies (Ubuntu Hardy)
---------------------------------

Add the following line to `/etc/apt/sources.list`

    deb http://ppa.launchpad.net/auxesis/ppa/ubuntu hardy main

Install beanstalkd:

    sudo apt-get install beanstalkd

Set `ENABLED=1` in `/etc/default/beanstalkd`.

Start beanstalkd: 

    sudo /etc/init.d/beanstalkd start


Setup dependencies (everyone else)
----------------------------------

Install the following software through your package manager or from source: 

 - beanstalkd (from http://xph.us/software/beanstalkd/)
 - libevent (from http://monkey.org/~provos/libevent/)



Installation
------------

Install flapjack:

    sudo gem install flapjack


Create a directory for PID files:

    sudo mkdir /var/run/flapjack 
    sudo chmod a+rw /var/run/flapjack

Copy init scripts and default config across: 

    gem contents flapjack | grep etc
    sudo cp -rf path/to/flapjack/etc/* /etc/


Running 
-------

Make sure beanstalkd is running.

  * `flapjack-worker` => executes checks, reports results  
  * `flapjack-worker-manager` => starts/stops a cluster of `flapjack-worker`
  * `flapjack-notifier` => gets results, notifies people if necessary  
  * `flapjack-stats` => gets stats from beanstalkd tubes (useful for benchmarks + performance analysis)  

You'll want to set up `/etc/flapjack/recipients.yaml` so notifications can be sent via 
`flapjack-notifier`: 

    - :name: <NAME>
      :email: "<EMAIL>"
      :phone: "+61 444 222 111"
      :pager: "61444222111"
      :jid: "<EMAIL>"

Start up a cluster of workers: 

    flapjack-worker-manager start

This will spin up 5 workers in the background. You can specify how many workers 
to start: 

    flapjack-worker-manager start --workers=10

Each of the `flapjack-worker`s will output to syslog (check in /var/log/messages).

Start up the notifier: 

    flapjack-notifier --recipients path/to/recipients.yaml

Currently there are email and XMPP notifiers. 

You'll want to get a copy of (http://github.com/auxesis/flapjack-admin/)[flapjack-admin]
to set up some checks, then run its' populator to get them into Flapjack. 


init scripts
------------

You can use the provided init scripts to start Flapjack on boot. <commit_msg>replaced complex install docs with pointer to a script<commit_after>Flapjack
========

Flapjack is highly scalable and distributed monitoring system. 

It understands the Nagios plugin format, and can easily be scaled 
from 1 server to 1000. 



Setup dependencies (Ubuntu Hardy)
---------------------------------

Add the following line to `/etc/apt/sources.list`

    deb http://ppa.launchpad.net/auxesis/ppa/ubuntu hardy main

Install beanstalkd:

    sudo apt-get install beanstalkd

Set `ENABLED=1` in `/etc/default/beanstalkd`.

Start beanstalkd: 

    sudo /etc/init.d/beanstalkd start


Setup dependencies (everyone else)
----------------------------------

Install the following software through your package manager or from source: 

 - beanstalkd (from http://xph.us/software/beanstalkd/)
 - libevent (from http://monkey.org/~provos/libevent/)


Installation
------------

Install flapjack:

    sudo gem install flapjack

Then run the magic configuration script to set up init scripts: 

    sudo install-flapjack-systemwide

The script will prompt you if it wants to do anything destructive. 


Running 
-------

Make sure beanstalkd is running.

You'll want to set up `/etc/flapjack/recipients.yaml` so notifications can be sent via 
`flapjack-notifier`: 

    - :name: <NAME>
      :email: "<EMAIL>"
      :phone: "+61 444 222 111"
      :pager: "61444222111"
      :jid: "<EMAIL>"

Start up a cluster of workers: 

    flapjack-worker-manager start

This will spin up 5 workers in the background. You can specify how many workers 
to start: 

    flapjack-worker-manager start --workers=10

Each of the `flapjack-worker`s will output to syslog (check in /var/log/messages).

Start up the notifier: 

    flapjack-notifier --recipients path/to/recipients.yaml

Currently there are email and XMPP notifiers. 

You'll want to get a copy of (http://github.com/auxesis/flapjack-admin/)[flapjack-admin]
to set up some checks, then run its' populator to get them into Flapjack. 

What things do 
--------------

  * `flapjack-worker` => executes checks, reports results  
  * `flapjack-worker-manager` => starts/stops a cluster of `flapjack-worker`
  * `flapjack-notifier` => gets results, notifies people if necessary  
  * `flapjack-stats` => gets stats from beanstalkd tubes (useful for benchmarks + performance analysis)  


init scripts
------------

You can use the provided init scripts to start Flapjack on boot. 
{'fraction_non_alphanumeric': 0.12525751957148742, 'fraction_numerical': 0.01277297074577668, 'mean_word_length': 2.927993527508091, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4239303', 'n_tokens_mistral': 1600, 'n_tokens_neox': 1409, 'n_words': 530}