Merge ~hloeung/influxdb-charm:master into influxdb-charm:master
- Git
- lp:~hloeung/influxdb-charm
- master
- Merge into master
Proposed by
Haw Loeung
Status: | Merged |
---|---|
Merged at revision: | c4731b9410873ec304103f52ae3197d5e7360626 |
Proposed branch: | ~hloeung/influxdb-charm:master |
Merge into: | influxdb-charm:master |
Diff against target: |
347 lines (+136/-67) 4 files modified
Makefile (+1/-1) config.yaml (+11/-2) files/influxdb.conf (+32/-40) reactive/influxdb.py (+92/-24) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Paul Collins | lgtm | Approve | |
Review via email:
|
Commit message
Description of the change
Allow overriding configs with extra_config
There's a lot of configuration options to tune and set, instead of
implementing all of them as charm config options, we use
extra_config. This is basically section.
change/set the below:
| [http]
| auth-enabled = true
We can use this:
| extra_config:
| - http.auth-
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Haw Loeung (hloeung) wrote : | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Paul Collins (pjdc) : | # |
review:
Approve
(lgtm)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/Makefile b/Makefile | |||
2 | index 5dd0577..efec4a7 100644 | |||
3 | --- a/Makefile | |||
4 | +++ b/Makefile | |||
5 | @@ -12,7 +12,7 @@ clean: | |||
6 | 12 | rm -f $(REACTIVE_DIR)/*.pyc | 12 | rm -f $(REACTIVE_DIR)/*.pyc |
7 | 13 | 13 | ||
8 | 14 | lint: | 14 | lint: |
10 | 15 | @flake8 $(REACTIVE_DIR) | 15 | @flake8 --max-line-length=120 $(REACTIVE_DIR) |
11 | 16 | 16 | ||
12 | 17 | git: | 17 | git: |
13 | 18 | git push $(PERSONAL_REPO) | 18 | git push $(PERSONAL_REPO) |
14 | diff --git a/config.yaml b/config.yaml | |||
15 | index 917e93a..840eb7b 100644 | |||
16 | --- a/config.yaml | |||
17 | +++ b/config.yaml | |||
18 | @@ -62,7 +62,7 @@ options: | |||
19 | 62 | ip_address: | 62 | ip_address: |
20 | 63 | description: "Which IP to bind on" | 63 | description: "Which IP to bind on" |
21 | 64 | type: string | 64 | type: string |
23 | 65 | default: "0.0.0.0" | 65 | default: "" |
24 | 66 | bind_port: | 66 | bind_port: |
25 | 67 | description: "Which port to bind to" | 67 | description: "Which port to bind to" |
26 | 68 | type: int | 68 | type: int |
27 | @@ -80,4 +80,13 @@ options: | |||
28 | 80 | default: 1000000 | 80 | default: 1000000 |
29 | 81 | description: | | 81 | description: | |
30 | 82 | Maximum series allowed per database before writes are dropped. | 82 | Maximum series allowed per database before writes are dropped. |
32 | 83 | Specify 0 for no limit. | 83 | Specify 0 for no limit. (DEPRECATED) Please use extra_config instead. |
33 | 84 | extra_config: | ||
34 | 85 | type: string | ||
35 | 86 | default: "" | ||
36 | 87 | description: | | ||
37 | 88 | YAML-formatted list of extra configuration options to override. | ||
38 | 89 | For example: | ||
39 | 90 | - global.hostname=myhost | ||
40 | 91 | - http.auth-enabled=true | ||
41 | 92 | - data.max-series-per-database=0 | ||
42 | diff --git a/templates/influxdb.conf b/files/influxdb.conf | |||
43 | index 77ed982..23c4e03 100644 | |||
44 | --- a/templates/influxdb.conf | |||
45 | +++ b/files/influxdb.conf | |||
46 | @@ -1,8 +1,8 @@ | |||
47 | 1 | ### Welcome to the InfluxDB configuration file. | 1 | ### Welcome to the InfluxDB configuration file. |
48 | 2 | 2 | ||
49 | 3 | # The values in this file override the default values used by the system if | 3 | # The values in this file override the default values used by the system if |
52 | 4 | # a config option is not specified. The commented out lines are the the configuration | 4 | # a config option is not specified. The commented out lines are the configuration |
53 | 5 | # field and the default value used. Uncommentting a line and changing the value | 5 | # field and the default value used. Uncommenting a line and changing the value |
54 | 6 | # will change the value used at runtime when the process is restarted. | 6 | # will change the value used at runtime when the process is restarted. |
55 | 7 | 7 | ||
56 | 8 | # Once every 24 hours InfluxDB will report usage data to usage.influxdata.com | 8 | # Once every 24 hours InfluxDB will report usage data to usage.influxdata.com |
57 | @@ -11,10 +11,8 @@ | |||
58 | 11 | # Change this option to true to disable reporting. | 11 | # Change this option to true to disable reporting. |
59 | 12 | # reporting-disabled = false | 12 | # reporting-disabled = false |
60 | 13 | 13 | ||
65 | 14 | # we'll try to get the hostname automatically, but if it the os returns something | 14 | # Bind address to use for the RPC service for backup and restore. |
66 | 15 | # that isn't resolvable by other servers in the cluster, use this option to | 15 | # bind-address = "127.0.0.1:8088" |
63 | 16 | # manually set the hostname | ||
64 | 17 | # hostname = "localhost" | ||
67 | 18 | 16 | ||
68 | 19 | ### | 17 | ### |
69 | 20 | ### [meta] | 18 | ### [meta] |
70 | @@ -49,6 +47,18 @@ | |||
71 | 49 | # The directory where the TSM storage engine stores WAL files. | 47 | # The directory where the TSM storage engine stores WAL files. |
72 | 50 | wal-dir = "/var/lib/influxdb/wal" | 48 | wal-dir = "/var/lib/influxdb/wal" |
73 | 51 | 49 | ||
74 | 50 | # The amount of time that a write will wait before fsyncing. A duration | ||
75 | 51 | # greater than 0 can be used to batch up multiple fsync calls. This is useful for slower | ||
76 | 52 | # disks or when WAL write contention is seen. A value of 0s fsyncs every write to the WAL. | ||
77 | 53 | # Values in the range of 0-100ms are recommended for non-SSD disks. | ||
78 | 54 | # wal-fsync-delay = "0s" | ||
79 | 55 | |||
80 | 56 | |||
81 | 57 | # The type of shard index to use for new shards. The default is an in-memory index that is | ||
82 | 58 | # recreated at startup. A value of "tsi1" will use a disk based index that supports higher | ||
83 | 59 | # cardinality datasets. | ||
84 | 60 | # index-version = "inmem" | ||
85 | 61 | |||
86 | 52 | # Trace logging provides more verbose output around the tsm engine. Turning | 62 | # Trace logging provides more verbose output around the tsm engine. Turning |
87 | 53 | # this on can provide more useful output for debugging tsm engine issues. | 63 | # this on can provide more useful output for debugging tsm engine issues. |
88 | 54 | # trace-logging-enabled = false | 64 | # trace-logging-enabled = false |
89 | @@ -77,10 +87,15 @@ | |||
90 | 77 | # write or delete | 87 | # write or delete |
91 | 78 | # compact-full-write-cold-duration = "4h" | 88 | # compact-full-write-cold-duration = "4h" |
92 | 79 | 89 | ||
93 | 90 | # The maximum number of concurrent full and level compactions that can run at one time. A | ||
94 | 91 | # value of 0 results in runtime.GOMAXPROCS(0) used at runtime. This setting does not apply | ||
95 | 92 | # to cache snapshotting. | ||
96 | 93 | # max-concurrent-compactions = 0 | ||
97 | 94 | |||
98 | 80 | # The maximum series allowed per database before writes are dropped. This limit can prevent | 95 | # The maximum series allowed per database before writes are dropped. This limit can prevent |
99 | 81 | # high cardinality issues at the database level. This limit can be disabled by setting it to | 96 | # high cardinality issues at the database level. This limit can be disabled by setting it to |
100 | 82 | # 0. | 97 | # 0. |
102 | 83 | max-series-per-database = {{max_series_per_database}} | 98 | # max-series-per-database = 1000000 |
103 | 84 | 99 | ||
104 | 85 | # The maximum number of tag values per tag that are allowed before writes are dropped. This limit | 100 | # The maximum number of tag values per tag that are allowed before writes are dropped. This limit |
105 | 86 | # can prevent high cardinality tag values from being written to a measurement. This limit can be | 101 | # can prevent high cardinality tag values from being written to a measurement. This limit can be |
106 | @@ -106,22 +121,20 @@ | |||
107 | 106 | # can help prevent run away queries. Setting the value to 0 disables the limit. | 121 | # can help prevent run away queries. Setting the value to 0 disables the limit. |
108 | 107 | # query-timeout = "0s" | 122 | # query-timeout = "0s" |
109 | 108 | 123 | ||
111 | 109 | # The the time threshold when a query will be logged as a slow query. This limit can be set to help | 124 | # The time threshold when a query will be logged as a slow query. This limit can be set to help |
112 | 110 | # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging. | 125 | # discover slow or resource intensive queries. Setting the value to 0 disables the slow query logging. |
113 | 111 | # log-queries-after = "0s" | 126 | # log-queries-after = "0s" |
114 | 112 | 127 | ||
117 | 113 | # The maximum number of points a SELECT can process. A value of 0 will make the maximum | 128 | # The maximum number of points a SELECT can process. A value of 0 will make |
118 | 114 | # point count unlimited. | 129 | # the maximum point count unlimited. This will only be checked every 10 seconds so queries will not |
119 | 130 | # be aborted immediately when hitting the limit. | ||
120 | 115 | # max-select-point = 0 | 131 | # max-select-point = 0 |
121 | 116 | 132 | ||
122 | 117 | # The maximum number of series a SELECT can run. A value of 0 will make the maximum series | 133 | # The maximum number of series a SELECT can run. A value of 0 will make the maximum series |
123 | 118 | # count unlimited. | 134 | # count unlimited. |
124 | 119 | |||
125 | 120 | # The maximum number of series a SELECT can run. A value of zero will make the maximum series | ||
126 | 121 | # count unlimited. | ||
127 | 122 | # max-select-series = 0 | 135 | # max-select-series = 0 |
128 | 123 | 136 | ||
130 | 124 | # The maxium number of group by time bucket a SELECt can create. A value of zero will max the maximum | 137 | # The maxium number of group by time bucket a SELECT can create. A value of zero will max the maximum |
131 | 125 | # number of buckets unlimited. | 138 | # number of buckets unlimited. |
132 | 126 | # max-select-buckets = 0 | 139 | # max-select-buckets = 0 |
133 | 127 | 140 | ||
134 | @@ -132,7 +145,7 @@ | |||
135 | 132 | ### | 145 | ### |
136 | 133 | 146 | ||
137 | 134 | [retention] | 147 | [retention] |
139 | 135 | # Determines whether retention policy enforcment enabled. | 148 | # Determines whether retention policy enforcement enabled. |
140 | 136 | # enabled = true | 149 | # enabled = true |
141 | 137 | 150 | ||
142 | 138 | # The interval of time when retention policy enforcement checks run. | 151 | # The interval of time when retention policy enforcement checks run. |
143 | @@ -177,27 +190,6 @@ | |||
144 | 177 | # store-interval = "10s" | 190 | # store-interval = "10s" |
145 | 178 | 191 | ||
146 | 179 | ### | 192 | ### |
147 | 180 | ### [admin] | ||
148 | 181 | ### | ||
149 | 182 | ### Controls the availability of the built-in, web-based admin interface. If HTTPS is | ||
150 | 183 | ### enabled for the admin interface, HTTPS must also be enabled on the [http] service. | ||
151 | 184 | ### | ||
152 | 185 | ### NOTE: This interface is deprecated as of 1.1.0 and will be removed in a future release. | ||
153 | 186 | |||
154 | 187 | [admin] | ||
155 | 188 | # Determines whether the admin service is enabled. | ||
156 | 189 | enabled = {{ admin }} | ||
157 | 190 | |||
158 | 191 | # The default bind address used by the admin service. | ||
159 | 192 | # bind-address = ":8083" | ||
160 | 193 | |||
161 | 194 | # Whether the admin service should use HTTPS. | ||
162 | 195 | # https-enabled = false | ||
163 | 196 | |||
164 | 197 | # The SSL certificate used when HTTPS is enabled. | ||
165 | 198 | # https-certificate = "/etc/ssl/influxdb.pem" | ||
166 | 199 | |||
167 | 200 | ### | ||
168 | 201 | ### [http] | 193 | ### [http] |
169 | 202 | ### | 194 | ### |
170 | 203 | ### Controls how the HTTP endpoints are configured. These are the primary | 195 | ### Controls how the HTTP endpoints are configured. These are the primary |
171 | @@ -209,15 +201,15 @@ | |||
172 | 209 | # enabled = true | 201 | # enabled = true |
173 | 210 | 202 | ||
174 | 211 | # The bind address used by the HTTP service. | 203 | # The bind address used by the HTTP service. |
176 | 212 | bind-address = "{{ip_address}}:{{bind_port}}" | 204 | # bind-address = ":8086" |
177 | 213 | 205 | ||
179 | 214 | # Determines whether HTTP authentication is enabled. | 206 | # Determines whether user authentication is enabled over HTTP/HTTPS. |
180 | 215 | # auth-enabled = false | 207 | # auth-enabled = false |
181 | 216 | 208 | ||
182 | 217 | # The default realm sent back when issuing a basic auth challenge. | 209 | # The default realm sent back when issuing a basic auth challenge. |
183 | 218 | # realm = "InfluxDB" | 210 | # realm = "InfluxDB" |
184 | 219 | 211 | ||
186 | 220 | # Determines whether HTTP request logging is enable.d | 212 | # Determines whether HTTP request logging is enabled. |
187 | 221 | # log-enabled = true | 213 | # log-enabled = true |
188 | 222 | 214 | ||
189 | 223 | # Determines whether detailed write logging is enabled. | 215 | # Determines whether detailed write logging is enabled. |
190 | @@ -429,7 +421,7 @@ | |||
191 | 429 | ### | 421 | ### |
192 | 430 | 422 | ||
193 | 431 | [continuous_queries] | 423 | [continuous_queries] |
195 | 432 | # Determiens whether the continuous query service is enabled. | 424 | # Determines whether the continuous query service is enabled. |
196 | 433 | # enabled = true | 425 | # enabled = true |
197 | 434 | 426 | ||
198 | 435 | # Controls whether queries are logged when executed by the CQ service. | 427 | # Controls whether queries are logged when executed by the CQ service. |
199 | diff --git a/reactive/influxdb.py b/reactive/influxdb.py | |||
200 | index 856c9bb..a8394de 100644 | |||
201 | --- a/reactive/influxdb.py | |||
202 | +++ b/reactive/influxdb.py | |||
203 | @@ -1,11 +1,13 @@ | |||
204 | 1 | from charmhelpers.contrib.charmsupport import nrpe | 1 | from charmhelpers.contrib.charmsupport import nrpe |
205 | 2 | from charmhelpers.core.host import service_start, service_stop | ||
206 | 3 | from charmhelpers.core import hookenv | 2 | from charmhelpers.core import hookenv |
207 | 3 | from charmhelpers.core import host | ||
208 | 4 | from charmhelpers.core.templating import render | 4 | from charmhelpers.core.templating import render |
210 | 5 | from charms.reactive import hook, set_state, when, when_any, when_not | 5 | from charms.reactive import hook, set_state, remove_state, when, when_all, when_not |
211 | 6 | 6 | ||
212 | 7 | import re | ||
213 | 7 | import os | 8 | import os |
214 | 8 | import shutil | 9 | import shutil |
215 | 10 | import yaml | ||
216 | 9 | 11 | ||
217 | 10 | CRONFILE = '/etc/cron.daily/influxdb-charm-backup' | 12 | CRONFILE = '/etc/cron.daily/influxdb-charm-backup' |
218 | 11 | CHECK_SRC = 'files/check_influxdb.py' | 13 | CHECK_SRC = 'files/check_influxdb.py' |
219 | @@ -28,29 +30,97 @@ def install_influx(): | |||
220 | 28 | hookenv.open_port(8083) | 30 | hookenv.open_port(8083) |
221 | 29 | hookenv.open_port(port) | 31 | hookenv.open_port(port) |
222 | 30 | config_changed() | 32 | config_changed() |
224 | 31 | service_start('influxdb') | 33 | host.service_start('influxdb') |
225 | 32 | hookenv.status_set('active', '') | 34 | hookenv.status_set('active', '') |
226 | 33 | set_state('influxdb.configured') | 35 | set_state('influxdb.configured') |
230 | 34 | 36 | set_state('config.changed') | |
231 | 35 | 37 | ||
232 | 36 | @when_any('config.changed.bind_port', 'config.changed.ip_address', 'config.changed.max_series_per_database') | 38 | |
233 | 39 | def apply_configs(fh, config): | ||
234 | 40 | new_config = [] | ||
235 | 41 | |||
236 | 42 | section = 'global' | ||
237 | 43 | indent = '' | ||
238 | 44 | |||
239 | 45 | section_keys_found = { | ||
240 | 46 | 'global': {}, | ||
241 | 47 | } | ||
242 | 48 | initial_comments = True | ||
243 | 49 | for line in fh: | ||
244 | 50 | # Start after initial comments "Welcome to the InfluxDB configur..." | ||
245 | 51 | if initial_comments and not line.startswith('##'): | ||
246 | 52 | initial_comments = False | ||
247 | 53 | if line.startswith('[') or (not initial_comments and line.startswith('##')): | ||
248 | 54 | if section in config: | ||
249 | 55 | # If the configs weren't found in this section let's add them. | ||
250 | 56 | for key in config[section].keys(): | ||
251 | 57 | if key in section_keys_found[section]: | ||
252 | 58 | break | ||
253 | 59 | section_keys_found[section][key] = '' | ||
254 | 60 | new_config.append("{}{} = {}\n\n".format(indent, key, config[section][key])) | ||
255 | 61 | new_config.append(line) | ||
256 | 62 | if line.startswith('['): | ||
257 | 63 | section = line[1:][:-2] | ||
258 | 64 | # Apart from global config options, indent the rest. | ||
259 | 65 | indent = ' ' | ||
260 | 66 | continue | ||
261 | 67 | # Format is 'key = value' or '# key = value' | ||
262 | 68 | match = re.match('^([\s#]*)(\S+)(\s*=.*)', line) | ||
263 | 69 | if not match: | ||
264 | 70 | new_config.append(line) | ||
265 | 71 | continue | ||
266 | 72 | key = match.group(2) | ||
267 | 73 | value = match.group(3) | ||
268 | 74 | # Store all config options we found per section. | ||
269 | 75 | if section not in section_keys_found: | ||
270 | 76 | section_keys_found[section] = {} | ||
271 | 77 | section_keys_found[section][key] = '' | ||
272 | 78 | if section not in config or key not in config[section]: | ||
273 | 79 | # We want to keep {meta,data}.{dir,wal-dir} always. | ||
274 | 80 | if section in ['meta', 'data'] and key in ['dir', 'wal-dir']: | ||
275 | 81 | new_config.append(line) | ||
276 | 82 | else: | ||
277 | 83 | new_config.append("{}# {}{}\n".format(indent, key, value)) | ||
278 | 84 | continue | ||
279 | 85 | new_config.append("{}{} = {}\n".format(indent, key, config[section][key])) | ||
280 | 86 | |||
281 | 87 | return ''.join(new_config) | ||
282 | 88 | |||
283 | 89 | |||
284 | 90 | @when_all('influxdb.configured', 'config.changed') | ||
285 | 37 | def config_changed(): | 91 | def config_changed(): |
286 | 38 | config = hookenv.config() | 92 | config = hookenv.config() |
302 | 39 | port = config.get('bind_port') | 93 | conf = { |
303 | 40 | ip_address = config.get('ip_address') | 94 | 'global': {}, |
304 | 41 | max_series_per_database = config.get('max_series_per_database') | 95 | } |
305 | 42 | render(source='influxdb.conf', | 96 | |
306 | 43 | target='/etc/influxdb/influxdb.conf', | 97 | # Only write out the bind-address if it differs from the default. |
307 | 44 | owner='root', | 98 | if config.get('ip_address') or config.get('bind_port') != 8086: |
308 | 45 | perms=0o644, | 99 | conf['http'] = {} |
309 | 46 | context={ | 100 | conf['http']['bind-address'] = '"{}:{}"'.format(config.get('ip_address', ''), |
310 | 47 | 'admin': 'true', | 101 | config.get('bind_port')) |
311 | 48 | 'bind_port': port, | 102 | |
312 | 49 | 'ip_address': ip_address, | 103 | # Construct our dict of configs from the extra_config charm option. |
313 | 50 | 'max_series_per_database': max_series_per_database, | 104 | if config.get('extra_config', None): |
314 | 51 | }) | 105 | for c in yaml.safe_load(config.get('extra_config', '[]')): |
315 | 52 | service_stop('influxdb') | 106 | k, value = c.split('=', 1) |
316 | 53 | service_start('influxdb') | 107 | section, key = k.split('.', 1) |
317 | 108 | if section not in conf: | ||
318 | 109 | conf[section] = {} | ||
319 | 110 | if str(value) in ('true', 'false') or value.isdigit(): | ||
320 | 111 | conf[section][key] = value | ||
321 | 112 | else: | ||
322 | 113 | conf[section][key] = '"{}"'.format(value) | ||
323 | 114 | |||
324 | 115 | target = '/etc/influxdb/influxdb.conf' | ||
325 | 116 | if not os.path.exists(target): | ||
326 | 117 | shutil.copy2('files/influxdb.conf', target) | ||
327 | 118 | with open(target, 'r') as f: | ||
328 | 119 | updated_config = apply_configs(f, conf) | ||
329 | 120 | host.write_file(target, updated_config.encode("utf-8"), perms=0o644) | ||
330 | 121 | |||
331 | 122 | host.service_stop('influxdb') | ||
332 | 123 | host.service_start('influxdb') | ||
333 | 54 | 124 | ||
334 | 55 | 125 | ||
335 | 56 | @when('config.changed.backup_dir') | 126 | @when('config.changed.backup_dir') |
336 | @@ -77,10 +147,8 @@ def create_backup_job(): | |||
337 | 77 | 147 | ||
338 | 78 | @hook('upgrade-charm') | 148 | @hook('upgrade-charm') |
339 | 79 | def upgrade_charm(): | 149 | def upgrade_charm(): |
341 | 80 | # Force config changed on upgrade-charm in case one of the templates changed. | 150 | remove_state('influxdb.configured') |
342 | 81 | set_state('config.changed.backup_dir') | 151 | set_state('config.changed.backup_dir') |
343 | 82 | set_state('config.changed.bind_port') | ||
344 | 83 | set_state('config.changed.ip_address') | ||
345 | 84 | # If we have an NRPE relation, force run of that as well | 152 | # If we have an NRPE relation, force run of that as well |
346 | 85 | if hookenv.relation_ids('nrpe-exteral-master'): | 153 | if hookenv.relation_ids('nrpe-exteral-master'): |
347 | 86 | set_state('nrpe-external-master.available') | 154 | set_state('nrpe-external-master.available') |
$ juju config influxdb ip_address= '127.0. 0.1'
| ubuntu@ juju-b884ff- canonistack- haw-lcy02- 4:~$ diff -Naurp /etc/influxdb/ {influxdb. conf.orig, influxdb. conf} influxdb. conf.orig 2017-11-03 00:10:10.743762811 +0000 influxdb. conf 2017-11-03 00:22:05.160094893 +0000
| --- /etc/influxdb/
| +++ /etc/influxdb/
| @@ -201,7 +201,7 @@
| # enabled = true
|
| # The bind address used by the HTTP service.
| - # bind-address = ":8086"
| + bind-address = "127.0.0.1:8086"
|
| # Determines whether user authentication is enabled over HTTP/HTTPS.
| # auth-enabled = false
| ===
$ juju config influxdb ip_address= '127.0. 0.1' bind_port='8087'
| ubuntu@ juju-b884ff- canonistack- haw-lcy02- 4:~$ diff -Naurp /etc/influxdb/ {influxdb. conf.orig, influxdb. conf} influxdb. conf.orig 2017-11-03 00:10:10.743762811 +0000 influxdb. conf 2017-11-03 00:24:00.227707065 +0000
| --- /etc/influxdb/
| +++ /etc/influxdb/
| @@ -201,7 +201,7 @@
| # enabled = true
|
| # The bind address used by the HTTP service.
| - # bind-address = ":8086"
| + bind-address = "127.0.0.1:8087"
|
| # Determines whether user authentication is enabled over HTTP/HTTPS.
| # auth-enabled = false
$ juju config influxdb extra_config="- global. hostname= myhost enabled= true series- per-database= 0
- http.auth-
- data.max-
"
| ubuntu@ juju-b884ff- canonistack- haw-lcy02- 4:~$ diff -Naurp /etc/influxdb/ {influxdb. conf.orig, influxdb. conf} influxdb. conf.orig 2017-11-03 00:10:10.743762811 +0000 influxdb. conf 2017-11-03 00:25:45.242181284 +0000 per-database = 1000000 per-database = 0
| --- /etc/influxdb/
| +++ /etc/influxdb/
| @@ -14,6 +14,8 @@
| # Bind address to use for the RPC service for backup and restore.
| # bind-address = "127.0.0.1:8088"
|
| +hostname = "myhost"
| +
| ###
| ### [meta]
| ###
| @@ -95,7 +97,7 @@
| # The maximum series allowed per database before writes are dropped. This limit can prevent
| # high cardinality issues at the database level. This limit can be disabled by setting it to
| # 0.
| - # max-series-
| + max-series-
|
| # The maximum number of tag values per tag that are allowed before writes are dropped. This limit
| # can prevent high cardinality tag values from being written to a measurement. This limit can be
| @@ -204,7 +206,7 @@
| # bind-address = ":8086"
|
| # Determines whether user authentication is enabled over HTTP/HTTPS.
| - # auth-enabled = false
| + auth-enabled = true
|
| # The default realm sent back when issuing a basic auth challenge.
| # realm = "InfluxDB"