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 201bd458..ab269204 100644 --- a/site-modules/profile/manifests/icinga2/objects/e2e_checks_deposit.pp +++ b/site-modules/profile/manifests/icinga2/objects/e2e_checks_deposit.pp @@ -1,52 +1,57 @@ # 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 $deposit_provider_url, String $deposit_swh_web_url, String $environment, ) { include ::profile::icinga2::objects::e2e_checks_base $zonename = lookup('icinga2::master::zonename') $check_command = "${environment}-check-deposit-cmd" + $prometheus_text_file_directory = lookup('prometheus::node::textfile_directory') ::icinga2::object::checkcommand {$check_command: import => ['plugin-check-command'], command => [ - '/usr/bin/swh', 'icinga_plugins', + '/usr/bin/swh', + 'icinga_plugins', + '--prometheus-exporter', + '--prometheus-exporter-directory', $prometheus_text_file_directory, + '--environment', $environment, '--warning', '600', '--critical', '3600', # explicit the default value of the plugin 'check-deposit', '--server', $deposit_server, '--username', $deposit_user, '--password', $deposit_pass, '--collection', $deposit_collection, '--provider-url', $deposit_provider_url, '--swh-web-url', $deposit_swh_web_url, '--poll-interval', $deposit_poll_interval, 'single', '--archive', $deposit_archive, '--metadata', $deposit_metadata, ], # XXX: Should probably be split into usual commands with arguments # arguments => ... timeout => 4800, # higher than the critical threshold 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_savecodenow.pp b/site-modules/profile/manifests/icinga2/objects/e2e_checks_savecodenow.pp index d3dcb8ba..49102f05 100644 --- a/site-modules/profile/manifests/icinga2/objects/e2e_checks_savecodenow.pp +++ b/site-modules/profile/manifests/icinga2/objects/e2e_checks_savecodenow.pp @@ -1,38 +1,43 @@ # swh save_code_now end-to-end checks on the icinga master define profile::icinga2::objects::e2e_checks_savecodenow ( String $server_webapp, String $origin_name, String $origin_url, String $origin_type, String $environment, ) { include ::profile::icinga2::objects::e2e_checks_base $check_command_prefix = "${environment}-check-savecodenow" $zonename = lookup('icinga2::master::zonename') + $prometheus_text_file_directory = lookup('prometheus::node::textfile_directory') $check_command = "${check_command_prefix}-cmd-${origin_name}-${origin_type}" ::icinga2::object::checkcommand {$check_command: import => ['plugin-check-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', '--critical', '600', 'check-savecodenow', '--swh-web-url', $server_webapp, 'origin', $origin_url, '--visit-type', $origin_type ], target => $::profile::icinga2::objects::e2e_checks_base::check_file, require => Package[$::profile::icinga2::objects::e2e_checks_base::packages], timeout => 900, } ::icinga2::object::service {"${check_command_prefix}-service-${origin_name}-${origin_type}": import => ['generic-service-check-e2e'], service_name => "${environment} Check save-code-now ${origin_name} with type ${origin_type} 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 209d5d11..92f564f9 100644 --- a/site-modules/profile/manifests/icinga2/objects/e2e_checks_vault.pp +++ b/site-modules/profile/manifests/icinga2/objects/e2e_checks_vault.pp @@ -1,36 +1,41 @@ # 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') + $prometheus_text_file_directory = lookup('prometheus::node::textfile_directory') ::icinga2::object::checkcommand {$check_command: import => ['plugin-check-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', '--critical', '3600', # explicit the default value of the plugin '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], timeout => 4800, # higher than the critical threshold } ::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}", } }