This quickstart guide will get you Flapjack running in a VM locally using Vagrant and VirtualBox.
You’ll also learn the basics of how to:
To skip this tutorial and jump straight to the code, view the project on GitHub.
Get the repo, and build your Vagrant box, using your preferred distro_release. Supported distro releases are ‘precise’, ‘trusty’, ‘wheezy’, and ‘centos-6’.
git clone https://github.com/flapjack/vagrant-flapjack.git cd vagrant-flapjack distro_release=trusty vagrant up
For an alternative provider to VirtualBox (e.g. VMware Fusion), you can specify the provider when running
distro_release=trusty vagrant up --provider=vmware_fusion
Flapjack will now be visible at http://localhost:3080 from your host workstation. You should see the Flapjack Web UI:
To continue with this guide, SSH into the vagrant box:
You’ll find the commands under
/opt/flapjack/bin and in
flapjack help flapjack simulate help
Flapjack can receive check execution results from a number of different systems. When it does, Flapjack creates the check, and its entity, and starts retaining history of state changes etc.
For now, we’ll create our own using Flapjack’s simulate command:
flapjack simulate fail \ --check "restaurant1:bacon" \ --interval 1 \ --time 0.1 flapjack simulate ok \ --check "restaurant1:eggs" \ --interval 1 \ --time 0.1 flapjack simulate fail_and_recover \ --check "restaurant2:pancakes" \ --interval 1 \ --time 0.1
The definition of these commands are as follows:
flapjack simulate fail - Generate a stream of failure events flapjack simulate fail_and_recover - Generate a stream of failure events, and one final recovery flapjack simulate ok - Generate a stream of ok events
You can now see these under the list of checks.
There are two types of maintenance - scheduled and unscheduled maintenance. An acknowledgment creates an unscheduled maintenance starting at the time of the acknowledgement.
All checks are created with a period of scheduled maintenance, 100 years by default. This can be altered, or disabled, in the flapjack config file.
Click the ‘End Now’ button on the bacon check to end this maintenance.
restaurant1:bacon check is now critical, and sending out alerts. To acknowledge this check, and silence the alerts, we add unscheduled maintenance for a period of time by filling out the Acknowledge Alert box.
If you want to add scheduled maintenance (lets say we know bacon will be off the menu next Saturday), fill out the ‘Add Scheduled Maintenance’ box further down the page.
You can also add, list and remove maintenance by using the CLI tool
flapjack maintenance show - Show maintenance windows according to criteria (default: all ongoing maintenance) flapjack maintenance delete - Delete maintenance windows according to criteria (default: all ongoing maintenance) flapjack maintenance create - Create a maintenance window
The bottom of the check page lists which contacts will be notified of events.
To enable gateways, edit /etc/flapjack/flapjack_config.yaml and update the enabled flag for the given gateways:
[gateways] # Generates email notifications [gateways.email] enabled = true
Further configuration options are available in each of the gateway blocks.
Both Nagios and Icinga are configured already to send data to Flapjack’s broker module, which sends it to redis, in place of the earlier Flapjack Nagios receiver.
More details on configuration are available here.
Something not clear? That’s a bug too!
Got questions? Suggestions? Talk to us via irc, mailing list, or twitter. See Support for details.
Stay tuned for more info on how to configure:
In the mean time, check out: