Merge "Delete SNMP Host-Based entries."
This commit is contained in:
commit
cdaa186622
@ -103,7 +103,6 @@ class platform::firewall::calico::oam::services {
|
||||
# udp
|
||||
$sm_port = [2222, 2223]
|
||||
$ntp_port = [123]
|
||||
$snmp_port = [161, 162]
|
||||
$ptp_port = [319, 320]
|
||||
|
||||
# tcp
|
||||
@ -153,7 +152,7 @@ class platform::firewall::calico::oam::services {
|
||||
}
|
||||
|
||||
$t_ip_version = $ip_version
|
||||
$t_udp_ports = concat($sm_port, $ntp_port, $snmp_port, $ptp_port)
|
||||
$t_udp_ports = concat($sm_port, $ntp_port, $ptp_port)
|
||||
$t_tcp_ports = concat($ssh_port,
|
||||
$fm_port, $nfv_vim_port, $patching_port, $sysinv_port, $sm_api_port,
|
||||
$kube_apiserver_port, $docker_registry_port, $docker_token_port,
|
||||
|
@ -1,28 +0,0 @@
|
||||
class platform::snmp::params (
|
||||
$community_strings = [],
|
||||
$trap_destinations = [],
|
||||
$system_name = '',
|
||||
$system_location = '?',
|
||||
$system_contact = '?',
|
||||
$system_info = '',
|
||||
$software_version = '',
|
||||
) { }
|
||||
|
||||
class platform::snmp::runtime
|
||||
inherits ::platform::snmp::params {
|
||||
|
||||
$software_version = $::platform::params::software_version
|
||||
$system_info = $::system_info
|
||||
|
||||
file { '/etc/snmp/snmpd.conf':
|
||||
ensure => 'present',
|
||||
replace => true,
|
||||
content => template('platform/snmpd.conf.erb')
|
||||
}
|
||||
|
||||
# send HUP signal to snmpd if it is running
|
||||
-> exec { 'notify-snmp':
|
||||
command => '/usr/bin/pkill -HUP snmpd',
|
||||
onlyif => 'ps -ef | pgrep snmpd'
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
[snmp]
|
||||
<%- @trap_destinations.each do |destination| -%>
|
||||
trap2sink=<%= destination %>
|
||||
<%- end -%>
|
||||
|
||||
|
@ -61,7 +61,6 @@ rewrite r_rewrite_set{
|
||||
set("<%= @system_name %> syslog ${HOST}", value("HOST") condition(filter(f_syslog)));
|
||||
set("<%= @system_name %> user.log ${HOST}", value("HOST") condition(filter(f_user)));
|
||||
set("<%= @system_name %> uucp.log ${HOST}", value("HOST") condition(filter(f_uucp)));
|
||||
set("<%= @system_name %> snmp-api.log ${HOST}", value("HOST") condition(filter(f_snmpat)));
|
||||
# Most logs write log level to the message field. some writes it to the PRIORITY field
|
||||
# The priority field is not sent remotely. This is because tcp/udp destinations don't
|
||||
# work well with templates, which we use to write the priority field to log files on the
|
||||
|
@ -1,33 +0,0 @@
|
||||
###########################################################################
|
||||
#
|
||||
# snmpd.conf
|
||||
#
|
||||
# - This file is managed by Puppet. DO NOT EDIT.
|
||||
#
|
||||
###########################################################################
|
||||
# incl/excl subtree mask
|
||||
view all included .1 80
|
||||
|
||||
sysDescr <%= @software_version %> <%= @system_info %>
|
||||
sysObjectID 1.3.6.1.4.1.731.3
|
||||
sysContact <%= @system_contact %>
|
||||
sysName <%= @system_name %>
|
||||
sysLocation <%= @system_location %>
|
||||
sysServices 72
|
||||
|
||||
[snmp] clientaddr oamcontroller
|
||||
dlmod cgtsAgentPlugin /usr/lib64/libcgtsAgentPlugin.so.1
|
||||
dlmod snmpAuditPlugin /usr/lib64/libsnmpAuditPlugin.so.1
|
||||
|
||||
# Insert the snmpAudit hander into specific sections of the mib tree
|
||||
injectHandler snmpAudit null
|
||||
injectHandler snmpAudit bulk_to_next
|
||||
<%- @community_strings.each do |community| -%>
|
||||
rocommunity <%= community %>
|
||||
rocommunity6 <%= community %>
|
||||
<%- end -%>
|
||||
<%- @trap_destinations.each do |destination| -%>
|
||||
trap2sink <%= destination %>
|
||||
<%- end -%>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user