Merge lp:~brad-marshall/charms/trusty/rsyslog-forwarder/add-udp-listener into lp:charms/trusty/rsyslog-forwarder

Proposed by Brad Marshall
Status: Merged
Merge reported by: Adam Israel
Merged at revision: not available
Proposed branch: lp:~brad-marshall/charms/trusty/rsyslog-forwarder/add-udp-listener
Merge into: lp:charms/trusty/rsyslog-forwarder
Diff against target: 36 lines (+15/-0)
3 files modified
config.yaml (+4/-0)
files/listen_udp.template (+2/-0)
hooks/config-changed (+9/-0)
To merge this branch: bzr merge lp:~brad-marshall/charms/trusty/rsyslog-forwarder/add-udp-listener
Reviewer Review Type Date Requested Status
Adam Israel (community) Approve
Review Queue (community) automated testing Approve
Review via email: mp+280231@code.launchpad.net

Description of the change

Add a config option to set a UDP listener for rsyslog.

To post a comment you must log in.
12. By Brad Marshall

[bradm] Fixed bug with variable not being passed properly

13. By Brad Marshall

[bradm] Update listen-udp config description

Revision history for this message
Review Queue (review-queue) wrote :

This item has failed automated testing! Results available here http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/1854/

review: Needs Fixing (automated testing)
Revision history for this message
Review Queue (review-queue) wrote :

The results (PASS) are in and available here: http://juju-ci.vapour.ws:8080/job/charm-bundle-test-aws/1834/

review: Approve (automated testing)
Revision history for this message
Adam Israel (aisrael) wrote :

Hi Brad,

Thanks for this merge proposal. Looks good to me! +1

review: Approve

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 2012-10-25 14:56:57 +0000
3+++ config.yaml 2015-12-14 05:24:28 +0000
4@@ -3,3 +3,7 @@
5 type: boolean
6 default: false
7 description: Should logs be written locally as well as forwarded?
8+ listen-udp:
9+ type: boolean
10+ default: false
11+ description: Required to support UDP syslog clients.
12
13=== added file 'files/listen_udp.template'
14--- files/listen_udp.template 1970-01-01 00:00:00 +0000
15+++ files/listen_udp.template 2015-12-14 05:24:28 +0000
16@@ -0,0 +1,2 @@
17+$ModLoad imudp
18+$UDPServerRun 514
19
20=== modified file 'hooks/config-changed'
21--- hooks/config-changed 2013-01-24 11:57:05 +0000
22+++ hooks/config-changed 2015-12-14 05:24:28 +0000
23@@ -9,4 +9,13 @@
24 rm -f /etc/rsyslog.d/81-local.conf
25 fi
26
27+listen_udp=`config-get listen-udp`
28+listen_udp=${listen_udp,,}
29+
30+if [ "$listen_udp" == "true" ]; then
31+ install -o root -g root -m 0644 files/listen_udp.template /etc/rsyslog.d/82-listen-udp.conf
32+else
33+ rm -f /etc/rsyslog.d/82-listen-udp.conf
34+fi
35+
36 service rsyslog restart

Subscribers

People subscribed via source and target branches

to all changes: