Merge ~jacekn/charm-prometheus-alertmanager:snap_0_15 into ~prometheus-charmers/charm-prometheus-alertmanager:master

Proposed by Jacek Nykis
Status: Merged
Approved by: Alvaro Uria
Approved revision: ef7b996d3570c2f5d2db13ad66a374704dfa3693
Merged at revision: 708789ef03f767f4ecb82140620df0f932a1bdf0
Proposed branch: ~jacekn/charm-prometheus-alertmanager:snap_0_15
Merge into: ~prometheus-charmers/charm-prometheus-alertmanager:master
Diff against target: 78 lines (+35/-19)
2 files modified
reactive/alertmanager.py (+5/-4)
templates/daemon_arguments.j2 (+30/-15)
Reviewer Review Type Date Requested Status
Alvaro Uria (community) Approve
Review via email: mp+347915@code.launchpad.net

Commit message

Update charm to support alertmanagaer v0.15 format arguments

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Alvaro Uria (aluria) wrote :

lgtm

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 708789ef03f767f4ecb82140620df0f932a1bdf0

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/reactive/alertmanager.py b/reactive/alertmanager.py
2index 2cc266a..96e4258 100644
3--- a/reactive/alertmanager.py
4+++ b/reactive/alertmanager.py
5@@ -117,12 +117,13 @@ def write_alertmanager_config_def():
6 config['external_url'].format(**vars))
7 if get_peers():
8 hookenv.log('Found cluster peers: {}'.format(get_peers()))
9- runtime_args('--mesh.listen-address', '0.0.0.0:9094')
10- for peer in get_peers():
11- runtime_args('--mesh.peer', peer, False)
12- else:
13+ # Ensure we wipe old format arguments
14 runtime_args('--mesh.listen-address', False)
15 runtime_args('--mesh.peer', False)
16+ for peer in get_peers():
17+ runtime_args('--cluster.peer', peer, False)
18+ else:
19+ runtime_args('--cluster.peer', False)
20 args = runtime_args()
21 hookenv.log('runtime_args: {}'.format(args))
22 if args:
23diff --git a/templates/daemon_arguments.j2 b/templates/daemon_arguments.j2
24index fcc5da1..59e293c 100644
25--- a/templates/daemon_arguments.j2
26+++ b/templates/daemon_arguments.j2
27@@ -17,21 +17,36 @@ ARGS="
28 # --alerts.gc-interval=30m Interval between alert GC.
29 # --log.level=info Only log messages with the given severity or above.
30 # --web.external-url=WEB.EXTERNAL-URL
31-# The URL under which Alertmanager is externally reachable (for example, if
32-# Alertmanager is served via a reverse proxy). Used for generating relative and
33-# absolute links back to Alertmanager itself. If the URL has a path portion, it will
34-# be used to prefix all HTTP endpoints served by Alertmanager. If omitted, relevant
35-# URL components will be derived automatically.
36+# The URL under which Alertmanager is externally reachable (for example, if Alertmanager is served via a reverse proxy). Used for generating relative and absolute
37+# links back to Alertmanager itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by Alertmanager. If omitted, relevant URL
38+# components will be derived automatically.
39 # --web.route-prefix=WEB.ROUTE-PREFIX
40-# Prefix for the internal routes of web endpoints. Defaults to path of
41-# --web.external-url.
42+# Prefix for the internal routes of web endpoints. Defaults to path of --web.external-url.
43 # --web.listen-address=":9093"
44 # Address to listen on for the web interface and API.
45-# --mesh.listen-address="0.0.0.0:6783"
46-# mesh listen address. Pass an empty string to disable.
47-# --mesh.peer-id="52:54:00:54:c1:12"
48-# mesh peer ID
49-# --mesh.nickname="myhost" mesh peer nickname
50-# --mesh.password="" password to join the peer network (empty password disables encryption)
51-# --mesh.peer=MESH.PEER ... initial peers (may be repeated)
52-# --version Show application version.
53+# --cluster.listen-address="0.0.0.0:9094"
54+# Listen address for cluster.
55+# --cluster.advertise-address=CLUSTER.ADVERTISE-ADDRESS
56+# Explicit address to advertise in cluster.
57+# --cluster.peer=CLUSTER.PEER ...
58+# Initial peers (may be repeated).
59+# --cluster.peer-timeout=15s
60+# Time to wait between peers to send notifications.
61+# --cluster.gossip-interval=200ms
62+# Interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated across the cluster more quickly at the expense of
63+# increased bandwidth.
64+# --cluster.pushpull-interval=1m0s
65+# Interval for gossip state syncs. Setting this interval lower (more frequent) will increase convergence speeds across larger clusters at the expense of increased
66+# bandwidth usage.
67+# --cluster.tcp-timeout=10s Timeout for establishing a stream connection with a remote node for a full state sync, and for stream read and write operations.
68+# --cluster.probe-timeout=500ms
69+# Timeout to wait for an ack from a probed node before assuming it is unhealthy. This should be set to 99-percentile of RTT (round-trip time) on your network.
70+# --cluster.probe-interval=1s
71+# Interval between random node probes. Setting this lower (more frequent) will cause the cluster to detect failed nodes more quickly at the expense of increased
72+# bandwidth usage.
73+# --cluster.settle-timeout=1m0s
74+# Maximum time to wait for cluster connections to settle before evaluating notifications.
75+# --cluster.reconnect-interval=10s
76+# Interval between attempting to reconnect to lost peers.
77+# --cluster.reconnect-timeout=6h0m0s
78+# Length of time to attempt to reconnect to a lost peer.

Subscribers

People subscribed via source and target branches