Skip to content

Commit

Permalink
Control snmp listen in observium
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-robertson committed May 24, 2024
1 parent 36994e7 commit 4f12625
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions data/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ observium::snmpv3_authpass: "setme1234"
observium::snmpv3_authalgo: "SHA"
observium::snmpv3_cryptopass: "setme1234"
observium::snmpv3_cryptoalgo: "AES"
observium::snmpd_agentaddress:
- udp:127.0.0.1:161
- udp6:[::1]:161
observium::mib_locations:
- /opt/observium/mibs/rfc
- /opt/observium/mibs/net-snmp
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@
Enum['SHA','MD5'] $snmpv3_authalgo,
String $snmpv3_cryptopass,
Enum['AES','DES'] $snmpv3_cryptoalgo,
Array $snmpd_agentaddress, # need to document if this stays in module
Array $mib_locations,
Array $additional_mib_location = [],
Array $additional_snmp_conf_options = [],
Expand Down
1 change: 1 addition & 0 deletions manifests/snmp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# Setup SNMP class with snmpv3 user
class { 'snmp':
snmpd_config => ["rouser ${observium::snmpv3_authname} ${observium::snmpv3_authlevel}"],
agentaddress => $observium::snmpd_agentaddress,
service_config_dir_group => $ubuntu2004user,
service_config_dir_owner => $ubuntu2004user,
varnetsnmp_owner => $ubuntu2004user,
Expand Down
2 changes: 1 addition & 1 deletion spec/data/common.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
snmp::agentaddress:
observium::snmpd_agentaddress:
- udp:127.0.0.1:161

0 comments on commit 4f12625

Please sign in to comment.