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

Proposed by David Ames
Status: Merged
Merged at revision: 50
Proposed branch: lp:~thedac/charms/precise/daisy-retracer/statsd-config
Merge into: lp:~daisy-pluckers/charms/precise/daisy-retracer/trunk
Diff against target: 31 lines (+13/-0)
2 files modified
config.yaml (+6/-0)
hooks/config-changed (+7/-0)
To merge this branch: bzr merge lp:~thedac/charms/precise/daisy-retracer/statsd-config
Reviewer Review Type Date Requested Status
Daisy Pluckers Pending
Review via email: mp+211799@code.launchpad.net

Description of the change

Add statsd configuration

To post a comment you must log in.
51. By David Ames

Fix removed comment

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-07-05 14:21:58 +0000
3+++ config.yaml 2014-03-19 18:18:04 +0000
4@@ -134,3 +134,9 @@
5 default: ''
6 description: |
7 The Cassandra RPC password. Leave blank if one is not needed.
8+ statsd_host:
9+ type: string
10+ description: Statsd collection host
11+ statsd_port:
12+ type: string
13+ description: statsd collection port
14
15=== modified file 'hooks/config-changed'
16--- hooks/config-changed 2013-07-05 14:21:58 +0000
17+++ hooks/config-changed 2014-03-19 18:18:04 +0000
18@@ -34,6 +34,13 @@
19 [ -n "$ec2_host" ] && save_setting ec2_host "$ec2_host"
20 [ -n "$ec2_bucket" ] && save_setting ec2_bucket "$ec2_bucket"
21
22+# statsd settings
23+statsd_host="$(config-get statsd_host)"
24+statsd_port="$(config-get statsd_port)"
25+
26+[ -n "$statsd_host" ] && save_setting statsd_host "$statsd_host"
27+[ -n "$statsd_port" ] && save_setting statsd_port "$statsd_port"
28+
29 # If the user has set daisy-cassandra-host to null, set cassandra_hosts back to
30 # an empty list.
31 [ -n "$cassandra_host" ] && save_cassandra "$cassandra_host" #|| \

Subscribers

People subscribed via source and target branches

to all changes: