Code Monkey home page Code Monkey logo

appfirst-cookbook's Introduction

Description

Configures an appfirst collector for a given account id. This will also set up a LWRP for creating Nagios checks via Appfirst.

Requirements

Chef 0.10.8 or higher due to using some new syntax.

Recipes

default

This recipe installs and updates the AppFirst client for a given account ID.

Attributes

This recipe will attempt to download the collector if one does not exist locally, or if the current local one is out-of-date. It will continue on failure in case the AppFirst front end is not responding.

Open Appfirst-Cookbook/attributes/default.rb, and edit the variable shown below to reflect your AppFirst account ID. This can be located in the appfirst.com WebUI by navigating to the Administration tab, and then clicking 'Setup'. Click the 'Add More Collectors' link and retrieve the Account ID from the Collector download URL. This should look something like 'http://wwws.appfirst.com/packages/initial/xxxx/'

default['appfirst']['appfirst_account_id'] = 'xxxx'

The second noteworthy attribute allows the end user to specify where the Collector installation package should be stored locally after it is retrieved from appfirst.com:

default['appfirst']['tmp_file_location'] ='/tmp'

Resources/Providers

Appfirst Check

This LWRP provides an easy way to manage Nagios Checks via Appfirst.

Actions

  • :create Templates the specified shell script and updates the NRPE config
  • :remove removes the Nagios Check (not implemented)

Attribute Parameters

  • script_name The name of the script being templated
  • command The name of the check, this should be a human readable description, only Alphanumerics and '-"_
  • warning Warning Level for the Nagios Check (Integer)
  • critical Critical Level for the Nagios Check (Integer)
  • options Any additional options to be added to the command in the NRPE config

Examples

appfirst_check "Check_Redis_Memory_Usage" do
  action :create
  command "Check_Redis_Memory_Usage"
  script_name "check_redis_memory_usage.sh"
  warning 50
  critical 75
end

License and Author

Author:: Andrew Gross ([email protected])

Licensed under the Buy Me a Beer License

"THE BEER-WARE LICENSE" (Revision 42): As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return

http://en.wikipedia.org/wiki/Beerware

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.