|
5 | 5 | # Parameters: |
6 | 6 | # $url: |
7 | 7 | # The URL for consul |
| 8 | +# $catalog_checks: |
| 9 | +# Whether to perform checks against the Consul service Catalog |
| 10 | +# Optional. |
| 11 | +# $new_leader_checks: |
| 12 | +# Whether to enable new leader checks from this agent |
| 13 | +# Note: if this is set on multiple agents in the same cluster |
| 14 | +# you will receive one event per leader change per agent |
| 15 | +# $service_whitelist |
| 16 | +# Services to restrict catalog querying to |
| 17 | +# The default settings query up to 50 services. So if you have more than |
| 18 | +# this many in your Consul service catalog, you will want to fill in the |
| 19 | +# whitelist |
8 | 20 | # |
9 | 21 | # Sample Usage: |
10 | 22 | # |
11 | 23 | # class { 'datadog_agent::integrations::consul' : |
12 | 24 | # url => "http://localhost:8500" |
| 25 | +# catalog_checks => true, |
| 26 | +# new_leader_checks => false, |
13 | 27 | # } |
14 | 28 | # |
15 | 29 | class datadog_agent::integrations::consul( |
16 | | - $url = 'http://localhost:8500' |
| 30 | + $url = 'http://localhost:8500', |
| 31 | + $catalog_checks = true, |
| 32 | + $new_leader_checks = true, |
| 33 | + $service_whitelist = [] |
17 | 34 | ) inherits datadog_agent::params { |
18 | 35 |
|
| 36 | + validate_string($url) |
| 37 | + validate_bool($catalog_checks) |
| 38 | + validate_bool($new_leader_checks) |
| 39 | + validate_array($service_whitelist) |
| 40 | + |
19 | 41 | file { "${datadog_agent::params::conf_dir}/consul.yaml": |
20 | 42 | ensure => file, |
21 | 43 | owner => $datadog_agent::params::dd_user, |
|
0 commit comments