Merge lp:~verterok/charms/trusty/telegraf/proper-templates into lp:~ubuntuone-hackers/charms/trusty/telegraf/trunk
- Trusty Tahr (14.04)
- proper-templates
- Merge into trunk
Proposed by
Guillermo Gonzalez
Status: | Merged |
---|---|
Approved by: | Guillermo Gonzalez |
Approved revision: | 17 |
Merged at revision: | 16 |
Proposed branch: | lp:~verterok/charms/trusty/telegraf/proper-templates |
Merge into: | lp:~ubuntuone-hackers/charms/trusty/telegraf/trunk |
Diff against target: |
341 lines (+146/-14) 5 files modified
README.md (+23/-0) config.yaml (+25/-1) hooks/actions.py (+75/-13) hooks/services.py (+1/-0) templates/base_inputs.conf (+22/-0) |
To merge this branch: | bzr merge lp:~verterok/charms/trusty/telegraf/proper-templates |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bret Barker (community) | Approve | ||
Review via email: mp+290512@code.launchpad.net |
Commit message
Support telegraf updates, use jinja templates for plugin templates and add extra_options config to be able to fine tune each plugin
Description of the change
- support telegraf updates
- use jinja templates for plugin templates
- add extra_options config, to be able to fine tune each plugin
To post a comment you must log in.
- 17. By Guillermo Gonzalez
-
fix README wording
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'README.md' | |||
2 | --- README.md 2016-02-01 15:13:24 +0000 | |||
3 | +++ README.md 2016-03-30 20:53:04 +0000 | |||
4 | @@ -24,6 +24,29 @@ | |||
5 | 24 | 24 | ||
6 | 25 | The only output plugin supported via relation is influxdb, any other output plugin needs to be configured manually (via juju set) | 25 | The only output plugin supported via relation is influxdb, any other output plugin needs to be configured manually (via juju set) |
7 | 26 | 26 | ||
8 | 27 | To configure any of the (default or via relation) plugins, the extra_options charm config can be used. It's string in yaml format, for example: | ||
9 | 28 | |||
10 | 29 | inputs: | ||
11 | 30 | cpu: | ||
12 | 31 | percpu: 'false' | ||
13 | 32 | fielddrop: '["time_*"]' | ||
14 | 33 | disk: | ||
15 | 34 | mount_points: '["/"]' | ||
16 | 35 | ignore_fs: '["tmpfs", "devtmpfs"]' | ||
17 | 36 | elasticsearch: | ||
18 | 37 | local: 'false' | ||
19 | 38 | cluster_health: 'true' | ||
20 | 39 | postgresql: | ||
21 | 40 | databases: '["foo", "bar"]' | ||
22 | 41 | tagpass: | ||
23 | 42 | db: '["template", "postgres"]' | ||
24 | 43 | outputs: | ||
25 | 44 | influxdb: | ||
26 | 45 | precision: "ms" | ||
27 | 46 | |||
28 | 47 | This extra options will only be applied to plugins defined in templates/base_inputs.conf and any other plugins configured via relations. | ||
29 | 48 | |||
30 | 49 | |||
31 | 27 | To use a different metrics storage, e.g: graphite. the plugin configuration needs to be set as a base64 string in outputs_config configuration. | 50 | To use a different metrics storage, e.g: graphite. the plugin configuration needs to be set as a base64 string in outputs_config configuration. |
32 | 28 | 51 | ||
33 | 29 | For exmaple, save the following config to a file: | 52 | For exmaple, save the following config to a file: |
34 | 30 | 53 | ||
35 | === modified file 'config.yaml' | |||
36 | --- config.yaml 2016-02-25 18:36:59 +0000 | |||
37 | +++ config.yaml 2016-03-30 20:53:04 +0000 | |||
38 | @@ -66,7 +66,7 @@ | |||
39 | 66 | default: "" | 66 | default: "" |
40 | 67 | description: "[outputs.xxx] sections as base64 string" | 67 | description: "[outputs.xxx] sections as base64 string" |
41 | 68 | package_name: | 68 | package_name: |
43 | 69 | default: "telegraf_0.10.1-1_amd64.deb" | 69 | default: "telegraf_0.10.1-1_amd64.deb" |
44 | 70 | type: string | 70 | type: string |
45 | 71 | description: | | 71 | description: | |
46 | 72 | Filename of telegraf deb package. If this matches the | 72 | Filename of telegraf deb package. If this matches the |
47 | @@ -81,4 +81,28 @@ | |||
48 | 81 | default: "" | 81 | default: "" |
49 | 82 | type: string | 82 | type: string |
50 | 83 | description: "GPG key for apt_repository" | 83 | description: "GPG key for apt_repository" |
51 | 84 | extra_options: | ||
52 | 85 | default: "" | ||
53 | 86 | type: string | ||
54 | 87 | description: | | ||
55 | 88 | YAML with extra options for out|inputs managed by relations or in the default config. | ||
56 | 89 | Values must be strings. | ||
57 | 90 | example: | ||
58 | 91 | inputs: | ||
59 | 92 | cpu: | ||
60 | 93 | percpu: 'false' | ||
61 | 94 | fielddrop: '["time_*"]' | ||
62 | 95 | disk: | ||
63 | 96 | mount_points: '["/"]' | ||
64 | 97 | ignore_fs: '["tmpfs", "devtmpfs"]' | ||
65 | 98 | elasticsearch: | ||
66 | 99 | local: 'false' | ||
67 | 100 | cluster_health: 'true' | ||
68 | 101 | postgresql: | ||
69 | 102 | databases: '["foo", "bar"]' | ||
70 | 103 | tagpass: | ||
71 | 104 | db: '["template", "postgres"]' | ||
72 | 105 | outputs: | ||
73 | 106 | influxdb: | ||
74 | 107 | precision: "ms" | ||
75 | 84 | 108 | ||
76 | 85 | 109 | ||
77 | === modified file 'hooks/actions.py' | |||
78 | --- hooks/actions.py 2016-03-11 15:36:40 +0000 | |||
79 | +++ hooks/actions.py 2016-03-30 20:53:04 +0000 | |||
80 | @@ -4,11 +4,15 @@ | |||
81 | 4 | import subprocess | 4 | import subprocess |
82 | 5 | import sys | 5 | import sys |
83 | 6 | 6 | ||
84 | 7 | import yaml | ||
85 | 8 | |||
86 | 7 | from charmhelpers.core import hookenv, host | 9 | from charmhelpers.core import hookenv, host |
87 | 8 | from charmhelpers.core.templating import render | 10 | from charmhelpers.core.templating import render |
88 | 9 | from charmhelpers.core.services.base import ManagerCallback | 11 | from charmhelpers.core.services.base import ManagerCallback |
89 | 10 | from charmhelpers.fetch import apt_install, apt_update, add_source | 12 | from charmhelpers.fetch import apt_install, apt_update, add_source |
90 | 11 | 13 | ||
91 | 14 | from jinja2 import Template | ||
92 | 15 | |||
93 | 12 | 16 | ||
94 | 13 | CONFIG_FILE = '/etc/telegraf/telegraf.conf' | 17 | CONFIG_FILE = '/etc/telegraf/telegraf.conf' |
95 | 14 | 18 | ||
96 | @@ -32,6 +36,8 @@ | |||
97 | 32 | return old | 36 | return old |
98 | 33 | 37 | ||
99 | 34 | def __call__(self, manager, service_name, event_name): | 38 | def __call__(self, manager, service_name, event_name): |
100 | 39 | if hookenv.hook_name() in ('update-status',): | ||
101 | 40 | return | ||
102 | 35 | new_hash = host.file_hash(CONFIG_FILE) | 41 | new_hash = host.file_hash(CONFIG_FILE) |
103 | 36 | old_hash = self._update_persisted_data('config_hash', new_hash) | 42 | old_hash = self._update_persisted_data('config_hash', new_hash) |
104 | 37 | if new_hash != old_hash: | 43 | if new_hash != old_hash: |
105 | @@ -59,7 +65,9 @@ | |||
106 | 59 | pkg_file = os.path.join(hookenv.charm_dir(), "files", | 65 | pkg_file = os.path.join(hookenv.charm_dir(), "files", |
107 | 60 | config['package_name']) | 66 | config['package_name']) |
108 | 61 | if os.path.exists(pkg_file): | 67 | if os.path.exists(pkg_file): |
110 | 62 | if subprocess.call(["dpkg", "-i", pkg_file]) != 0: | 68 | env = os.environ.copy() |
111 | 69 | env['DEBIAN_FRONTEND'] = 'noninteractive' | ||
112 | 70 | if subprocess.call(["dpkg", "-i", "--force-confold", pkg_file], env=env) != 0: | ||
113 | 63 | hookenv.log("CHARM: Error installing telegraf package") | 71 | hookenv.log("CHARM: Error installing telegraf package") |
114 | 64 | sys.exit(1) | 72 | sys.exit(1) |
115 | 65 | else: | 73 | else: |
116 | @@ -70,12 +78,22 @@ | |||
117 | 70 | apt_install(config['package_name'], options=['--force-yes']) | 78 | apt_install(config['package_name'], options=['--force-yes']) |
118 | 71 | 79 | ||
119 | 72 | 80 | ||
120 | 81 | def update_telegraf(service_name): | ||
121 | 82 | config = hookenv.config() | ||
122 | 83 | if hookenv.hook_name() == 'config-changed' \ | ||
123 | 84 | and config.changed('package_name'): | ||
124 | 85 | install() | ||
125 | 86 | elif hookenv.hook_name() == 'upgrade-charm': | ||
126 | 87 | install() | ||
127 | 88 | |||
128 | 89 | |||
129 | 73 | def log_start(service_name): | 90 | def log_start(service_name): |
130 | 74 | hookenv.log('telegraf starting') | 91 | hookenv.log('telegraf starting') |
131 | 75 | 92 | ||
132 | 76 | 93 | ||
133 | 77 | def render_config(service_name): | 94 | def render_config(service_name): |
134 | 78 | config = hookenv.config() | 95 | config = hookenv.config() |
135 | 96 | extra_options = get_extra_options() | ||
136 | 79 | context = config.copy() | 97 | context = config.copy() |
137 | 80 | inputs = base64.b64decode(config['inputs_config']) | 98 | inputs = base64.b64decode(config['inputs_config']) |
138 | 81 | outputs = base64.b64decode(config['outputs_config']) | 99 | outputs = base64.b64decode(config['outputs_config']) |
139 | @@ -90,7 +108,9 @@ | |||
140 | 90 | else: | 108 | else: |
141 | 91 | # use base inputs from charm templates | 109 | # use base inputs from charm templates |
142 | 92 | with open('templates/base_inputs.conf', 'r') as fd: | 110 | with open('templates/base_inputs.conf', 'r') as fd: |
144 | 93 | context["inputs"] = fd.read() | 111 | context["inputs"] = render_template( |
145 | 112 | fd.read(), | ||
146 | 113 | {'extra_options': extra_options['inputs']}) | ||
147 | 94 | if outputs: | 114 | if outputs: |
148 | 95 | context["outputs"] = outputs | 115 | context["outputs"] = outputs |
149 | 96 | else: | 116 | else: |
150 | @@ -119,12 +139,45 @@ | |||
151 | 119 | return rels[0]['__unit__'] | 139 | return rels[0]['__unit__'] |
152 | 120 | 140 | ||
153 | 121 | 141 | ||
154 | 142 | def get_extra_options(): | ||
155 | 143 | extra_options = {'inputs': {}, 'outpus': {}} | ||
156 | 144 | extra_options_raw = hookenv.config()['extra_options'] | ||
157 | 145 | extra_opts = yaml.load(extra_options_raw) or {} | ||
158 | 146 | extra_options.update(extra_opts) | ||
159 | 147 | return extra_options | ||
160 | 148 | |||
161 | 149 | |||
162 | 150 | def render_extra_options(kind, name): | ||
163 | 151 | template = """ | ||
164 | 152 | {% if extra_options %} | ||
165 | 153 | {% for key, value in extra_options.items() %} | ||
166 | 154 | {% if key == 'tagpass' or key == 'tagdrop' %} | ||
167 | 155 | [{{ kind }}.{{ name }}.{{key}}] | ||
168 | 156 | {% for tag, tagvalue in value.items() %} | ||
169 | 157 | {{ tag }} = {{ tagvalue }} | ||
170 | 158 | {% endfor %} | ||
171 | 159 | {% else %} | ||
172 | 160 | {{ key }} = {{ value }} | ||
173 | 161 | {% endif %} | ||
174 | 162 | {% endfor %} | ||
175 | 163 | {% endif %} | ||
176 | 164 | """ | ||
177 | 165 | extra_options = get_extra_options() | ||
178 | 166 | context = {"extra_options": extra_options[kind].get(name, {}), | ||
179 | 167 | "kind": kind, | ||
180 | 168 | "name": name} | ||
181 | 169 | return render_template(template, context) | ||
182 | 170 | |||
183 | 171 | |||
184 | 172 | def render_template(template, context): | ||
185 | 173 | tmpl = Template(template, lstrip_blocks=True, trim_blocks=True) | ||
186 | 174 | return tmpl.render(**context) | ||
187 | 175 | |||
188 | 176 | |||
189 | 122 | def elasticsearch_input(service_name): | 177 | def elasticsearch_input(service_name): |
190 | 123 | template = """ | 178 | template = """ |
195 | 124 | [elasticsearch] | 179 | [[inputs.elasticsearch]] |
196 | 125 | servers = {} | 180 | servers = {{ servers }} |
193 | 126 | local = true | ||
194 | 127 | cluster_health = true | ||
197 | 128 | """ | 181 | """ |
198 | 129 | rels = hookenv.relations_of_type('elasticsearch') | 182 | rels = hookenv.relations_of_type('elasticsearch') |
199 | 130 | hosts = [] | 183 | hosts = [] |
200 | @@ -138,7 +191,9 @@ | |||
201 | 138 | hosts.append("http://{}:{}".format(es_host, port)) | 191 | hosts.append("http://{}:{}".format(es_host, port)) |
202 | 139 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'elasticsearch') | 192 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'elasticsearch') |
203 | 140 | if hosts: | 193 | if hosts: |
205 | 141 | inputs.append(template.format(json.dumps(hosts))) | 194 | context = {"servers": json.dumps(hosts)} |
206 | 195 | inputs.append(render_template(template, context) + \ | ||
207 | 196 | render_extra_options("inputs", "elasticsearch")) | ||
208 | 142 | hookenv.log("Updating {} plugin config file".format('elasticsearch')) | 197 | hookenv.log("Updating {} plugin config file".format('elasticsearch')) |
209 | 143 | host.write_file(config_path, '\n'.join(inputs)) | 198 | host.write_file(config_path, '\n'.join(inputs)) |
210 | 144 | elif os.path.exists(config_path): | 199 | elif os.path.exists(config_path): |
211 | @@ -148,7 +203,7 @@ | |||
212 | 148 | def mongodb_input(service_name): | 203 | def mongodb_input(service_name): |
213 | 149 | template = """ | 204 | template = """ |
214 | 150 | [[inputs.mongodb]] | 205 | [[inputs.mongodb]] |
216 | 151 | servers = {} | 206 | servers = {{ servers }} |
217 | 152 | """ | 207 | """ |
218 | 153 | rels = hookenv.relations_of_type('mongodb') | 208 | rels = hookenv.relations_of_type('mongodb') |
219 | 154 | mongo_addresses = [] | 209 | mongo_addresses = [] |
220 | @@ -163,7 +218,10 @@ | |||
221 | 163 | mongo_addresses.append(mongo_address) | 218 | mongo_addresses.append(mongo_address) |
222 | 164 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'mongodb') | 219 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'mongodb') |
223 | 165 | if mongo_addresses: | 220 | if mongo_addresses: |
225 | 166 | inputs.append(template.format(json.dumps(mongo_addresses))) | 221 | extra_options = get_extra_options() |
226 | 222 | context = {"servers": json.dumps(mongo_addresses)} | ||
227 | 223 | inputs.append(render_template(template, context) + \ | ||
228 | 224 | render_extra_options("inputs", "mongodb")) | ||
229 | 167 | hookenv.log("Updating {} plugin config file".format('mongodb')) | 225 | hookenv.log("Updating {} plugin config file".format('mongodb')) |
230 | 168 | host.write_file(config_path, '\n'.join(inputs)) | 226 | host.write_file(config_path, '\n'.join(inputs)) |
231 | 169 | elif os.path.exists(config_path): | 227 | elif os.path.exists(config_path): |
232 | @@ -173,15 +231,18 @@ | |||
233 | 173 | def postgresql_input(service_name): | 231 | def postgresql_input(service_name): |
234 | 174 | template = """ | 232 | template = """ |
235 | 175 | [[inputs.postgresql]] | 233 | [[inputs.postgresql]] |
237 | 176 | address = "host={host} user={user} password={password} dbname={database}" | 234 | address = "host={{host}} user={{user}} password={{password}} dbname={{database}}" |
238 | 177 | """ | 235 | """ |
239 | 178 | required_keys = ['host', 'user', 'password', 'database'] | 236 | required_keys = ['host', 'user', 'password', 'database'] |
240 | 179 | rels = hookenv.relations_of_type('postgresql') | 237 | rels = hookenv.relations_of_type('postgresql') |
241 | 238 | extra_options = get_extra_options() | ||
242 | 180 | inputs = [] | 239 | inputs = [] |
243 | 181 | for rel in rels: | 240 | for rel in rels: |
244 | 182 | if all([rel.get(key) for key in required_keys]) \ | 241 | if all([rel.get(key) for key in required_keys]) \ |
245 | 183 | and hookenv.local_unit() in rel.get('allowed-units'): | 242 | and hookenv.local_unit() in rel.get('allowed-units'): |
247 | 184 | inputs.append(template.format(**rel)) | 243 | context = rel.copy() |
248 | 244 | inputs.append(render_template(template, context) + \ | ||
249 | 245 | render_extra_options("inputs", "postgresql")) | ||
250 | 185 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'postgresql') | 246 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'postgresql') |
251 | 186 | if inputs: | 247 | if inputs: |
252 | 187 | hookenv.log("Updating {} plugin config file".format('postgresql')) | 248 | hookenv.log("Updating {} plugin config file".format('postgresql')) |
253 | @@ -193,7 +254,7 @@ | |||
254 | 193 | def haproxy_input(service_name): | 254 | def haproxy_input(service_name): |
255 | 194 | template = """ | 255 | template = """ |
256 | 195 | [[inputs.haproxy]] | 256 | [[inputs.haproxy]] |
258 | 196 | servers = {} | 257 | servers = {{ servers }} |
259 | 197 | """ | 258 | """ |
260 | 198 | rels = hookenv.relations_of_type('haproxy') | 259 | rels = hookenv.relations_of_type('haproxy') |
261 | 199 | haproxy_addresses = [] | 260 | haproxy_addresses = [] |
262 | @@ -220,7 +281,8 @@ | |||
263 | 220 | haproxy_addresses.append(haproxy_address) | 281 | haproxy_addresses.append(haproxy_address) |
264 | 221 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'haproxy') | 282 | config_path = '{}/{}.conf'.format(CONFIG_DIR, 'haproxy') |
265 | 222 | if haproxy_addresses: | 283 | if haproxy_addresses: |
267 | 223 | inputs.append(template.format(json.dumps(haproxy_addresses))) | 284 | inputs.append(render_template(template, {"servers": json.dumps(haproxy_addresses)}) + \ |
268 | 285 | render_extra_options("inputs", "haproxy")) | ||
269 | 224 | hookenv.log("Updating {} plugin config file".format('haproxy')) | 286 | hookenv.log("Updating {} plugin config file".format('haproxy')) |
270 | 225 | host.write_file(config_path, '\n'.join(inputs)) | 287 | host.write_file(config_path, '\n'.join(inputs)) |
271 | 226 | elif os.path.exists(config_path): | 288 | elif os.path.exists(config_path): |
272 | 227 | 289 | ||
273 | === modified file 'hooks/services.py' | |||
274 | --- hooks/services.py 2016-03-03 19:44:28 +0000 | |||
275 | +++ hooks/services.py 2016-03-30 20:53:04 +0000 | |||
276 | @@ -15,6 +15,7 @@ | |||
277 | 15 | 'required_data': [ | 15 | 'required_data': [ |
278 | 16 | ], | 16 | ], |
279 | 17 | 'data_ready': [ | 17 | 'data_ready': [ |
280 | 18 | actions.update_telegraf, | ||
281 | 18 | actions.render_config, | 19 | actions.render_config, |
282 | 19 | actions.elasticsearch_input, | 20 | actions.elasticsearch_input, |
283 | 20 | actions.mongodb_input, | 21 | actions.mongodb_input, |
284 | 21 | 22 | ||
285 | === modified file 'templates/base_inputs.conf' | |||
286 | --- templates/base_inputs.conf 2016-02-25 21:08:33 +0000 | |||
287 | +++ templates/base_inputs.conf 2016-03-30 20:53:04 +0000 | |||
288 | @@ -1,17 +1,37 @@ | |||
289 | 1 | {% macro render_options(name, options) %} | ||
290 | 2 | {% if options[name] %} | ||
291 | 3 | {% for key, value in options[name].items() %} | ||
292 | 4 | {% if key == 'tagpass' or key == 'tagdrop' %} | ||
293 | 5 | [inputs.{{ name }}.{{key}}] | ||
294 | 6 | {% for tag, tagvalue in value.items() %} | ||
295 | 7 | {{ tag }} = {{ tagvalue }} | ||
296 | 8 | {% endfor %} | ||
297 | 9 | {% else %} | ||
298 | 10 | {{ key }} = {{ value }} | ||
299 | 11 | {% endif %} | ||
300 | 12 | {% endfor %} | ||
301 | 13 | {% endif %} | ||
302 | 14 | {% endmacro %} | ||
303 | 15 | |||
304 | 1 | # Read metrics about cpu usage | 16 | # Read metrics about cpu usage |
305 | 2 | [[inputs.cpu]] | 17 | [[inputs.cpu]] |
306 | 18 | {% if extra_options['cpu'] %} | ||
307 | 19 | {{ render_options('cpu', extra_options) }} | ||
308 | 20 | {% else %} | ||
309 | 3 | # Whether to report per-cpu stats or not | 21 | # Whether to report per-cpu stats or not |
310 | 4 | percpu = true | 22 | percpu = true |
311 | 5 | # Whether to report total system cpu stats or not | 23 | # Whether to report total system cpu stats or not |
312 | 6 | totalcpu = true | 24 | totalcpu = true |
313 | 7 | # Comment this line if you want the raw CPU time metrics | 25 | # Comment this line if you want the raw CPU time metrics |
314 | 8 | drop = ["time_*"] | 26 | drop = ["time_*"] |
315 | 27 | {% endif %} | ||
316 | 9 | 28 | ||
317 | 10 | # Read metrics about disk usage by mount point | 29 | # Read metrics about disk usage by mount point |
318 | 11 | [[inputs.disk]] | 30 | [[inputs.disk]] |
319 | 12 | # By default, telegraf gather stats for all mountpoints. | 31 | # By default, telegraf gather stats for all mountpoints. |
320 | 13 | # Setting mountpoints will restrict the stats to the specified mountpoints. | 32 | # Setting mountpoints will restrict the stats to the specified mountpoints. |
321 | 14 | # mount_points=["/"] | 33 | # mount_points=["/"] |
322 | 34 | {{ render_options('disk', extra_options) }} | ||
323 | 15 | 35 | ||
324 | 16 | # Read metrics about disk IO by device | 36 | # Read metrics about disk IO by device |
325 | 17 | [[inputs.diskio]] | 37 | [[inputs.diskio]] |
326 | @@ -21,6 +41,7 @@ | |||
327 | 21 | # devices = ["sda", "sdb"] | 41 | # devices = ["sda", "sdb"] |
328 | 22 | # Uncomment the following line if you do not need disk serial numbers. | 42 | # Uncomment the following line if you do not need disk serial numbers. |
329 | 23 | # skip_serial_number = true | 43 | # skip_serial_number = true |
330 | 44 | {{ render_options('diskio', extra_options) }} | ||
331 | 24 | 45 | ||
332 | 25 | # Read metrics about memory usage | 46 | # Read metrics about memory usage |
333 | 26 | [[inputs.mem]] | 47 | [[inputs.mem]] |
334 | @@ -33,6 +54,7 @@ | |||
335 | 33 | # regardless of status. | 54 | # regardless of status. |
336 | 34 | # | 55 | # |
337 | 35 | # interfaces = ["eth0", ... ] | 56 | # interfaces = ["eth0", ... ] |
338 | 57 | {{ render_options('net', extra_options) }} | ||
339 | 36 | 58 | ||
340 | 37 | # Read metrics about TCP status such as established, time wait etc and UDP sockets counts. | 59 | # Read metrics about TCP status such as established, time wait etc and UDP sockets counts. |
341 | 38 | [[inputs.netstat]] | 60 | [[inputs.netstat]] |
wording nitpick below, otherwise good job!