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

RSS

snmp (16) Versions 4.0.0

Installs/Configures snmp on redhat, centos, ubuntu, debian

Berkshelf/Librarian
Policyfile
Knife
cookbook 'snmp', '~> 4.0.0'
cookbook 'snmp', '~> 4.0.0', :supermarket
knife cookbook site install snmp
knife cookbook site download snmp
README
Dependencies
Changelog
Quality

SNMP

Build Status

Description

Installs and configures snmpd.

The SNMP multiplex (smuxpeer) line will be set for Dell OpenManage, if Dell manufactured hardware is detected by Ohai.

Recipes

  • snmp::default

    • Installs and configures SNMP
  • snmp::snmptrapd

    • Configures snmptrapd

Attributes

Notable overridable attributes are as follows. It is recommended to override these following attributes to best suit your own environment.

  • snmp['community']

    • SNMP Community String, default is "public".
  • snmp['sec_name']

    • Hash of security name and IPv4 networks to allow access. See man 5 snmpd.conf, section VACM Configuration for further details.
    • Default { notConfigUser: ['default'] }
  • snmp['sec_name6']

    • Hash of security name and IPv6 networks to allow access. See man 5 snmpd.conf, section VACM Configuration for further details.
    • Default { notConfigUser: ['default'] }
  • snmp['groups']['v1']

    • Hash of security groups to map security names into for SNMPv1. See man 5 snmpd.conf, section VACM Configuration for further details.
    • Default { notConfigGroup: ['notConfigUser'] }
  • snmp['groups']['v2c']

    • Hash of security groups to map security names into for SNMPv2c. See man 5 snmpd.conf, section VACM Configuration for further details.
    • Default { notConfigGroup: ['notConfigUser'] }
  • snmp['trapcommunity']

    • SNMP Community Trap String, default is "public".
  • snmp['trapsinks']

    • Array of trapsink hosts, and optionall Community Trap strings. This is an empty array by default.
  • snmp['syscontact']

    • String to set a name, and e-mail address for systems. Default is "Root root@localhost"
  • snmp['syslocationPhysical']

    • String to set the location for physical systems. Default is "Server Room".
  • snmp['syslocationVirtual']

    • String to set the location for Virtual Machines. Default is "Virtual Server".
  • snmp['full_systemview']

    • Boolean to include the full systemview. This defaults to "false" as many distributions ship this way to speed up snmpwalk. However, if you're running SNMP Network Management System, you'll want to override this as "true" on your systems.
  • snmp['include_all_disks']

    • Boolean to include disk usage checks for all filesystems. Default is "false"
  • snmp['all_disk_min']

    • Number of bytes that should be free on each disk when :include_all_disks is 'true.' Can also be expressed as a string specifying a minimum percent e.g. "10%". Default is 100 (100kB) which is the normal snmpd default.
  • snmp['disks']

    • Specify individual disks to monitor or, if monitoring all disks, specify different minimums. If set, the template expects this to be an array of hashes specifying the mount point of the disk to monitor and the minimum threshold in the form of {:mount => '/', :min => 100000}. As with :all_disk_min, :min can also be expressed as a percent. Default is an empty array.
  • snmp['load_average']

    • monitors the load average of the local system, specifying thresholds for the 1-minute, 5-minute and 15-minute averages. If set, the template expects this to be a hash specifying the minimum threshold in the form of { :max1 => '12', :max5 => '14', :max15 => '14'}. Default is nil
  • snmp['extend_scripts']

    • A hash that specifies extension scripts to the SNMP daemon. If set, the template will place these name => value pairs in the "Extend" section of the snmpd.conf file. The array must be in the format of { 'foo' => '/path/to/foo -arg', 'bar' => '/path/to/bar' }
  • snmp['snmpd']['mibdirs']

    • MIB directories. "/usr/share/snmp/mibs" is the default
  • snmp['snmpd']['mibs']

    • MIBs to load. The default is not to set any and is therefore dependant on the daemon default.
  • snmp['snmpd']['snmpd_run']

    • snmpd control (default of "yes" means start daemon)
  • snmp['snmpd']['snmpd_opts']

    • snmpd options
  • snmp['process_monitoring']['proc']

    • Array of processes to monitor. This is an empty array by default.
  • snmp['process_monitoring']['procfix']

    • Array of procfix lines to configure. This is an empty array by default.
    • These are run when a monitored process is in an error state.
  • snmp['snmpd']['trapd_run']

    • snmptrapd control (default of "no" means do not start daemon) master agentx support must be enabled in snmpd before snmptrapd can be run. See snmpd.conf(5) for how to do this.
  • snmp['snmpd']['trapd_opts']

    • snmptrapd options
  • snmp['snmpd']['snmpd_compat']

    • Create symlink on Debian legacy location to official RFC path Default is "yes".
  • snmp['disman_events']['enable']

    • Boolean value for enabling DisMan Event MIB configuration Default is false.
  • snmp['disman_events']['user'] and snmp['disman_events']['password']

    • String values for SNMPv3 credentials to set for the DisMan Event MIB to work.
  • snmp['disman_events']['linkUpDownNotifications']

    • String value which must be "yes" or "no" to enable traps for link state change notifications. Default is "yes".
  • snmp['disman_events']['defaultMonitors']

    • String value which must be "yes" or "no" to enable traps for the DisMan Event MIB default checks. See the snmpd.conf manual for details. Default is "yes".
  • snmp['disman_events']['monitors']

    • Array of string values for additional 'monitor' config entries. Default is an empty array.

