Skip to content

Instantly share code, notes, and snippets.

@b4ldr
Last active December 18, 2019 16:08
Show Gist options
  • Save b4ldr/2350a8bc6c790f2b3abc7fb3211c106e to your computer and use it in GitHub Desktop.
Save b4ldr/2350a8bc6c790f2b3abc7fb3211c106e to your computer and use it in GitHub Desktop.
class fastnetmon (
Hash $policy_defaults = {}
Hash $policy_overrides = {}
Array[Stdlib::IP::Address,1] $networks = [],
Array[Stdlib::IP::Address,1] $all_networks = [],
Optional[Stdlib::Host] $graphite_host = undef,
) {
$policy_overrides.each |String $network| {
$network = slice_network_constants($network['network'], {'desription' => '$network['desrciption']})
file {"etc/fastnetmodn.d/$network_$network['description'].conf": { ... }
}
}
profile::fastnetmon:
ban_for_pps:
ban_for_flows:
threshold_pps:
....
profile::policy_overrides:
- slice:
network: production
desrciption: analytics
policy:
threshold_pps:
- slice:
network: production
desrciption: analytics
policy:
threshold_pps:
class profile::fastnetmon (
Hash $policy_defaults = {}
Hash $policy_overrides = {}
) {
include network::constants
class { '::fastnetmon':
networks => $::network::constants::external_networks,
all_networks => $::network::constants::all_network_subnets,
policy_defaults => $policy_defaults,
policy_overrides => $policy_overrides,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment