Differential D7764 Diff 28391 site-modules/profile/manifests/icinga2/objects/e2e_checks_savecodenow.pp
Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/icinga2/objects/e2e_checks_savecodenow.pp
# swh save_code_now end-to-end checks on the icinga master | # swh save_code_now end-to-end checks on the icinga master | ||||
define profile::icinga2::objects::e2e_checks_savecodenow ( | define profile::icinga2::objects::e2e_checks_savecodenow ( | ||||
String $server_webapp, | String $server_webapp, | ||||
String $origin_name, | String $origin_name, | ||||
String $origin_url, | String $origin_url, | ||||
String $origin_type, | String $origin_type, | ||||
String $environment, | String $environment, | ||||
) { | ) { | ||||
include ::profile::icinga2::objects::e2e_checks_base | include ::profile::icinga2::objects::e2e_checks_base | ||||
$check_command_prefix = "${environment}-check-savecodenow" | $check_command_prefix = "${environment}-check-savecodenow" | ||||
$zonename = lookup('icinga2::master::zonename') | $zonename = lookup('icinga2::master::zonename') | ||||
$prometheus_text_file_directory = lookup('prometheus::node::textfile_directory') | |||||
$check_command = "${check_command_prefix}-cmd-${origin_name}-${origin_type}" | $check_command = "${check_command_prefix}-cmd-${origin_name}-${origin_type}" | ||||
::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', '300', | '--warning', '300', | ||||
'--critical', '600', | '--critical', '600', | ||||
'check-savecodenow', | 'check-savecodenow', | ||||
'--swh-web-url', $server_webapp, | '--swh-web-url', $server_webapp, | ||||
'origin', $origin_url, '--visit-type', $origin_type | 'origin', $origin_url, '--visit-type', $origin_type | ||||
], | ], | ||||
target => $::profile::icinga2::objects::e2e_checks_base::check_file, | target => $::profile::icinga2::objects::e2e_checks_base::check_file, | ||||
require => Package[$::profile::icinga2::objects::e2e_checks_base::packages], | require => Package[$::profile::icinga2::objects::e2e_checks_base::packages], | ||||
Show All 12 Lines |