|
11 | 11 | # If your service uses basic authentication, you can optionally |
12 | 12 | # specify a username and password that will be used in the check. |
13 | 13 | # (it's set to guest/guest by RabbitMQ on setup) |
| 14 | +# $tag_families |
| 15 | +# Tag queues "families" based on regex match |
| 16 | +# $ssl_verify |
| 17 | +# Skip verification of the RabbitMQ management web endpoint |
| 18 | +# SSL certificate |
| 19 | +# $nodes |
| 20 | +# $nodes_regexes |
| 21 | +# Specify the nodes to collect metrics on (up to 100 nodes). |
| 22 | +# If you have less than 100 nodes, metrics will be collected on all nodes |
| 23 | +# by default. |
| 24 | +# $queues |
| 25 | +# $queues_regexes |
| 26 | +# Specify the queues to collect metrics on (up to 200 queues). |
| 27 | +# |
| 28 | +# If you have less than 200 queues, metrics will be collected on all queues |
| 29 | +# by default. |
| 30 | +# |
| 31 | +# If vhosts are set, set queue names as `vhost_name/queue_name` |
| 32 | +# |
| 33 | +# If `tag families` are enabled, the first capture group in the regex will |
| 34 | +# be used as the queue_family tag |
| 35 | +# $vhosts |
| 36 | +# List of vhosts to monitor with service checks. By default, a list of all |
| 37 | +# vhosts is fetched and each one will be checked using the aliveness API. |
14 | 38 | # |
15 | 39 | # Sample Usage: |
16 | 40 | # |
|
22 | 46 | # |
23 | 47 |
|
24 | 48 | class datadog_agent::integrations::rabbitmq ( |
25 | | - $url = undef, |
26 | | - $username = undef, |
27 | | - $password = undef, |
28 | | - $queues = undef, |
29 | | - $vhosts = undef, |
| 49 | + $url = undef, |
| 50 | + $username = 'guest', |
| 51 | + $password = 'guest', |
| 52 | + $ssl_verify = true, |
| 53 | + $tag_families = false, |
| 54 | + $nodes = [], |
| 55 | + $nodes_regexes = [], |
| 56 | + $queues = [], |
| 57 | + $queues_regexes = [], |
| 58 | + $vhosts = [], |
30 | 59 | ) inherits datadog_agent::params { |
| 60 | + |
| 61 | + validate_string($url) |
| 62 | + validate_string($username) |
| 63 | + validate_string($password) |
| 64 | + validate_bool($ssl_verify) |
| 65 | + validate_bool($tag_families) |
| 66 | + validate_array($nodes) |
| 67 | + validate_array($nodes_regexes) |
| 68 | + validate_array($queues) |
| 69 | + validate_array($queues_regexes) |
| 70 | + validate_array($vhosts) |
31 | 71 | include datadog_agent |
32 | 72 |
|
33 | 73 | file { "${datadog_agent::params::conf_dir}/rabbitmq.yaml": |
|
37 | 77 | mode => '0600', |
38 | 78 | content => template('datadog_agent/agent-conf.d/rabbitmq.yaml.erb'), |
39 | 79 | require => Package[$datadog_agent::params::package_name], |
40 | | - notify => Service[$datadog_agent::params::service_name] |
| 80 | + notify => Service[$datadog_agent::params::service_name], |
41 | 81 | } |
42 | 82 | } |
0 commit comments