Merge lp:~mevers/charms/trusty/logstash/inputTcp into lp:~tanuki/charms/trusty/logstash/trunk

Proposed by Martijn Evers
Status: Needs review
Proposed branch: lp:~mevers/charms/trusty/logstash/inputTcp
Merge into: lp:~tanuki/charms/trusty/logstash/trunk
Diff against target: 61 lines (+21/-3)
4 files modified
config.yaml (+2/-2)
hooks/input-tcp-relation-changed (+16/-0)
metadata.yaml (+2/-0)
templates/input-file-syslog.conf (+1/-1)
To merge this branch: bzr merge lp:~mevers/charms/trusty/logstash/inputTcp
Reviewer Review Type Date Requested Status
Tanuki Squad Pending
Review via email: mp+273400@code.launchpad.net

Description of the change

Added input-tcp plugin/relation.

To post a comment you must log in.
60. By Martijn Evers

Use a newer version of Logstash

Unmerged revisions

60. By Martijn Evers

Use a newer version of Logstash

59. By Martijn Evers

Added input-tcp (port 9999) relation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'config.yaml'
2--- config.yaml 2015-09-29 19:30:00 +0000
3+++ config.yaml 2015-10-13 13:11:12 +0000
4@@ -1,11 +1,11 @@
5 options:
6 logstash-source:
7 type: string
8- default: "https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz"
9+ default: "https://download.elastic.co/logstash/logstash/logstash-1.5.4.tar.gz"
10 description: The logstash binary file to install to this charm.
11 logstash-sum:
12 type: string
13- default: "d59ef579c7614c5df9bd69cfdce20ed371f728ff"
14+ default: "c892b71a3902bfdb54827385ed2c26a14ad816dd"
15 description: The checksum value for the logstash file.
16 extra-packages:
17 type: string
18
19=== added file 'hooks/input-tcp-relation-changed'
20--- hooks/input-tcp-relation-changed 1970-01-01 00:00:00 +0000
21+++ hooks/input-tcp-relation-changed 2015-10-13 13:11:12 +0000
22@@ -0,0 +1,16 @@
23+#!/bin/bash
24+
25+set -eux
26+
27+hostname=$(unit-get private-address)
28+juju-log "input-tcp-relation-joined/changed, setting port: 9999"
29+relation-set port=9999 hostname=$hostname
30+
31+basePath=/opt/logstash
32+configPath=${basePath}/conf.d
33+
34+echo -e 'input {\n\ttcp {\n\t\tport => 9999\n\t\tcodec => "json"\n\t}\n}' > ${configPath}/input-tcp.conf
35+
36+if [ "$(service logstash-indexer status | grep running)" ]; then
37+ service logstash-indexer restart
38+fi
39
40=== added symlink 'hooks/input-tcp-relation-joined'
41=== target is u'input-tcp-relation-changed'
42=== modified file 'metadata.yaml'
43--- metadata.yaml 2015-05-05 04:08:45 +0000
44+++ metadata.yaml 2015-10-13 13:11:12 +0000
45@@ -19,6 +19,8 @@
46 nrpe-external-master:
47 interface: nrpe-external-master
48 scope: container
49+ input-tcp:
50+ interface: logstash-tcp
51 requires:
52 client:
53 interface: elasticsearch
54
55=== modified file 'templates/input-file-syslog.conf'
56--- templates/input-file-syslog.conf 2014-09-23 12:12:45 +0000
57+++ templates/input-file-syslog.conf 2015-10-13 13:11:12 +0000
58@@ -1,1 +1,1 @@
59-input { file { type => 'syslog' path => ['/var/log/syslog','/var/log/kern.log','/var/log/auth.log','/var/log/dpkg.log'] sincedb_path => '{{BASEPATH}}' } }
60\ No newline at end of file
61+input { file { type => 'syslog' path => ['/var/log/syslog','/var/log/kern.log','/var/log/auth.log','/var/log/dpkg.log'] sincedb_path => '{{BASEPATH}}/sincedb' } }

Subscribers

People subscribed via source and target branches

to all changes: