Skip to content

Commit bbcc635

Browse files
author
deepakt7340
committed
Fix: Switch Prometheus remote_write URL based on obmondo.com server
1 parent 110e4a4 commit bbcc635

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • modules/enableit/common/manifests/monitor/prometheus

modules/enableit/common/manifests/monitor/prometheus/server.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
$scrape_port = Integer($listen_address.split(':')[1])
4242
$scrape_host = $trusted['certname']
4343
$_extra_options = "--web.listen-address=${listen_address} --enable-feature=agent --storage.agent.path=/opt/obmondo/prometheus"
44-
$_prometheus_url = $::obmondo['customer_id'] ? { # lint:ignore:top_scope_facts
45-
undef => "https://${common::monitor::prometheus::server}/api/v1/write",
46-
default => "https://${common::monitor::prometheus::server}/${::obmondo['customer_id']}/api/v1/write" # lint:ignore:top_scope_facts
44+
$_prometheus_url = $common::monitor::prometheus::server =~ /obmondo\.com/ ? {
45+
false => "https://${common::monitor::prometheus::server}/api/v1/write",
46+
true => "https://${common::monitor::prometheus::server}/${::obmondo['customer_id']}/api/v1/write" # lint:ignore:top_scope_facts
4747
}
4848

4949
class { 'prometheus::server':

0 commit comments

Comments
 (0)