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
diff --git a/reactive/alertmanager.py b/reactive/alertmanager.py
index 2cc266a..96e4258 100644
--- a/reactive/alertmanager.py
+++ b/reactive/alertmanager.py
@@ -117,12 +117,13 @@ def write_alertmanager_config_def():
117 config['external_url'].format(**vars))117 config['external_url'].format(**vars))
118 if get_peers():118 if get_peers():
119 hookenv.log('Found cluster peers: {}'.format(get_peers()))119 hookenv.log('Found cluster peers: {}'.format(get_peers()))
120 runtime_args('--mesh.listen-address', '0.0.0.0:9094')120 # Ensure we wipe old format arguments
121 for peer in get_peers():
122 runtime_args('--mesh.peer', peer, False)
123 else:
124 runtime_args('--mesh.listen-address', False)121 runtime_args('--mesh.listen-address', False)
125 runtime_args('--mesh.peer', False)122 runtime_args('--mesh.peer', False)
123 for peer in get_peers():
124 runtime_args('--cluster.peer', peer, False)
125 else:
126 runtime_args('--cluster.peer', False)
126 args = runtime_args()127 args = runtime_args()
127 hookenv.log('runtime_args: {}'.format(args))128 hookenv.log('runtime_args: {}'.format(args))
128 if args:129 if args:
diff --git a/templates/daemon_arguments.j2 b/templates/daemon_arguments.j2
index fcc5da1..59e293c 100644
--- a/templates/daemon_arguments.j2
+++ b/templates/daemon_arguments.j2
@@ -17,21 +17,36 @@ ARGS="
17# --alerts.gc-interval=30m Interval between alert GC.17# --alerts.gc-interval=30m Interval between alert GC.
18# --log.level=info Only log messages with the given severity or above.18# --log.level=info Only log messages with the given severity or above.
19# --web.external-url=WEB.EXTERNAL-URL19# --web.external-url=WEB.EXTERNAL-URL
20# The URL under which Alertmanager is externally reachable (for example, if20# The URL under which Alertmanager is externally reachable (for example, if Alertmanager is served via a reverse proxy). Used for generating relative and absolute
21# Alertmanager is served via a reverse proxy). Used for generating relative and21# 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
22# absolute links back to Alertmanager itself. If the URL has a path portion, it will22# components will be derived automatically.
23# be used to prefix all HTTP endpoints served by Alertmanager. If omitted, relevant
24# URL components will be derived automatically.
25# --web.route-prefix=WEB.ROUTE-PREFIX23# --web.route-prefix=WEB.ROUTE-PREFIX
26# Prefix for the internal routes of web endpoints. Defaults to path of24# Prefix for the internal routes of web endpoints. Defaults to path of --web.external-url.
27# --web.external-url.
28# --web.listen-address=":9093"25# --web.listen-address=":9093"
29# Address to listen on for the web interface and API.26# Address to listen on for the web interface and API.
30# --mesh.listen-address="0.0.0.0:6783"27# --cluster.listen-address="0.0.0.0:9094"
31# mesh listen address. Pass an empty string to disable.28# Listen address for cluster.
32# --mesh.peer-id="52:54:00:54:c1:12"29# --cluster.advertise-address=CLUSTER.ADVERTISE-ADDRESS
33# mesh peer ID30# Explicit address to advertise in cluster.
34# --mesh.nickname="myhost" mesh peer nickname31# --cluster.peer=CLUSTER.PEER ...
35# --mesh.password="" password to join the peer network (empty password disables encryption)32# Initial peers (may be repeated).
36# --mesh.peer=MESH.PEER ... initial peers (may be repeated)33# --cluster.peer-timeout=15s
37# --version Show application version.34# Time to wait between peers to send notifications.
35# --cluster.gossip-interval=200ms
36# Interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated across the cluster more quickly at the expense of
37# increased bandwidth.
38# --cluster.pushpull-interval=1m0s
39# Interval for gossip state syncs. Setting this interval lower (more frequent) will increase convergence speeds across larger clusters at the expense of increased
40# bandwidth usage.
41# --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.
42# --cluster.probe-timeout=500ms
43# 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.
44# --cluster.probe-interval=1s
45# 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
46# bandwidth usage.
47# --cluster.settle-timeout=1m0s
48# Maximum time to wait for cluster connections to settle before evaluating notifications.
49# --cluster.reconnect-interval=10s
50# Interval between attempting to reconnect to lost peers.
51# --cluster.reconnect-timeout=6h0m0s
52# Length of time to attempt to reconnect to a lost peer.

Subscribers

People subscribed via source and target branches