Version information
This version is compatible with:
- Puppet Enterprise 3.x
- Puppet >=2.7.20 <4.0.0
- , , , , , ,
This module has been deprecated by its author since Dec 10th 2018.
The author has suggested puppet-snmp as its replacement.
Start using this module
Documentation
Puppet Net-SNMP Module
master branch: develop branch:
Introduction
This module manages the installation of Net-SNMP client, server, and trap server. It also can create a SNMPv3 user with authentication and privacy passwords.
Actions:
- Installs the SNMP client package and configuration.
- Installs the SNMP daemon package, service, and configuration.
- Installs the SNMP trap daemon service and configuration.
- Creates a SNMPv3 user with authentication and encryption paswords.
OS Support:
- RedHat family - tested on CentOS 5.9 and CentOS 6.4
- SuSE family - tested on SLES 11 SP1
- Debian family - tested on Ubuntu 12.04.2 LTS, Debian 6.0.7, and Debian 7.0
- FreeBSD family - tested on FreeBSD 9.2-RELEASE, FreeBSD 10.0-RELEASE
Class documentation is available via puppetdoc.
Examples
To install the SNMP service:
class { 'snmp':
agentaddress => [ 'udp:161', ],
ro_community => 'notpublic',
ro_network => '10.20.30.40/32',
contact => 'root@yourdomain.org',
location => 'Phoenix, AZ',
}
To install the SNMP service and the client:
class { 'snmp':
manage_client => true,
snmp_config => [ 'defVersion 2c', 'defCommunity public', ],
}
If you just want to install the SNMP client:
class { 'snmp::client':
snmp_config => [ 'mibdirs +/usr/local/share/snmp/mibs', ],
}
Only configure and run the snmptrap daemon:
class { 'snmp':
snmptrapdaddr => [ 'udp:162', ],
ro_community => 'SeCrEt',
service_ensure => 'stopped',
trap_service_ensure => 'running',
trap_service_enable => true,
trap_handlers => [
'default /usr/bin/perl /usr/bin/traptoemail me@somewhere.local',
'TRAP-TEST-MIB::demo-trap /home/user/traptest.sh demo-trap',
],
trap_forwards => [ 'default udp:55.55.55.55:162' ],
}
To install a SNMP version 3 user for snmpd:
snmp::snmpv3_user { 'myuser':
authpass => '1234auth',
privpass => '5678priv',
}
class { 'snmp':
snmpd_config => [ 'rouser myuser authPriv' ],
}
To install a SNMP version 3 user for snmptrapd:
snmp::snmpv3_user { 'myuser':
authpass => 'SeCrEt',
privpass => 'PhRaSe',
daemon => 'snmptrapd',
}
Notes
- Only tested on CentOS 5.9, CentOS 6.4, Ubuntu 12.04.2 LTS, Debian squeeze, and Debian wheezy x86_64.
- SNMPv3 user auth is not yet tested on Debian or Suse osfamilies.
- There is a bug on Debian squeeze of net-snmp's status script. If snmptrapd is
not running the status script returns 'not running' so puppet restarts the
snmpd service. The following is a workaround:
class { 'snmp': service_hasstatus => false, trap_service_hasstatus => false, }
- For security reasons, the SNMP daemons are configured to listen on the loopback
interface (127.0.0.1). Use
agentaddress
andsnmptrapdaddr
to change this configuration.
Issues
- Debian will not support the use of non-numeric OIDs. Something about rabid freedom.
TODO
- Figure out how to install the RFC-standard MIBS on Debian so that
snmpwalk -v 2c -c public localhost system
will function. - Possibly support USM and VACM?
Deprecation Warning
The classes snmp::server
and snmp::trapd
will be merged into class snmp
in
version 3.0.0 of this module. All of their class parameters will be made
available in the snmp
class.
The paramter install_client
will be renamed to manage_client
in version
4.0.0 of this module.
Contributing
Please see DEVELOP.md for contribution information.
License
Please see LICENSE file.
Copyright
Copyright (C) 2012 Mike Arnold mike@razorsedge.org
2014-10-06 Michael Arnold github@razorsedge.org - 3.2.0
Michael Arnold github@razorsedge.org (12):
-
Update Geppetto .project to version 4.
-
Allow tracking of metadata.json.
-
Expand Puppet versions tested in Travis-CI.
-
Fix lint indentation warnings.
-
Switch to using metadata.json vs Modulefile.
-
Add missing dependency values to metadata.json.
-
Change the order of the tags in metadata.json.
-
Rename install_client param to manage_client.
-
Remove rspec test for deprecation warning.
-
Allow for setting sysName.
-
Update to newer Gemfile, Rakefile, and spec_helper.
-
Update versions for 3.2.0 release.
Sebastian Brückner sebbrueckner@gmail.com (1):
-
Fix variable names to be lowercase for future parser compatibility.
2014-05-25 Michael Arnold github@razorsedge.org - 3.1.0
Michael Arnold github@razorsedge.org (7):
-
Add contribution instructions to README.md.
-
Convert fixtures repositories to use https.
-
Expand Puppet versions tested in Travis-CI.
-
Add compatibility data to the module.
-
Update README.md with details about issue #9.
-
Update Modulefile source to use https.
-
Update versions for 3.1.0 release.
Hunter Satterwhite hsatterwhite@webassign.net (6):
-
Added FreeBSD support
-
Fixed service config path
-
Added variable for group ownership for snmpd.conf/snmptrapd.conf
-
Added spec test for FreeBSD
-
Updated README.md
-
snmp client test for FreeBSD
Clint Miller clintmiller@mac.com (1):
-
Create 'services' parameter to snmp class
Steve Maddison steve@cosam.org (1):
-
Support for custom VACM com2sec and group mappings.
2013-07-13 Michael Arnold github@razorsedge.org - 3.0.0
Michael Arnold github@razorsedge.org (31):
-
Clarify that this module installs the Net-SNMP software.
-
Fix README.md title.
-
Remove the dependency on LSB facts.
-
Major refactor of server/trap/client classes.
-
Templatize config files.
-
Update example config files.
-
Convert the remaining parameters to support ENC.
-
Fix README.md markdown.
-
Squash bugs via live testing.
-
Fix trapd service on Debian.
-
Add more Puppet tests.
-
Add more rspec tests.
-
Added Suse osfamily support.
-
Renamed files directory to be samples.
-
Fix arrow alignment to make lint happy.
-
Add support for sysservices.
-
Rake validate to also check ERB for syntax errors.
-
Add support for dlmod.
-
Implement configuration safety valves.
-
Add agentaddress and snmptrapdaddr parameters.
-
Refactor SNMP configs.
-
Enhanced snmpv3_user to also create snmptrapd users.
-
Expand Puppet versions tested in Travis-CI.
-
Fix an Rspec error seen on Ruby 1.9.3+.
-
Fix wyrie-trapd_extended additions to support ENC.
-
Rename snmp_trap_addr to snmptrapdaddr.
-
Make agentaddress an array like snmptrapdaddr.
-
Standardize parameter->template results.
-
Remove git-log-to-changelog from Modulefile.
-
Update README.md with new changes.
-
Update versions for 3.0.0 release.
Scott Barr scott@barr.co.za (3):
-
- Extend functionality by adding class parameters: snmp_trap_addr
disable_authorization do_not_log_traps
- Extend functionality by adding class parameters: snmp_trap_addr
-
The trap_handlers class parameter accepts any values and is directly outputted to the template, essentially allowing any value to be written to file. Prefix each value in trap_handler with 'traphandle' for a more expected/sane result.
-
Added forwards for notification processing.
2013-06-22 Michael Arnold github@razorsedge.org - 2.0.0
Michael Arnold github@razorsedge.org (20):
-
Fix Ubuntu support to pass lint
-
Update Travis-CI config file to test 2.7.18
-
Update rspec tests for new rspec version.
-
Initial Ubuntu support rspec tests
-
Converted to puppetlabs_spec_helper.
-
Updated .travis.yml and .gemfile.
-
Add CHANGELOG generation during module build.
-
Lint: fix variable not enclosed in {}.
-
Fix Ubuntu support to pass lint
-
Initial Ubuntu support rspec tests
-
Do not install File['snmptrapd.sysconfig'] on Debian.
-
Add files/snmpd.sysconfig-Debian-12.
-
Initial Debian support rspec tests.
-
Clean up Notes section of README.md.
-
Use ::osfamily instead of ::operatingsystem.
-
Convert template variables to be local.
-
Added deprecation warnings in README.md.
-
Fix support for snmptrapd on Debian.
-
Update README.md.
-
Update versions for 2.0.0 release.
Endre Karlson endre.karlson@gmail.com (2):
-
Add Ubuntu support and fix indent
-
Add Ubuntu support and fix indent
Jonathan Owens jonathan@newrelic.com (2):
-
Allow overriding the list of views and accesses.
-
Allow specifying traphandlers for trapd.
Santiago Piccinini spiccinini@codigosur.org (1):
-
Added initial support for Debian
2012-07-15 Michael Arnold github@razorsedge.org - 1.0.2
Michael Arnold github@razorsedge.org (1):
-
Bump module version for Puppet Forge release
Steve Huff shuff@vecna.org (1):
-
modified templates to dereference class parameters
2012-05-26 Michael Arnold github@razorsedge.org - 1.0.1
Michael Arnold github@razorsedge.org (1):
- Change github account to razorsedge
2012-05-06 Michael Arnold github@razorsedge.org - 1.0.0
Dependencies
- puppetlabs/stdlib (>=2.3.0)
Copyright (C) 2012 Mike Arnold <mike@razorsedge.org> 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.