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

The zenoss_register cookbook has been deprecated

Author provided reason for deprecation:

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.2

Auto-registers Zenoss monitored servers

Policyfile
Berkshelf
Knife
cookbook 'zenoss_register', '~> 0.2.2', :supermarket
cookbook 'zenoss_register', '~> 0.2.2'
knife supermarket install zenoss_register
knife supermarket download zenoss_register
README
Dependencies
Quality 17%

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.

Collaborator Number Metric
            

0.2.2 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.2.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.2.2 failed this metric

FC064: Ensure issues_url is set in metadata: zenoss_register/metadata.rb:1
FC065: Ensure source_url is set in metadata: zenoss_register/metadata.rb:1
FC066: Ensure chef_version is set in metadata: zenoss_register/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: zenoss_register/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: zenoss_register/providers/default.rb:51
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.2 passed this metric

Testing File Metric
            

0.2.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.2.2 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number