Usage

Here is a full example featuring commonly overrided attributes. You can apply these override attributes in a role, or node context.

  override_attributes "snmp" => {
    "community" => "secret",
    "full_systemview" => true,
    "disks" => [{:mount => "/", :min => "10%"}],
    "load_average" => {:max1 => "24", :max5 => "12", :max15 => "6" },
    "trapsinks" => [ "zenoss.example.com", "nagios.example.com" ],
    "syslocationPhysical" => "Server Room",
    "syslocationVirtual" => "Cloud - Virtual Pool",
    "syscontact" => "sysadmin@example.com"
  }

Author and License

Author:: Eric G. Wolfe (eric.wolfe@gmail.com) endorse

Copyright 2010-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

hp-tools Applicable Versions

snmp cookbook CHANGELOG

v4.0.0

BREAKING CHANGE * Allow multiple sources and groups - Deprecate sources & sources6 keys - Added sec_name, sec_name6, groups['v1'], groups['v2c'] keys.

  • Added sysName to System contact information section
  • snmpd.conf should only be readable to root
  • Update various build files

v3.0.1

  • Missing newline in template, issue #28 reported by @indigo423

v3.0.0

@atomic-penguin * Update build files, and rubocopped.

@jhmartin * removed fqdn fron template.

@CBeerta * Added sources and sources6 attributes. * Added ipv6 listener.

Breaking changes:

@glensc * Change load_average from Array of Hashes, to Hash #27

v2.0.0

@MrMMorris * Add load average checks.

Breaking changes:

@themoore * Remove hardcoded extend scripts and is_dnsserver boolean. * Remove perl dependency. * Added extend_scripts hash for greater flexibility. #21

v1.1.0

@slashterix * Use default level over set #9

@odyssey4me contributed: * Array snmp['snmpd']['mibs'] to specify list of MIBs to load #12 * Arrays snmp['process_monitory']['proc'] and snmp['process_monitoring']['procfix'] for monitoring process table and corrective procfix commands. #13 * Attributessnmp['disman_events']` for SNMP Distributed Management #14

@sfiggins contributed: * Attributes snmp['include_all_disks'] (bool), snmp['all_disk_min'] (String for minimum kilobytes/percent free), and snmp['disks'] (Hash of mount points and/or minimum thresholds). #17

  • Corrected rubocop warnings.
  • Add chefspec/Remove minitest
  • Add basic BATS tests
  • Add erubis check for templates

v1.0.0

Add snmptrapd recipe, and add RHEL support. Template debian files. Add test-kitchen skeleton. Typos in platform_family case switches. Check for existence of dmi OHAI attribute, before checking in a condition. Correct minitest-spec file for Chef 11.x

v0.4.0

Add necessary setup for the HP System Management Homepage to be able to poll via @tas50 Add Suse support via @jackl0phty FC043: Prefer new notification syntax: ./recipes/default.rb:38

v0.3.1

Fix Gemfile for Travis.

Foodcritic warnings resolved

  • FC007: Ensure recipe dependencies are reflected in cookbook metadata

v0.3.0

Merge pull request #1 from gustavowt/master

  • Ubuntu package name fixes

Add test-kitchen scaffolding

  • Simple snmp::default test

Add TravisCI attribute sanity tests, and foodcritic linting.

Foodcritic warnings resolved

  • FC001: Use strings in preference to symbols to access node attributes
  • FC024: Consider adding platform equivalents

v0.2.0

Refactor SNMP cookbook

v0.1.0

  • Add Getopt::Declare dependency
  • Update metadata
  • Update documentation

v0.0.1

Add snmp cookbook.

Collaborator Number Metric
            

4.0.0 failed this metric

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

Contributing File Metric
            

4.0.0 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
            

4.0.0 failed this metric

FC064: Ensure issues_url is set in metadata: snmp/metadata.rb:1
FC065: Ensure source_url is set in metadata: snmp/metadata.rb:1
FC066: Ensure chef_version is set in metadata: snmp/metadata.rb:1
FC069: Ensure standardized license defined in metadata: snmp/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

4.0.0 passed this metric

No Binaries Metric
            

4.0.0 passed this metric

Publish Metric
            

4.0.0 failed this metric

snmp is up for adoption

Supported Platforms Metric
            

4.0.0 passed this metric

Testing File Metric
            

4.0.0 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
            

4.0.0 passed this metric