Forge Home

simple_snmp

Simple snmpd configuration

6,998 downloads

4,883 latest version

5.0 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.8 (latest)
  • 0.1.7
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jan 2nd 2019
This version is compatible with:
  • Puppet Enterprise >= 4.0.0
  • Puppet >= 4.0.0
  • ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'vacosta-simple_snmp', '0.1.8'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add vacosta-simple_snmp
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install vacosta-simple_snmp --version 0.1.8

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: snmp, snmpd

Documentation

vacosta/simple_snmp — version 0.1.8 Jan 2nd 2019

snmp

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup
  4. Usage 4.1 Parameters
  5. Reference
  6. Limitations
  7. Development

Overview

Module to configure snmpd server on RedHat 5/6/7, CentOS 5/6/7, Suse 11,12

Module Description

This module allows administrator to configure a basic snmpd server with:

  • a Read Only community
  • a Read Write community
  • Filter Read Only source
  • Filter Read Write source
  • Filter Read Only view
  • Filter Read Write view
  • Enable/Disable connection log
  • Configure observium's distro script
  • Enable/Disable RO and RW access
  • Define System location
  • Define System administrator

Setup

puppet module vacosta-simple_snmp

Usage

node node.example.com {
        class { 'simple_snmp':
                ro_community => "SecureString",
                ro_source => "192.168.1.0/24",
                rw_community => "VerySecureString",
                rw_source => "192.168.1.2/32",
                rw_enable => true,
                enable_observium_distro => true,
                contact_name => "Victor Acosta",
                contact_mail => "support@example.com"
        }
}
node node.example.com {
        class { 'simple_snmp':
                ro_community => "SecureString",
                ro_source => "192.168.1.0/24",
                rw_enable => false
        }
}

Parameters

log_connection: Enable or disable connection logs

Default: true

ro_community: Read Only community

Default: "SecureString"

rw_community: Read Write community

Default: "VerySecureString"

ro_source: Read Only source

Default: "0.0.0.0/0"

rw_source: Read Write source

Default: "127.0.0.1/32"

ro_view: Read Only view

Default: ".1"

rw_view: Read Write view

Default: ".1"

rw_enable: Enable or Disable Read Write access

Default: false

ro_enable: Enable or Disable Read Only access

Default: true

syslocation: System location

Default: "A beautiful DataCenter"

contact_name: Administrator name

Default: "sysadmin"

contact_mail: Administrator mail

Default: "sysadmin@example.com"

enable_observium_distro: Enable or disable observium's distro script

Default: false

simple_snmp_enable: Enable or disable this module, if false, this module will do nothing

Default: true

Reference

With this definition

node node.example.com {
        class { 'simple_snmp':
                ro_community => "SecureString",
                ro_source => "192.168.1.0/24",
                rw_community => "VerySecureString",
                rw_source => "192.168.1.2/32",
                rw_enable => true,
                enable_observium_distro => true,
                contact_name => "Victor Acosta",
                contact_mail => "support@example.com"
        }
}

The module will configure the /etc/snmp/snmpd.conf as follow:

syslocation A beautiful DataCenter
syscontact Victor Acosta <support@example.com>
rwcommunity VerySecureString 192.168.1.2/32 .1
rocommunity SecureString 192.168.1.0/24 .1
dontLogTCPWrappersConnects true
extend .1.3.6.1.4.1.2021.7890.1 distro /usr/local/bin/distro

Also copies the distro script to the server (only if enable_observium_distro => true), then start and enables the snmpd service

Limitations

Puppet > 4.0 RHEL 5/6/7 CentOS 5/6/7 Suse 11/12

Development

What's next:

  • More than one ro_community and rw_community