Last active
December 18, 2019 16:08
-
-
Save b4ldr/2350a8bc6c790f2b3abc7fb3211c106e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": { ... } | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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