diff --git a/site-modules/profile/manifests/icinga2/objects/e2e_checks_deposit.pp b/site-modules/profile/manifests/icinga2/objects/e2e_checks_deposit.pp index 4effce62..4fb80d28 100644 --- a/site-modules/profile/manifests/icinga2/objects/e2e_checks_deposit.pp +++ b/site-modules/profile/manifests/icinga2/objects/e2e_checks_deposit.pp @@ -1,46 +1,47 @@ # swh deposit end-to-end checks on the icinga master define profile::icinga2::objects::e2e_checks_deposit ( String $deposit_server, String $deposit_user, String $deposit_pass, String $deposit_collection, Integer $deposit_poll_interval, String $deposit_archive, String $deposit_metadata, String $environment, ) { include ::profile::icinga2::objects::e2e_checks_base + $zonename = lookup('icinga2::master::zonename') $check_command = "${environment}-check-deposit-cmd" ::icinga2::object::checkcommand {$check_command: import => ['plugin-check-command'], command => [ '/usr/bin/swh', 'icinga_plugins', '-w', '600', 'check-deposit', '--server', $deposit_server, '--username', $deposit_user, '--password', $deposit_pass, '--collection', $deposit_collection, '--poll-interval', $deposit_poll_interval, 'single', '--archive', $deposit_archive, '--metadata', $deposit_metadata, ], # XXX: Should probably be split into usual commands with arguments # arguments => ... timeout => 900, target => $::profile::icinga2::objects::e2e_checks_base::check_file, require => Package[$::profile::icinga2::objects::e2e_checks_base::packages] } ::icinga2::object::service {"${environment}-check-deposit": import => ['generic-service-check-e2e'], service_name => "${environment} Check deposit end-to-end", check_command => $check_command, target => "/etc/icinga2/zones.d/${zonename}/${::fqdn}.conf", host_name => "${::fqdn}", } } diff --git a/site-modules/profile/manifests/icinga2/objects/e2e_checks_vault.pp b/site-modules/profile/manifests/icinga2/objects/e2e_checks_vault.pp index 99217fe3..0a3446c8 100644 --- a/site-modules/profile/manifests/icinga2/objects/e2e_checks_vault.pp +++ b/site-modules/profile/manifests/icinga2/objects/e2e_checks_vault.pp @@ -1,31 +1,32 @@ # swh vault end-to-end checks on the icinga master define profile::icinga2::objects::e2e_checks_vault ( String $server_vault, String $server_webapp, String $environment, ) { include ::profile::icinga2::objects::e2e_checks_base $check_command = "${environment}-check-vault-cmd" + $zonename = lookup('icinga2::master::zonename') ::icinga2::object::checkcommand {$check_command: import => ['plugin-check-command'], command => [ '/usr/bin/swh', 'icinga_plugins', 'check-vault', '--swh-storage-url', $server_vault, '--swh-web-url', $server_webapp, 'directory' ], target => $::profile::icinga2::objects::e2e_checks_base::check_file, require => Package[$::profile::icinga2::objects::e2e_checks_base::packages], } ::icinga2::object::service {"${environment}-check-vault": import => ['generic-service-check-e2e'], service_name => "${environment} Check vault end-to-end", check_command => $check_command, target => "/etc/icinga2/zones.d/${zonename}/${::fqdn}.conf", host_name => "${::fqdn}", } }