Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms


uptime (3) Versions 0.2.1

Installs/Configures fzaninotto/uptime

cookbook 'uptime', '~> 0.2.1'
cookbook 'uptime', '~> 0.2.1', :supermarket
knife cookbook site install uptime
knife cookbook site download uptime

uptime cookbook

Build Status Linting test status

This cookbook installs and runs the uptime http service monitoring application and runs it as a non-privileged user.


This cookbook depends on the nodejs cookbook from - not the stock nodejs cookbook from chef community/supermarket site. Ensure you install this cookbook specifically.

Supported Platforms

So far Ubuntu 12.04, and 14.04 are is the only fully supported platform - due to use of an Upstart service script. If you are using another platform, using the upstart::install and upstart::database recipes and your own service provider should work for you.


<table> <tr> <th>Key</th> <th>Type</th> <th>Description</th> <th>Default</th> </tr> <tr> <td><tt>['app_uptime']['repo']['url']</tt></td> <td>String</td> <td>Git URL for cloning the application source from</td> <td><tt>""</tt></td> </tr> <tr> <td><tt>['app_uptime']['repo']['ref']</tt></td> <td>String</td> <td>Git Ref (branch/tag/commit sha) to be checked out</td> <td><tt>"d9cc96cc835b65577e9bc8c94625eb2706a1b923"</tt></td> </tr> <tr> <td><tt>['app_uptime']['url']</tt></td> <td>String</td> <td>URL (with optional port) to bind to - should be 1024 or higher as runs unprivileged</td> <td><tt>"http://#{node['fqdn']}:8082"</tt></td> </tr> <tr> <td><tt>['app_uptime']['plugins']</tt></td> <td>Array</td> <td>An array of bundled plugin names to load</td> <td><tt>['console', 'patternMatcher', 'httpOptions', 'email']</tt></td> </tr> <tr> <td><tt>['app_uptime']['monitor']</tt></td> <td>Hash</td> <td>Keys for any option under the 'monitor' section of config.yml may be set</td> <td><tt>{"pollingInterval": 10000, "timeout": 5000}</tt></td> </tr> <tr> <td><tt>['app_uptime']['analyzer']</tt></td> <td>Hash</td> <td>Keys for any option under the 'analyzer' section of config.yml may be set</td> <td><tt>{"updateInterval": 60000, "qosAggregationInterval": 600000, "pingHistory": 8035200000}</tt></td> </tr> <tr> <td><tt>['app_uptime']['mongo']['user']</tt></td> <td>String</td> <td>MongoDB username</td> <td><tt>"uptime"</tt></td> </tr> <tr> <td><tt>['app_uptime']['mongo']['password']</tt></td> <td>String</td> <td>MongoDB password</td> <td><tt>A secure randomly generated value by openssl</tt></td> </tr> <tr> <td><tt>['app_uptime']['config']</tt></td> <td>Hash</td> <td>Arbitrary config options</td> <td><tt>Any config not already supported here (e.g. custom plugin config) can be supplied here</tt></td> </tr> </table>



Include uptime::default in your node's run_list:

  "run_list": [

If you are using chef-solo, then you will need to manually set a password for the mongodb instance ['app_uptime']['mongo']['password'] = 'pleasepickyourownpassword'. chef-client when used with a server (either open source or enterprise) - will automatically generate and store a password in the same attribute.

It is also recommended to put a web server such as apache or nginx in front of this as a proxy, as this application is intentionally run as a non-privileged user, which means it cannot be run on port 80 or 443 directly.


This cookbook also provides an LWRP for programmatically adding URLs to check

uptime_check 'redmine' do
  url ""

Action's supported: :create (the default - creates or updates) and :delete. The name and url attributes are required. All others are optional, and leave the defaults up to the API

<table> <tr> <th>Param</th> <th>Type</th> <th>Description</th> </tr> <tr> <td><tt>name</tt></td> <td>String</td> <td>The label/name to display in the interface</td> </tr> <tr> <td><tt>url</tt></td> <td>String</td> <td>The URL to monitor</td> </tr> <tr> <td><tt>type</tt></td> <td>String</td> <td>Optional - can specify non http(s) checks using this</td> </tr> <tr> <td><tt>interval</tt></td> <td>Integer</td> <td>Time between checks in (seconds)</td> </tr> <tr> <td><tt>maxTime</tt></td> <td>Integer</td> <td>Time until considered timed out (milliseconds)</td> </tr> <tr> <td><tt>alertTreshold</tt></td> <td>Integer</td> <td>Down for this many checks before alerting (Param name not a typo)</td> </tr> <tr> <td><tt>tags</tt></td> <td>Array</td> <td>An Array of strings, to tag your check with (e.g. datacenter)</td> </tr> <tr> <td><tt>isPaused</tt></td> <td>Boolean</td> <td>Set to true to temporarily disable the check, set to false to enable again</td> </tr> </table>

Checks stored in the database are uniquely identified by their URL. Changing the URL in your recipe will create a new check - the old one can be removed with action :delete or manually.


  • Support service configurations for running the uptime process on other platforms
  • Add an optional nginx proxy recipe


This cookbook is tested on ubuntu 12.04 and 14.04 This cookbook has a test kitchen setup to converge the recipes on those platforms locally.

To run those tests:


  • Install the ruby development dependencies: gem install bundler && bundle install
  • Install vagrant
  • Install VirtualBox
  • vagrant plugin install vagrant-omnibus
  • vagrant plugin install vagrant-berkshelf


# Code linting (also run on CI)
rake style
# Integration tests (Not currently run on CI)
kitchen verify all


  1. Fork the repository on Github
  2. Create a named feature branch (i.e. add-new-recipe)
  3. Write you change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request

License and Authors

License: Apachev2

Author:: Jeremy Olliver (

Dependent cookbooks

mongodb >= 0.0.0
nodejs >= 0.0.0
openssl >= 0.0.0
git >= 0.0.0
build-essential >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.



  • Arbitrary config options are now supported under node['app_uptime']['config'] - plugins can now be configured under here.


  • The uptime_check resource now correctly checks for modifications, only updating if required
  • Removed an example test lwrp usage from the default recipe


Breaking Changes:

  • Default listen location changed from http://FQDN:3000 -> http://localhost:8082

New Features:

  • Includes an LWRP. You can now define checks with uptime_check


Initial release of uptime

  • Features
    • Installs app from github source
    • Installs npm
    • Installs mongodb
    • Runs app as Upstart service for ubuntu

Collaborator Number Metric

0.2.1 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

0.2.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Foodcritic Metric

0.2.1 failed this metric

FC059: LWRP provider does not declare use_inline_resources: uptime/providers/check.rb:1
FC064: Ensure issues_url is set in metadata: uptime/metadata.rb:1
FC065: Ensure source_url is set in metadata: uptime/metadata.rb:1
FC066: Ensure chef_version is set in metadata: uptime/metadata.rb:1
FC069: Ensure standardized license defined in metadata: uptime/metadata.rb:1
Run with Foodcritic Version 10.3.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric

0.2.1 passed this metric

No Binaries Metric

0.2.1 passed this metric

Publish Metric

0.2.1 passed this metric

Supported Platforms Metric

0.2.1 passed this metric

Testing File Metric

0.2.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

0.2.1 passed this metric