Merge lp:~thedac/charms/precise/daisy/statsd-config into lp:~daisy-pluckers/charms/precise/daisy/trunk

Proposed by David Ames
Status: Merged
Merged at revision: 46
Proposed branch: lp:~thedac/charms/precise/daisy/statsd-config
Merge into: lp:~daisy-pluckers/charms/precise/daisy/trunk
Diff against target: 33 lines (+15/-1)
2 files modified
config.yaml (+6/-1)
hooks/config-changed (+9/-0)
To merge this branch: bzr merge lp:~thedac/charms/precise/daisy/statsd-config
Reviewer Review Type Date Requested Status
Brian Murray Approve
Review via email: mp+211782@code.launchpad.net

Description of the change

Add statsd configuration

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) :
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 2013-05-28 14:25:52 +0000
3+++ config.yaml 2014-03-19 17:09:22 +0000
4@@ -137,4 +137,9 @@
5 type: string
6 default: ''
7 description: The routing key for the rabbitMQ server for OOPS reports.
8-
9+ statsd_host:
10+ type: string
11+ description: Statsd collection host
12+ statsd_port:
13+ type: string
14+ description: statsd collection port
15
16=== modified file 'hooks/config-changed'
17--- hooks/config-changed 2013-07-05 14:16:10 +0000
18+++ hooks/config-changed 2014-03-19 17:09:22 +0000
19@@ -54,6 +54,15 @@
20
21 save_setting "oops_repository" "$OOPS_LOCAL"
22
23+# Statsd settings
24+statsd_host="$(config-get statsd_host)"
25+statsd_port="$(config-get statsd_port)"
26+
27+if [ -n "$statsd_host" ]; then
28+ save_setting statsd_host "$statsd_host"
29+ save_setting statsd_port "$statsd_port"
30+fi
31+
32 # Tell the WSGI server to reload, since we've modified $LOCAL_CONFIG_PATH.
33 wsgi_reload
34

Subscribers

People subscribed via source and target branches

to all changes: