Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/icinga2/objects/e2e_checks_vault.pp
# swh vault end-to-end checks on the icinga master | # swh vault end-to-end checks on the icinga master | ||||
define profile::icinga2::objects::e2e_checks_vault ( | define profile::icinga2::objects::e2e_checks_vault ( | ||||
String $server_vault, | String $server_vault, | ||||
String $server_webapp, | String $server_webapp, | ||||
String $environment, | String $environment, | ||||
) { | ) { | ||||
include ::profile::icinga2::objects::e2e_checks_base | include ::profile::icinga2::objects::e2e_checks_base | ||||
$check_command = "${environment}-check-vault-cmd" | $check_command = "${environment}-check-vault-cmd" | ||||
$zonename = lookup('icinga2::master::zonename') | $zonename = lookup('icinga2::master::zonename') | ||||
$prometheus_text_file_directory = lookup('prometheus::node::textfile_directory') | |||||
::icinga2::object::checkcommand {$check_command: | ::icinga2::object::checkcommand {$check_command: | ||||
import => ['plugin-check-command'], | import => ['plugin-check-command'], | ||||
command => [ | command => [ | ||||
'/usr/bin/swh', 'icinga_plugins', | '/usr/bin/swh', | ||||
'icinga_plugins', | |||||
'--prometheus-exporter', | |||||
'--prometheus-exporter-directory', $prometheus_text_file_directory, | |||||
'--environment', $environment, | |||||
'--warning', '1200', | '--warning', '1200', | ||||
'--critical', '3600', # explicit the default value of the plugin | '--critical', '3600', # explicit the default value of the plugin | ||||
'check-vault', | 'check-vault', | ||||
'--swh-storage-url', $server_vault, | '--swh-storage-url', $server_vault, | ||||
'--swh-web-url', $server_webapp, | '--swh-web-url', $server_webapp, | ||||
'directory' | 'directory' | ||||
], | ], | ||||
target => $::profile::icinga2::objects::e2e_checks_base::check_file, | target => $::profile::icinga2::objects::e2e_checks_base::check_file, | ||||
Show All 13 Lines |