|
99 | 99 | # rabbitmq_ssl_cert_chain are set, then this is enabled automatically. Set rabbitmq_ssl => true
|
100 | 100 | # without specifying a private key or cert chain to use SSL transport, but not cert auth.
|
101 | 101 | # Defaul: false
|
| 102 | +# Valid values: true, false |
102 | 103 | #
|
103 | 104 | # [*rabbitmq_ssl_private_key*]
|
104 | 105 | # String. Private key to be used by sensu to connect to rabbitmq
|
|
110 | 111 | # If the value starts with 'puppet://' the file will be copied and used. Absolute paths will just be used
|
111 | 112 | # Default: undef
|
112 | 113 | #
|
| 114 | +# [*rabbitmq_reconnect_on_error*] |
| 115 | +# Boolean. In the event the connection or channel is closed by RabbitMQ, attempt to automatically |
| 116 | +# reconnect when possible. Default set to fault its not guaranteed to successfully reconnect. |
| 117 | +# Default: false |
| 118 | +# Valid values: true, false |
| 119 | +# |
113 | 120 | # [*redis_host*]
|
114 | 121 | # String. Hostname of redis to be used by sensu
|
115 | 122 | # Default: localhost
|
|
122 | 129 | # String. Password to be used to connect to Redis
|
123 | 130 | # Default: undef
|
124 | 131 | #
|
| 132 | +# [*reddis_reconnect_on_error*] |
| 133 | +# Boolean. In the event the connection or channel is closed by Reddis, attempt to automatically |
| 134 | +# reconnect when possible. Default set to fault its not guaranteed to successfully reconnect. |
| 135 | +# Default: false |
| 136 | +# Valid values: true, false |
| 137 | +# |
125 | 138 | # [*api_bind*]
|
126 | 139 | # String. IP to bind api service
|
127 | 140 | # Default: 0.0.0.0
|
| 141 | +# |
128 | 142 | # [*api_host*]
|
129 | 143 | # String. Hostname of the sensu api service
|
130 | 144 | # Default: localhost
|
|
198 | 212 | # Valid values: debug, info, warn, error, fatal
|
199 | 213 | #
|
200 | 214 | class sensu (
|
201 |
| - $version = 'latest', |
202 |
| - $sensu_plugin_name = 'sensu-plugin', |
203 |
| - $sensu_plugin_provider = undef, |
204 |
| - $sensu_plugin_version = 'absent', |
205 |
| - $install_repo = true, |
206 |
| - $repo = 'main', |
207 |
| - $repo_source = undef, |
208 |
| - $repo_key_id = '7580C77F', |
209 |
| - $repo_key_source = 'http://repos.sensuapp.org/apt/pubkey.gpg', |
210 |
| - $client = true, |
211 |
| - $server = false, |
212 |
| - $api = false, |
213 |
| - $manage_services = true, |
214 |
| - $manage_user = true, |
215 |
| - $manage_plugins_dir = true, |
216 |
| - $rabbitmq_port = 5672, |
217 |
| - $rabbitmq_host = 'localhost', |
218 |
| - $rabbitmq_user = 'sensu', |
219 |
| - $rabbitmq_password = '', |
220 |
| - $rabbitmq_vhost = 'sensu', |
221 |
| - $rabbitmq_ssl = false, |
222 |
| - $rabbitmq_ssl_private_key = undef, |
223 |
| - $rabbitmq_ssl_cert_chain = undef, |
224 |
| - $redis_host = 'localhost', |
225 |
| - $redis_port = 6379, |
226 |
| - $redis_password = undef, |
227 |
| - $api_bind = '0.0.0.0', |
228 |
| - $api_host = 'localhost', |
229 |
| - $api_port = 4567, |
230 |
| - $api_user = undef, |
231 |
| - $api_password = undef, |
232 |
| - $subscriptions = [], |
233 |
| - $client_bind = '127.0.0.1', |
234 |
| - $client_address = $::ipaddress, |
235 |
| - $client_name = $::fqdn, |
236 |
| - $client_custom = {}, |
237 |
| - $client_keepalive = {}, |
238 |
| - $safe_mode = false, |
239 |
| - $plugins = [], |
240 |
| - $plugins_dir = undef, |
241 |
| - $purge_config = false, |
242 |
| - $purge_plugins_dir = false, |
243 |
| - $use_embedded_ruby = false, |
244 |
| - $rubyopt = '', |
245 |
| - $gem_path = '', |
246 |
| - $log_level = 'info', |
247 |
| - $dashboard = false, |
| 215 | + $version = 'latest', |
| 216 | + $sensu_plugin_name = 'sensu-plugin', |
| 217 | + $sensu_plugin_provider = undef, |
| 218 | + $sensu_plugin_version = 'absent', |
| 219 | + $install_repo = true, |
| 220 | + $repo = 'main', |
| 221 | + $repo_source = undef, |
| 222 | + $repo_key_id = '7580C77F', |
| 223 | + $repo_key_source = 'http://repos.sensuapp.org/apt/pubkey.gpg', |
| 224 | + $client = true, |
| 225 | + $server = false, |
| 226 | + $api = false, |
| 227 | + $manage_services = true, |
| 228 | + $manage_user = true, |
| 229 | + $manage_plugins_dir = true, |
| 230 | + $rabbitmq_port = 5672, |
| 231 | + $rabbitmq_host = 'localhost', |
| 232 | + $rabbitmq_user = 'sensu', |
| 233 | + $rabbitmq_password = '', |
| 234 | + $rabbitmq_vhost = 'sensu', |
| 235 | + $rabbitmq_ssl = false, |
| 236 | + $rabbitmq_ssl_private_key = undef, |
| 237 | + $rabbitmq_ssl_cert_chain = undef, |
| 238 | + $rabbitmq_reconnect_on_error = false, |
| 239 | + $redis_host = 'localhost', |
| 240 | + $redis_port = 6379, |
| 241 | + $redis_password = undef, |
| 242 | + $redis_reconnect_on_error = false, |
| 243 | + $api_bind = '0.0.0.0', |
| 244 | + $api_host = 'localhost', |
| 245 | + $api_port = 4567, |
| 246 | + $api_user = undef, |
| 247 | + $api_password = undef, |
| 248 | + $subscriptions = [], |
| 249 | + $client_bind = '127.0.0.1', |
| 250 | + $client_address = $::ipaddress, |
| 251 | + $client_name = $::fqdn, |
| 252 | + $client_custom = {}, |
| 253 | + $client_keepalive = {}, |
| 254 | + $safe_mode = false, |
| 255 | + $plugins = [], |
| 256 | + $plugins_dir = undef, |
| 257 | + $purge_config = false, |
| 258 | + $purge_plugins_dir = false, |
| 259 | + $use_embedded_ruby = false, |
| 260 | + $rubyopt = '', |
| 261 | + $gem_path = '', |
| 262 | + $log_level = 'info', |
| 263 | + $dashboard = false, |
248 | 264 | ){
|
249 | 265 |
|
250 |
| - validate_bool($client, $server, $api, $install_repo, $purge_config, $safe_mode, $manage_services) |
| 266 | + validate_bool($client, $server, $api, $install_repo, $purge_config, $safe_mode, $manage_services, $rabbitmq_reconnect_on_error, $redis_reconnect_on_error) |
251 | 267 |
|
252 | 268 | validate_re($repo, ['^main$', '^unstable$'], "Repo must be 'main' or 'unstable'. Found: ${repo}")
|
253 | 269 | validate_re($version, ['^absent$', '^installed$', '^latest$', '^present$', '^[\d\.\-]+$'], "Invalid package version: ${version}")
|
|
0 commit comments