From 8d2060f4c9d617623f6491d4ce8ef043fd6ff308 Mon Sep 17 00:00:00 2001 From: Dustin Hooten Date: Tue, 22 Oct 2019 20:58:32 -0600 Subject: [PATCH] Fix v1 logging --- manifests/config.pp | 5 +++-- spec/classes/prometheus_spec.rb | 3 +-- spec/fixtures/files/cli/prometheus1_all.systemd | 2 +- spec/fixtures/files/cli/prometheus1_extra.systemd | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index f6dc07049..78043482d 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -33,7 +33,8 @@ 'rules.alert.for-outage-tolerance' => $prometheus::alert_for_outage_tolerance, 'rules.alert.for-grace-period' => $prometheus::alert_for_grace_period, 'rules.alert.resend-delay' => $prometheus::alert_resend_delay, - 'query.lookback-delta' => $prometheus::query_lookback_delta + 'query.lookback-delta' => $prometheus::query_lookback_delta, + 'log.format' => $prometheus::log_format, } } @@ -129,7 +130,7 @@ 'query.max-concurrency' => $prometheus::query_max_concurrency, 'query.staleness-delta' => $prometheus::query_staleness_delta, 'log.level' => $prometheus::log_level, - 'log.format' => "\"logger:stdout${v1_log_format}\"" + 'log.format' => 'logger:stdout', } } diff --git a/spec/classes/prometheus_spec.rb b/spec/classes/prometheus_spec.rb index 5cf00af2c..943de17d4 100644 --- a/spec/classes/prometheus_spec.rb +++ b/spec/classes/prometheus_spec.rb @@ -480,8 +480,7 @@ query_timeout: '2m', query_max_concurrency: '30', query_staleness_delta: '5m', - log_level: 'fatal', - log_format: 'json' + log_level: 'fatal' } end diff --git a/spec/fixtures/files/cli/prometheus1_all.systemd b/spec/fixtures/files/cli/prometheus1_all.systemd index 8064c28e2..9b4c86410 100644 --- a/spec/fixtures/files/cli/prometheus1_all.systemd +++ b/spec/fixtures/files/cli/prometheus1_all.systemd @@ -28,7 +28,7 @@ ExecStart=/usr/local/bin/prometheus \ -query.max-concurrency=30 \ -query.staleness-delta=5m \ -log.level=fatal \ - -log.format="logger:stdout?json=true" + -log.format=logger:stdout ExecReload=/bin/kill -HUP $MAINPID KillMode=process Restart=always diff --git a/spec/fixtures/files/cli/prometheus1_extra.systemd b/spec/fixtures/files/cli/prometheus1_extra.systemd index 396cbfab9..c2901d5b9 100644 --- a/spec/fixtures/files/cli/prometheus1_extra.systemd +++ b/spec/fixtures/files/cli/prometheus1_extra.systemd @@ -13,7 +13,7 @@ ExecStart=/usr/local/bin/prometheus \ -web.console.libraries=/usr/local/share/prometheus/console_libraries \ -storage.local.path=/var/lib/prometheus \ -storage.local.retention=360h \ - -log.format="logger:stdout" \ + -log.format=logger:stdout \ -web.telemetry-path=/metrics ExecReload=/bin/kill -HUP $MAINPID KillMode=process