Adoptable Cookbooks List

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.

TODO List

* None of the resources offer :delete actions yet
* Graph resource lacks facilities for access keys, guides, and composites
* Support for graphs in default recipe (attribute walker)
* Ability to control order of rules
* LWRP for worksheets

Recipes

circonus (circonus::default)

Optional. Lets you define circonus check bundles, metrics, and rules via the node's attributes. See the 'Cookbook Attributes' section for details on the expected attribute structure.

LWRPs

circonus_check_bundle

Manages a check bundle on circonus. Note that you MUST have at least one circonus_metric that refers to the circonus_check_bundle (a limitation of the API).

Actions:
* :create - Create/Manage the check bundle

Resource Attributes:

* display_name - Display name of bundle, will appear in email subjects. Uses resource name if not provided.
* target - Hostname or IP to query. Defaults to node[:circonus][:target], which defaults to the node's guess_main_ip() according to NetInfo.
* type - Type of check, like :resmon or :http
* brokers - Array of broker names. Defaults to node[:circonus][:default_brokers]
* config - Hash of options specific to the check bundle type. See https://circonus.com/resources/api/calls#check_bundles

circonus_metric

Manages a metric on circonus. Each metric must refer to a previously defined circonus_check_bundle resource.

Actions:
* :create - Create/Manage the metric

Resource Attributes:

* name - Name of metric. Consult your check type docs for information on what can go here. Defaults to resource name.
* type - Type of value returned - one of :text, :numeric, or :histogram
* check_bundle - Name of the check bundle resource that should contain this metric. Required.

See also: the Circonus::MetricScanner utility library, which helps enumerate available metrics.

circonus_rule_set

Manages a ruleset on circonus, which allows you to trigger alerts/emails/pages. Each metric can have 0 or 1 rulesets per broker, and each ruleset may have 0-n rules. The ruleset gathers together the contact and response information, while the rules define the specific criteria under which the alert(s) will fire.

The name of this resource is arbitrary, but it is suggested that you use 'broker-name/metric-name' since that will be unique.

Actions:
* :create - Create/manage the metric

Resource Attributes:

* metric - Name of the circonus_metric resource this ruleset will be bound to. Must be defined prior to the circonus_rule_set .
* broker - Name of the circonus broker that is collecting stats for the metric. You may repeat circonus_rule_sets on the same metric if you specify different brokers.
* contact_groups - Ruby hash-of-arrays. Keys are the strings '1','2', .. '5', representing the severity levels. Values are arrays of string names of contact groups; when a rule fires at that severity level, all of the contact groups specified will be notified. You may omit entries for which you have no contact groups.
* derive - Flag indicating whether the metric should be treated as a derivative (ie, watch for changes over time, rather than specific values). Values are :derive , :counter, or null.
* link - An arbitrary URL that will be emailed to contact groups, presumably to assist in incident response.
* notes - Arbitrary text that will be shown in the Circonus Web UI, presumably to assist in incident response.

circonus_graph

Manages a circonus graph. You can greate a graph independently of any check bundles or metrics. A graph may have 0 or more graph datapoints, which do rely on metrics.

Name of the resource is used as the graph title.

Actions:

* :create - Create/Manage the graph

Resource Attributes:

* id - optional, GUID of the graph. If provided, you can change the name of the graph; if omitted, changing the name of the graph will create a new graph.
* style - :line or :area
* max_left_y, max_right_y, min_left_y, min_right_y - Y Axis limits

circonus_graph_datapoint

Manages a data series on a graph. Relies on a circonus_metric resource definition, as well as agrpah definition. You must also provide the broker name, so we can resolve the check ID.

The name is used as the display name. The identity of the data point is derived from the metric and the broker.

Actions:

* :create - Create/Manage a graph data series

Resource Attributes:

* graph - name of the circonus_graph chef resource on which to draw the data
* metric - name of the circonus_metric chef resource that provides the data
* broker - name of the broker, used to identify the check
* axis - :r or :l, which axis the the data should be measured against
* color - #FF00FF style; if omitted, circonus server will provide a default
* data_formula - see web UI help; may be left null
* legend_formula - see web UI help; may be left null
* hidden - true/false, false default
* derive - :counter, :derive, :gauge - :gauge is default

Utility Library

The cookbook includes a utility class, Circonus::MetricScanner, which provides a way to list the metrics available on a proposed check bundle before it is actually created in circonus. This is needed for check types that can be configured, like nad and resmon.