CopperEgg / chef-copperegg

Chef cookbook for CopperEgg services.
MIT License
5 stars 8 forks source link

Chef Cookbook for Uptime Cloud Monitor services

Requirements

Chef 12.5 and up. For Chef 10 to 12.4 you can use version [v1.0.1] (https://github.com/CopperEgg/chef-copperegg/tree/v1.0.1)

The following cookbooks are direct dependencies because they're used for common "default" functionality.

The following cookbooks are direct dependencies

Platform

Attributes

Collector Specific Attributes

Usage

  1. Download the Uptime Cloud Monitor cookbook into your chef-repo/cookbooks/copperegg directory: (the cookbook directory name must be copperegg)
    • git clone https://github.com/CopperEgg/chef-copperegg.git ./copperegg, or
    • manually download from the Opscode community site http://community.opscode.com/cookbooks/copperegg, or
    • knife cookbook site install copperegg
  2. Set your apikey as described in the Attributes section.
    • edit copperegg/attributes/default.rb and change YOUR_USER_API_KEY to be correct.
    • or override node['copperegg']['apikey'] within role or environment.
  3. Set any other optional attributes described above, as desired.
  4. Upload the cookbook to your chef server or hosted chef:
    • knife cookbook upload -a to upload all cookbooks or
    • knife cookbook upload copperegg --include-dependencies
    • To install dependencies, run knife cookbook site install curl 2.0.3 and knife cookbook site install apt 3.0.0
  5. Include recipe[copperegg] in the run_list for all of your servers.
    • knife node run_list add NODES 'recipe[copperegg]'
  6. Run chef-client on your nodes in whatever manner suits you, such as sudo chef-client or a batch job.
  7. View your systems within 10 seconds in the RevealCloud App

Creating and managing website and port probes

  1. The Uptime Cloud Monitor Cookbook contains a LightWeight Resource Provider (LWRP) for simplifying the automation of Uptime Cloud Monitor probes.
  2. To create a copperegg probe, you need to include something similar to the following example:
  copperegg_probe "ChefProbe2" do
    probe_desc 'ChefProbe2'               # the 'name' of the probe
    probe_dest "http://yoursite.com"      # the URL to test
    type 'GET'                            # the test type; in this case, an HTTP GET request
    stations ['dal','nrk']                # override the defaults and specify testing from Dallas and Fremont
    tags ["production",'load_balancer']   # The tags to apply to this probe
    action :update                        # update will create or updatee
  end
  1. You can find descriptions of all required and optional fields in copperegg/resources/probe.rb.
  2. Refer to the Probe section of the Uptime Cloud Monitor API for further details: Uptime Cloud Monitor Probe API

Creating Annotations in the Uptime Cloud Monitor UI for chef run events.

The Uptime Cloud Monitor Cookbook includes integration with the Chef Report and Exception Handlers. To enable this functionality choose one of the following:

That's it!

Note:

Links

License and Author

Authors:: Ross Dickey, Scott Johnson With Contributions from Drew Oliner (https://github.com/Drewzar)

(The MIT License)

Copyright © 2012-2017 IDERA

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.