fix: resolve prometheus issues

- broken prometheus::server config, resolve conflicts
- move hieradata for role to match role, not profile
This commit is contained in:
Ben Vincent 2023-11-21 19:50:09 +11:00
parent c195ceae4f
commit 10a6085b84
2 changed files with 8 additions and 4 deletions

View File

@ -8,3 +8,4 @@ profiles::metrics::server::scrape_jobs:
- bind
- puppetdb
- systemd
profiles::metrics::server::localstorage: /data/prometheus

View File

@ -4,7 +4,11 @@ class profiles::metrics::server (
Boolean $manage_user = true,
Boolean $manage_group = true,
String $retention = '30d',
Array $scrape_jobs = [],
Array $scrape_jobs = [],
Variant[
Stdlib::Absolutepath,
Boolean[false]
] $localstorage = '/var/lib/prometheus',
) {
$collect_scrape_jobs = $scrape_jobs.map |$job| {
@ -18,8 +22,7 @@ class profiles::metrics::server (
manage_group => $manage_group,
version => $version,
collect_scrape_jobs => $collect_scrape_jobs,
extra_options => {
'storage.tsdb.retention.time' => $retention,
},
storage_retention => $retention,
localstorage => $localstorage,
}
}