Merge ~timkuhlman/mtail-charm/+git/promreg:promreg into mtail-charm:master

Proposed by Tim Kuhlman
Status: Merged
Merged at revision: fc6ae4d640cea4cbaf15092f31883b4441912623
Proposed branch: ~timkuhlman/mtail-charm/+git/promreg:promreg
Merge into: mtail-charm:master
Diff against target: 31 lines (+4/-1)
2 files modified
layer.yaml (+1/-1)
reactive/mtail.py (+3/-0)
Reviewer Review Type Date Requested Status
Jacek Nykis (community) Approve
Review via email: mp+329328@code.launchpad.net

Description of the change

Add prometheus registration layer

To post a comment you must log in.
Revision history for this message
Jacek Nykis (jacekn) wrote :

LGTM, merged

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/layer.yaml b/layer.yaml
2index cb5e7d6..87a8990 100644
3--- a/layer.yaml
4+++ b/layer.yaml
5@@ -1,4 +1,4 @@
6-includes: ['layer:basic', 'interface:http', 'layer:snap']
7+includes: ['layer:basic', 'interface:http', 'layer:snap', 'layer:promreg-client']
8 repo: 'https://git.launchpad.net/mtail-charm'
9 ignore: ['.*.swp' ]
10 options:
11diff --git a/reactive/mtail.py b/reactive/mtail.py
12index 8b24f77..b942145 100644
13--- a/reactive/mtail.py
14+++ b/reactive/mtail.py
15@@ -3,6 +3,8 @@ import re
16 import time
17 import subprocess
18
19+import charms.promreg
20+
21 from charmhelpers.core import host, hookenv
22 from charmhelpers.core.templating import render
23 from charms.reactive import (
24@@ -62,6 +64,7 @@ def write_rules():
25 def write_daemon_args():
26 config = hookenv.config()
27 hookenv.open_port(PORT_DEF)
28+ charms.promreg.register(None, PORT_DEF)
29
30 files = config.get('files', False)
31 if not files: # Needed in case of empty string

Subscribers

People subscribed via source and target branches