Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/manifests/icinga2/objects/static_checks.pp
# Static checks on the icinga master | # Static checks on the icinga master | ||||
class profile::icinga2::objects::static_checks { | class profile::icinga2::objects::static_checks { | ||||
$checks_file = '/etc/icinga2/conf.d/static-checks.conf' | $checks_file = '/etc/icinga2/conf.d/static-checks.conf' | ||||
::icinga2::object::host {'www.softwareheritage.org': | ::icinga2::object::host {'www.softwareheritage.org': | ||||
import => ['generic-host'], | import => ['generic-host'], | ||||
check_command => 'hostalive4', | check_command => 'dummy', | ||||
address => 'www.softwareheritage.org', | address => 'www.softwareheritage.org', | ||||
target => $checks_file, | target => $checks_file, | ||||
vars => { | vars => { | ||||
ping_wrta => 150, | dummy_state => 0, # up | ||||
ping_crta => 300, | dummy_text => "HTTP-only host", | ||||
}, | }, | ||||
} | } | ||||
::icinga2::object::host {'softwareheritage.org': | ::icinga2::object::host {'softwareheritage.org': | ||||
import => ['generic-host'], | import => ['generic-host'], | ||||
check_command => 'hostalive4', | check_command => 'dummy', | ||||
address => 'softwareheritage.org', | address => 'softwareheritage.org', | ||||
target => $checks_file, | target => $checks_file, | ||||
vars => { | vars => { | ||||
ping_wrta => 150, | dummy_state => 0, # up | ||||
ping_crta => 300, | dummy_text => "HTTP-only host", | ||||
}, | }, | ||||
} | } | ||||
::icinga2::object::service {'Software Heritage Homepage': | ::icinga2::object::service {'Software Heritage Homepage': | ||||
import => ['generic-service'], | import => ['generic-service'], | ||||
host_name => 'www.softwareheritage.org', | host_name => 'www.softwareheritage.org', | ||||
check_command => 'http', | check_command => 'http', | ||||
target => $checks_file, | target => $checks_file, | ||||
Show All 15 Lines | vars => { | ||||
http_vhost => 'softwareheritage.org', | http_vhost => 'softwareheritage.org', | ||||
http_uri => '/', | http_uri => '/', | ||||
http_ssl => true, | http_ssl => true, | ||||
http_sni => true, | http_sni => true, | ||||
}, | }, | ||||
} | } | ||||
::icinga2::object::host {'swh-logging-prod': | ::icinga2::object::host {'swh-logging-prod': | ||||
check_command => 'hostalive4', | check_command => 'dummy', | ||||
address => '127.0.0.1', | address => '127.0.0.1', | ||||
target => $checks_file, | target => $checks_file, | ||||
vars => { | |||||
dummy_state => 0, # up | |||||
dummy_text => "virtual host for clustered checks", | |||||
}, | |||||
} | } | ||||
::icinga2::object::service {'swh-logging-prod cluster': | ::icinga2::object::service {'swh-logging-prod cluster': | ||||
host_name => 'swh-logging-prod', | host_name => 'swh-logging-prod', | ||||
check_command => 'check_escluster', | check_command => 'check_escluster', | ||||
target => $checks_file, | target => $checks_file, | ||||
} | } | ||||
::icinga2::object::checkcommand {'check_escluster': | ::icinga2::object::checkcommand {'check_escluster': | ||||
import => ['plugin-check-command'], | import => ['plugin-check-command'], | ||||
command => '/usr/lib/nagios/plugins/icinga_check_elasticsearch.sh', | command => '/usr/lib/nagios/plugins/icinga_check_elasticsearch.sh', | ||||
target => $checks_file, | target => $checks_file, | ||||
} | } | ||||
::icinga2::object::host {'DNS resolvers': | ::icinga2::object::host {'DNS resolvers': | ||||
check_command => 'hostalive4', | check_command => 'dummy', | ||||
address => '127.0.0.1', | address => '127.0.0.1', | ||||
target => $checks_file, | target => $checks_file, | ||||
vars => { | |||||
dummy_state => 0, # up | |||||
dummy_text => "virtual host for clustered checks", | |||||
}, | |||||
} | } | ||||
::icinga2::object::service {'SOA': | ::icinga2::object::service {'SOA': | ||||
host_name => 'DNS resolvers', | host_name => 'DNS resolvers', | ||||
check_command => 'check_resolvers', | check_command => 'check_resolvers', | ||||
target => $checks_file, | target => $checks_file, | ||||
} | } | ||||
Show All 9 Lines |