Skip to content

Commit d8d6abb

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

File tree

1 file changed

+3
-6
lines changed
  • modules/enableit/common/manifests/monitor/prometheus

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
Stdlib::Absolutepath $config_dir,
1717
Eit_types::IPPort $listen_address,
1818

19-
Boolean $enable = $common::monitor::enable,
20-
Eit_types::Noop_Value $noop_value = $common::monitor::noop_value,
19+
Boolean $enable = $common::monitor::enable,
20+
Eit_types::Noop_Value $noop_value = $common::monitor::noop_value,
2121
) {
2222

2323
include common::monitor::prometheus
@@ -41,10 +41,7 @@
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
47-
}
44+
$_prometheus_url = "https://${common::monitor::prometheus::server}/api/v1/write"
4845

4946
class { 'prometheus::server':
5047
version => $version,

0 commit comments

Comments
 (0)