Skip to content

Commit

Permalink
Merge pull request #167 from Dan33l/use-puppet-string
Browse files Browse the repository at this point in the history
use puppet strings format for reference
  • Loading branch information
Dan33l authored Nov 11, 2018
2 parents c923778 + 6150b41 commit acef1b8
Show file tree
Hide file tree
Showing 6 changed files with 769 additions and 512 deletions.
281 changes: 1 addition & 280 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,286 +245,7 @@ rocommunity shibboleth 1.2.3.4/32

## Reference

### Classes

* [`snmp`](#class-snmp): Installs the Net-SNMP software.
* [`snmp::client`](#class-snmpclient): Separately installs the Net-SNMP client software. Can be called from `Class['snmp']`.

### Defines

* [`snmp::snmpv3_user`](#define-snmpsnmpv3_user): Creates a SNMPv3 user with authentication and encryption paswords.

### Class: `snmp`

#### Parameters

The following parameters are available in the `::snmp` class:

##### `agentaddress`
An array of addresses, on which snmpd will listen for queries.
Default: [ udp:127.0.0.1:161, udp6:[::1]:161 ]

##### `snmptrapdaddr`
An array of addresses, on which snmptrapd will listen to receive incoming SNMP notifications.
Default: [ udp:127.0.0.1:162, udp6:[::1]:162 ]

##### `ro_community`
Read-only (RO) community string or array for snmptrap daemon.
Default: public

##### `ro_community6`
Read-only (RO) community string or array for IPv6.
Default: public

##### `rw_community`
Read-write (RW) community string or array.
Default: none

##### `rw_community6`
Read-write (RW) community string or array for IPv6.
Default: none

##### `ro_network`
Network that is allowed to RO query the daemon. Can be string or array.
Default: 127.0.0.1

##### `ro_network6`
Network that is allowed to RO query the daemon via IPv6. Can be string or array.
Default: ::1/128

##### `rw_network`
Network that is allowed to RW query the daemon. Can be string or array.
Default: 127.0.0.1

##### `rw_network6`
Network that is allowed to RW query the daemon via IPv6. Can be string or array.
Default: ::1/128

##### `contact`
Responsible person for the SNMP system.
Default: Unknown

##### `location`
Location of the SNMP system.
Default: Unknown

##### `sysname`
Name of the system (hostname).
Default: ${::fqdn}

##### `services`
For a host system, a good value is 72 (application + end-to-end layers).
Default: 72

##### `com2sec`
An array of VACM com2sec mappings. Must provide SECNAME, SOURCE and COMMUNITY. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details.
Default: [ "notConfigUser default public" ]

##### `com2sec6`
An array of VACM com2sec6 mappings. Must provide SECNAME, SOURCE and COMMUNITY. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details.
Default: [ "notConfigUser default ${ro_community}" ]

##### `groups`
An array of VACM group mappings. Must provide GROUP, {v1|v2c|usm|tsm|ksm}, SECNAME. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details.
Default: [ 'notConfigGroup v1 notConfigUser', 'notConfigGroup v2c notConfigUser' ]

##### `views`
An array of views that are available to query. Must provide VNAME, TYPE, OID, and [MASK]. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details.
Default: [ 'systemview included .1.3.6.1.2.1.1', 'systemview included .1.3.6.1.2.1.25.1.1' ]

##### `accesses`
An array of access controls that are available to query. Must provide GROUP, CONTEXT, {any|v1|v2c|usm|tsm|ksm}, LEVEL, PREFX, READ, WRITE, and NOTIFY. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbAL for details.
Default: [ 'notConfigGroup "" any noauth exact systemview none none' ]

##### `dlmod`
Array of dlmod lines to add to the snmpd.conf file. Must provide NAME and PATH (ex. "cmaX /usr/lib64/libcmaX64.so"). See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbBD for details.
Default: []

##### `extends`
Array of extend lines to add to the snmpd.conf file. Must provide NAME, PROG and ARG. See http://www.net-snmp.org/docs/man/snmpd.conf.html#lbBA for details.
Default: []

##### `snmpd_config`
Safety valve. Array of lines to add to the snmpd.conf file. See http://www.net-snmp.org/docs/man/snmpd.conf.html for all options.
Default: []

##### `disable_authorization`
Disable all access control checks. (yes|no)
Default: no

##### `do_not_log_traps`
Disable the logging of notifications altogether. (yes|no)
Default: no

##### `do_not_log_tcpwrappers`
Disable the logging of tcpwrappers messages, e.g. "Connection from UDP: " messages in syslog. (yes|no)
Default: no

##### `trap_handlers`
An array of programs to invoke on receipt of traps. Must provide OID and PROGRAM (ex. "IF-MIB::linkDown /bin/traps down"). See http://www.net-snmp.org/docs/man/snmptrapd.conf.html#lbAI for details.
Default: []
Affects snmptrapd.conf

##### `trap_forwards`
An array of destinations to send to on receipt of traps. Must provide OID and DESTINATION (ex. "IF-MIB::linkUp udp:1.2.3.5:162"). See http://www.net-snmp.org/docs/man/snmptrapd.conf.html#lbAI for details.
Default: []
Affects snmptrapd.conf

##### `snmptrapd_config`
Safety valve. Array of lines to add to the snmptrapd.conf file. See http://www.net-snmp.org/docs/man/snmptrapd.conf.html for all options.
Default: []
Affects snmptrapd.conf

##### `manage_client`
Whether to install the Net-SNMP client package. (true|false)
Default: false

##### `snmp_config`
Safety valve. Array of lines to add to the client's global snmp.conf file. See http://www.net-snmp.org/docs/man/snmp.conf.html for all options.
Default: []
Affects snmp.conf

##### `ensure`
Ensure if present or absent.
Default: present

##### `autoupgrade`
Upgrade package automatically, if there is a newer version.
Default: false

##### `package_name`
Name of the package. Only set this if your platform is not supported or you know what you are doing.
Default: auto-set, platform specific

##### `snmpd_options`
Commandline options passed to snmpd via init script.
Default: auto-set, platform specific

##### `service_ensure`
Ensure if service is running or stopped.
Default: running

##### `service_name`
Name of SNMP service Only set this if your platform is not supported or you know what you are doing.
Default: auto-set, platform specific

##### `service_enable`
Start service at boot.
Default: true

##### `service_hasstatus`
Service has status command.
Default: true

##### `service_hasrestart`
Service has restart command.
Default: true

##### `snmptrapd_options`
Commandline options passed to snmptrapd via init script.
Default: auto-set, platform specific

##### `trap_service_ensure`
Ensure if service is running or stopped.
Default: stopped

##### `trap_service_name`
Name of SNMP service Only set this if your platform is not supported or you know what you are doing.
Default: auto-set, platform specific

##### `trap_service_enable`
Start service at boot.
Default: true

##### `trap_service_hasstatus`
Service has status command.
Default: true

##### `trap_service_hasrestart`
Service has restart command.
Default: true

##### `openmanage_enable`
Adds the smuxpeer directive to the snmpd.conf file to allow net-snmp to talk with Dell's OpenManage.
Default: false

##### `master`
Allow setting the *master* option, typically to enable AgentX registrations.
Default: false

##### `agentx_perms`
Defines the permissions and ownership of the AgentX Unix Domain socket.
Default: none

##### `agentx_ping_interval`
This will make the subagent try and reconnect every NUM seconds to the master if it ever becomes (or starts) disconnected.
Default: none

##### `agentx_socket`
Defines the address the master agent listens at, or the subagent should connect to.
Default: none

##### `agentx_timeout`
Defines the timeout period (NUM seconds) for an AgentX request.
Default: 1

##### `agentx_retries`
Defines the number of retries for an AgentX request.
Default: 5

### Class: `snmp::client`

#### Parameters

The following parameters are available in the `::snmp::client` class:

#### `snmp_config`
Array of lines to add to the client's global snmp.conf file. See http://www.net-snmp.org/docs/man/snmp.conf.html for all options.
Default: []

#### `ensure`
Ensure if present or absent.
Default: present

#### `autoupgrade`
Upgrade package automatically, if there is a newer version.
Default: false

#### `package_name`
Name of the package. Only set this if your platform is not supported or you know what you are doing.
Default: auto-set, platform specific


### Define: `snmp::snmpv3_user`

#### Parameters

The following parameters are available in the `::snmp::snmpv3_user` define:

#### `title`
Name of the user.
Required

#### `authpass`
Authentication password for the user.
Required

#### `authtype`
Authentication type for the user. SHA or MD5
Default: SHA

#### `privpass`
Encryption password for the user.
Default: no encryption password

#### `privtype`
Encryption type for the user. AES or DES
Default: AES

#### `daemon`
Which daemon file in which to write the user. snmpd or snmptrapd
Default: snmpd

See in file [REFERENCE.md](REFERENCE.md).

## Limitations

Expand Down
Loading

0 comments on commit acef1b8

Please sign in to comment.