Filippo Giunchedi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/354459 )

Change subject: prometheus: add alertmanager_url to prometheus server
......................................................................


prometheus: add alertmanager_url to prometheus server

Change-Id: Ifb595bebbd86aeb1e5490288b0e7c736c8692360
---
M modules/prometheus/manifests/server.pp
M modules/prometheus/templates/initscripts/[email protected]
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Filippo Giunchedi: Looks good to me, approved



diff --git a/modules/prometheus/manifests/server.pp 
b/modules/prometheus/manifests/server.pp
index 455384d..3d42d33 100644
--- a/modules/prometheus/manifests/server.pp
+++ b/modules/prometheus/manifests/server.pp
@@ -44,6 +44,9 @@
 #   rules. See also https://prometheus.io/docs/querying/rules/ and
 #   https://prometheus.io/docs/alerting/rules/. Note that defining alerting
 #   rules won't trigger any notifications of any kind.
+#
+# [*alertmanager_url*]
+#   An url where alertmanager is listening for alerts.
 
 define prometheus::server (
     $listen_address,
@@ -56,6 +59,7 @@
     $global_config_extra = {},
     $scrape_configs_extra = [],
     $rule_files_extra = [],
+    $alertmanager_url = undef,
 ) {
     include ::prometheus
 
diff --git a/modules/prometheus/templates/initscripts/[email protected] 
b/modules/prometheus/templates/initscripts/[email protected]
index c1bf51c..e28d74f 100644
--- a/modules/prometheus/templates/initscripts/[email protected]
+++ b/modules/prometheus/templates/initscripts/[email protected]
@@ -3,7 +3,7 @@
 
 [Service]
 User=prometheus
-ExecStart=/usr/bin/prometheus -storage.local.max-chunks-to-persist <%= 
@max_chunks_to_persist %> -storage.local.memory-chunks <%= @memory_chunks %> 
-storage.local.path <%= @metrics_path %> -web.listen-address <%= 
@listen_address %> -web.external-url <%= @external_url %> 
-storage.local.retention <%= @storage_retention %> -config.file <%= @base_path 
%>/prometheus.yml -storage.local.chunk-encoding-version <%= @storage_encoding %>
+ExecStart=/usr/bin/prometheus -storage.local.max-chunks-to-persist <%= 
@max_chunks_to_persist %> -storage.local.memory-chunks <%= @memory_chunks %> 
-storage.local.path <%= @metrics_path %> -web.listen-address <%= 
@listen_address %> -web.external-url <%= @external_url %> 
-storage.local.retention <%= @storage_retention %> -config.file <%= @base_path 
%>/prometheus.yml -storage.local.chunk-encoding-version <%= @storage_encoding 
%> <% if @alertmanager_url != nil %>-alertmanager.url <%= @alertmanager_url 
%><% end %>
 Restart=on-failure
 RestartSec=2s
 TimeoutStopSec=10m

-- 
To view, visit https://gerrit.wikimedia.org/r/354459
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb595bebbd86aeb1e5490288b0e7c736c8692360
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to