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

Select Status


zenoss (11) Versions 0.6.2

Installs and configures Zenoss and registers nodes as devices

cookbook 'zenoss', '= 0.6.2', :supermarket
cookbook 'zenoss', '= 0.6.2'
knife supermarket install zenoss
knife supermarket download zenoss
Quality -%


WORK IN PROGRESS, TODO.txt covers planned features

Installs and configures a Zenoss server with the zenoss::server recipe. Devices can be added to the Zenoss server by using the zenoss::client recipe and utilizing Chef roles to map to Zenoss Device Classes, Locations and Groups. LWRPs are available for installing ZenPacks, zenpatches, loading devices and users and running zendmd commands.


Written with Chef 0.9.12 and uses fairly recent search capabilities of roles.

The example roles in the zenoss/roles directory should be loaded for use, refer to the Roles subsection.


Tested on Ubuntu 10.04 and 10.10 and tested with Chef 0.9.12.


Attributes under the zenoss namespace.

  • ["zenoss"]["device"]["device_class"] - Device Class for the device, "/Discovered" is the default and may be overwritten at the Role or Node.
  • ["zenoss"]["device"]["location"] - Location for the device, may be set at the Role or Node.
  • ["zenoss"]["device"]["modeler_plugins"] - Modeler Plugins used by the device, may be set at the Role or Node.
  • ["zenoss"]["device"]["properties"] - Configuration Properties used by the device, may be set at the Role or Node.
  • ["zenoss"]["device"]["templates"] - Monitoring Templates used by the device, may be set at the Role or Node.
  • ["zenoss"]["server"]["admin_password"] - Password for the admin account, default is chefzenoss
  • ["zenoss"]["server"]["installed_zenpacks"] - Hash of ZenPacks and their versions, defaults are "ZenPacks.zenoss.LinuxMonitor" => "1.1.5", "" => "0.4"
  • ["zenoss"]["server"]["zenhome"] - Directory of the Zenoss server installation, default is /usr/local/zenoss/zenoss
  • ["zenoss"]["server"]["zenoss_pubkey"] - Public key for the zenoss user used for monitoring. Set on the server automatically if it does not exist.
  • ["zenoss"]["server"]["zenpatches"] - Hash of patches and the tickets providing the patches, defaults are "23716" => "", "23833" => ""



This LWRP builds a list of devices, their Device Classes, Systems, Groups, Locations and their properties and populates the zenoss::server with them.


This LWRP takes a command to be executed by the zendmd command on the Zenoss server. Examples include setting passwords and other changes to the Zope object database.


Installs ZenPacks on the zenoss::server for use for extending the base functionality.


Installs patches on the zenoss::server based on the number referenced in the ticket.



The default recipe passes through to zenoss::client.


The client includes the openssh recipe and adds the device to the Zenoss server for monitoring.


The server includes the openssh and apt recipes. The server recipe installs Zenoss from the .deb stack installer via the apt cookbook, handling and configuring all the dependencies.

The recipe does the following:

  1. Installs Zenoss.
  2. Applies post-3.0.3 patches from closed tickets.
  3. Starts server.
  4. Sets the admin password.
  5. Adds any other users to the proper Zenoss roles.
  6. Creates a zenoss user for running Zenoss and monitoring clients via SSH.
  7. Installs ZenPacks required for monitoring.
  8. Creates Device Classes, Groups and Locations based on Chef roles containing custom settings.
  9. Adds Systems to the server based on which recipes are used within Chef.
  10. Adds itself to be monitored.
  11. Searches for members of the sysadmins group by searching through users data bag and adds them to the server.
  12. Finds all nodes implementing zenoss::client and adds them for monitoring and places them in the proper Device Classes, Groups, Systems and Locations and any node-specific settings as well.

Data Bags

Create a users data bag that will contain the users that will be able to log into the Zenoss server (members of the 'sysadmin' group). The admin user is automatically provided. Zenoss-specific information is stored in the zenoss hash. Passwords may be set or left out. Multiple roles may be set; the choices with Zenoss Core are Manager, ZenManager, ZenUser or empty. Users may belong to User Groups within Zenoss (listing them here will create them). Example user data bag item:

"id": "zenossadmin",
"groups": "sysadmin",
"zenoss": {
  "password": "abc",
  "roles": ["Manager", "ZenUser"],
  "user_groups": ["managers"],
  "pager": "",
  "email": ""

Two example data bags are provided and may be loaded like this:

knife data bag create users
knife data bag from file users cookbooks/zenoss/data_bags/Zenoss_User.json
knife data bag from file users cookbooks/zenoss/data_bags/Zenoss_Readonly_User.json


This cookbook provides a number of example roles for mapping attributes to Zenoss' Device Classes, Groups and Locations. There is also a role called "ZenossServer" that may be used to configure the Zenoss server for convenience. These roles may be loaded like this:

knife role from file cookbooks/zenoss/roles/Class_Server-SSH-Linux.rb

Device Class Roles

  • Roles intended to map to Device Classes set the attribute [:zenoss][:device][:device_class]. This is an override_attribute on the role.
  • Roles may set default attributes for [:zenoss][:device][:modeler_plugins], [:zenoss][:device][:templates] and [:zenoss][:device][:properties] to be applied to the Device Class.
  • The name for the role is unused by Zenoss.
  • Nodes may only belong to a single Device Class, nodes that belong to multiple Device Class roles will have non-determinant membership in a single Device Class.

Location Roles

  • Roles intended to map to Locations set the attribute [:zenoss][:device][:location]. This is an override_attribute on the role.
  • Location roles may set the have [:zenoss][:device][:address] attribute for the Google map address. If you are using a newline, make sure it is entered as \\n in the role. This is an override_attribute on the role.
  • The name and the description for the role map to the name and description of the Location.
  • Nodes may only belong to a single Location, nodes that belong to multiple Location roles will have non-determinant membership in a single Location.

Group Roles

  • The roles in organization will populate the Groups on the Zenoss server.
  • The Device Class and Location roles will not be added to Groups.


For a Zenoss server add the following recipe to the run_list:


This will allow device nodes to search for the server by this role. Devices are currently added by their external IP addresses, which is effective in hybrid clouds but you may want to modify this for environments in a single platform (ie. EC2-only). Check the providers/zenbatchload.rb for this setting. Running chef-client --log_level debug on the server node will show the calls for zendmd and zenbatchload commands.

To register a device for monitoring with Zenoss on a client node:

include_recipe "zenoss::client"

Any Properties that need to be set are exposed as attributes on the node and the Roles used by this cookbook.

Zenoss has the concept of Devices, which belong to a single Device Class and Location. Chef nodes implementing the zenoss::client recipe become Zenoss Devices and the Device Class and Location roles may be used for placing in the proper organizers. Zenoss also has Groups and Systems which are essentially ways of tagging and organizing devices (and devices may belong to multiple Groups and Systems). Searches for nodes that belong to other roles will populate the Groups. Searches for nodes applying recipes are used to populate the Systems.

If you are monitoring devices running on Amazon's EC2 with Zenoss, you will need to allow ICMP ping from your Zenoss server.

License and Author

Author:: Matt Ray

Copyright:: 2010, Zenoss, Inc
Copyright:: 2010, 2011 Opscode, Inc

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

openssl >= 0.0.0
openssh >= 0.0.0
apt > 0.9

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found