diff --git a/manifests/icinga2/objects.pp b/manifests/icinga2/objects.pp index 86a492d..8eabeef 100644 --- a/manifests/icinga2/objects.pp +++ b/manifests/icinga2/objects.pp @@ -1,5 +1,6 @@ # Icinga2 object definitions class profile::icinga2::objects { include profile::icinga2::objects::templates include profile::icinga2::objects::common_checks + include profile::icinga2::objects::static_checks } diff --git a/manifests/icinga2/objects/static_checks.pp b/manifests/icinga2/objects/static_checks.pp new file mode 100644 index 0000000..45f9b19 --- /dev/null +++ b/manifests/icinga2/objects/static_checks.pp @@ -0,0 +1,24 @@ +# Static checks on the icinga master +class profile::icinga2::objects::static_checks { + + $checks_file = '/etc/icinga2/conf.d/static-checks.conf' + + ::icinga2::object::host {'www.softwareheritage.org': + import => ['generic-host'], + target => $checks_file, + } + + ::icinga2::object::service {'Software Heritage Homepage': + import => ['generic-service'], + host_name => 'www.softwareheritage.org', + command => 'http', + vars => { + http_vhost => 'www.softwareheritage.org', + http_uri => '/', + http_ssl => true, + http_sni => true, + http_string => 'Software Heritage', + }, + target => $checks_file, + } +}