diff --git a/manifests/site.pp b/manifests/site.pp --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1,8 +1,13 @@ -node /^(orsay|beaubourg|hypervisor\d+|branly|pompidou|uffizi)\.(internal\.)?softwareheritage\.org$/ +node /^(pompidou|uffizi)\.(internal\.)?softwareheritage\.org$/ { include role::swh_hypervisor } +node /^(beaubourg|hypervisor\d+|branly)\.(internal\.)?softwareheritage\.org$/ +{ + include role::swh_hypervisor_with_ceph +} + node 'pergamon.softwareheritage.org' { include role::swh_sysadmin } diff --git a/site-modules/profile/manifests/ceph/mgr.pp b/site-modules/profile/manifests/ceph/mgr.pp new file mode 100644 --- /dev/null +++ b/site-modules/profile/manifests/ceph/mgr.pp @@ -0,0 +1,15 @@ +# ceph manager node +# The exporter must be activated first with `ceph mgr module enable prometheus`) + +class profile::ceph::mgr { + # default port from the ceph exporter + $service_port = 9283 + + profile::prometheus::export_scrape_config {"ceph-mgr_${::fqdn}": + job => 'ceph-mgr', + target => "${::fqdn}:${service_port}", + scheme => 'http', + metrics_path => '/metrics', + } + +} diff --git a/site-modules/role/manifests/swh_hypervisor_with_ceph.pp b/site-modules/role/manifests/swh_hypervisor_with_ceph.pp new file mode 100644 --- /dev/null +++ b/site-modules/role/manifests/swh_hypervisor_with_ceph.pp @@ -0,0 +1,3 @@ +class role::swh_hypervisor_with_ceph inherits role::swh_hypervisor { + include profile::ceph::mgr +}