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

The zenoss_register cookbook has been deprecated

The zenoss_register cookbook has been deprecated and is no longer being maintained by its authors. Use of the zenoss_register cookbook is no longer recommended.

RSS

zenoss_register (3) Versions 0.2.0

Auto-registers Zenoss monitored servers

Berkshelf/Librarian
Policyfile
Knife
cookbook 'zenoss_register', '= 0.2.0'
cookbook 'zenoss_register', '= 0.2.0', :supermarket
knife cookbook site install zenoss_register
knife cookbook site download zenoss_register
README
Dependencies
Quality -%

zenoss_register LWRP

Build Status

Registers a client with a Zenoss Core 4 monitoring server. This will register both Linux and Windows systems as it uses the ruby built-in with chef-client to perform a POST call back to the server.

Requirements

Tested with Zenoss Core 4. Depends on net/http, which should be provided by Chef's Ruby.

Resources/Providers

zenoss_register

This resource allows one to register a client on a Zenoss via LWRP. Parameters, devicePath and productionState are derived from, Ohai kernel.os and chef_environment method respectively.

The included prod_state library will return numeric values to somewhat intelligently calculate the Zenoss productionState value.

Generally prod_state outputs the following for productionState given environment inputs.

production/prod => 1000,
pre-prod/preprod => 500,
test => 400,
maintenance => 300,
decommissioned => -1,
other => 1000

devicePath will be set to /Server/Windows, /Server/Linux, or /Server depending on kernel.os

Examples

Configure a client to register with Zenoss using LWRP. See default recipe for an example.

zenoss_register node['hostname'] do
  username 'admin'
  password 'admin'
  baseuri 'http://zenoss.example.com:8080'
  devicePath '/Server/Linux'
  productionState prod_state['production']
end

Configure a client to register with Zenoss via role.

name 'zenoss_register_production'
description 'Add a client to a Zenoss Core 4 server'
default_attributes(
  'zenoss_register' => { 
    'username'          => 'admin',
    'password'          => 'password',
    'baseuri'           => 'http://zen.example.com:8080',
  }
)
run_list "recipe[zenoss_register::default]"

Actions

  • :register is the only action supported at this time.

Parameters

  • deviceName - Hostname of device to be monitored, defaults to name of resource.

  • username - an API admin with permission to add devices to Zenoss, default admin.

  • password - an API password with permission to add devices to Zenoss, default zenoss.

  • baseuri - the base URI/URL for your Zenoss instance, default http://zen.#{node['domain']}:8080

  • devicePath - the device container where the monitored client will be added, default platform-specific.

  • productionState - the numerical Zenoss state, based on the chef_environment method. Default, derived via prod_state(chef.environment)

Attributes

The following are attributes that can be overridden in the zenoss_register namespace

  • ['zenoss_register']['username']

    • String
    • Default 'admin'
    • Username on Zenoss which can create new objects
  • ['zenoss_register']['password']

    • String
    • Default 'password'
    • Password for account who can create new objects
  • ['zenoss_register']['baseuri']

  • ['zenoss_register']['devicePath']

    • String
    • Default platform specific
  • ['zenoss_register']['productionState']

    • Integer
    • Default is derived from chef environment, otherwise 1000
    • Sets production state within Zenoss

Attribute set by provider, probably should not mess with this:

  • ['zenoss_register']['registered']
    • Bool
    • Default false
    • Set in provider to true.

References

License and Authors

Author:: Patrick Moore (moore267@marshall.edu)

Eric G. Wolfe (wolfe21@marshall.edu)

Copyright:: 2014

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 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found