Merge lp:~evarlast/charms/trusty/elasticsearch/add-logs-relation into lp:charms/trusty/elasticsearch

Proposed by Jay R. Wren
Status: Merged
Merged at revision: 40
Proposed branch: lp:~evarlast/charms/trusty/elasticsearch/add-logs-relation
Merge into: lp:charms/trusty/elasticsearch
Diff against target: 39 lines (+11/-0)
3 files modified
hooks/hooks.py (+1/-0)
metadata.yaml (+2/-0)
playbook.yaml (+8/-0)
To merge this branch: bzr merge lp:~evarlast/charms/trusty/elasticsearch/add-logs-relation
Reviewer Review Type Date Requested Status
Michael Nelson (community) Approve
charmers Pending
Review via email: mp+256299@code.launchpad.net

Description of the change

So that this charm can be related to logstash or other logger for the purpose of logging its logs, announce the log file via the logs relation.

To post a comment you must log in.
Revision history for this message
Michael Nelson (michael.nelson) wrote :

Thanks Jay. Sorry for the delay, but just ran the existing tests to ensure everything works. Would be nice to add a test of the logging relation, but not necessary right now. Cheers.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2014-07-08 13:38:52 +0000
3+++ hooks/hooks.py 2015-04-15 11:57:42 +0000
4@@ -12,6 +12,7 @@
5 default_hooks=[
6 'config-changed',
7 'cluster-relation-joined',
8+ 'logs-relation-joined',
9 'peer-relation-joined',
10 'peer-relation-departed',
11 'nrpe-external-master-relation-changed',
12
13=== added symlink 'hooks/logs-relation-joined'
14=== target is u'hooks.py'
15=== modified file 'metadata.yaml'
16--- metadata.yaml 2014-09-11 18:34:45 +0000
17+++ metadata.yaml 2015-04-15 11:57:42 +0000
18@@ -16,3 +16,5 @@
19 nrpe-external-master:
20 interface: nrpe-external-master
21 scope: container
22+ logs:
23+ interface: logs
24
25=== modified file 'playbook.yaml'
26--- playbook.yaml 2014-10-31 03:43:31 +0000
27+++ playbook.yaml 2015-04-15 11:57:42 +0000
28@@ -60,3 +60,11 @@
29 cluster-name={{ cluster_name }}
30 host={{ ansible_default_ipv4.address }}
31 port=9200
32+
33+ - name: Relate logs
34+ tags:
35+ - logs-relation-joined
36+ command: >
37+ relation-set
38+ file=/var/log/elasticsearch/elasticsearch.log
39+ type=elasticsearch

Subscribers

People subscribed via source and target branches