Merge ~sajoupa/charm-telegraf:config-yaml-formatting into charm-telegraf:master

Proposed by Laurent Sesques
Status: Merged
Approved by: Alvaro Uria
Approved revision: 85f96792a9529365acb747fa86069e24a0dd3a2d
Merged at revision: 7ab859787d562e723cb4ce8faff44f26c953efa8
Proposed branch: ~sajoupa/charm-telegraf:config-yaml-formatting
Merge into: charm-telegraf:master
Diff against target: 169 lines (+21/-21)
1 file modified
config.yaml (+21/-21)
Reviewer Review Type Date Requested Status
Alvaro Uria Approve
Stuart Bishop (community) Approve
Haw Loeung +1 Approve
Review via email: mp+388640@code.launchpad.net

Commit message

config.yaml: use '>' for wrappable text instead of '|' for preserving whitespace

To post a comment you must log in.
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Haw Loeung (hloeung) wrote :

LGTM

review: Approve (+1)
Revision history for this message
Stuart Bishop (stub) wrote :

Yup

review: Approve
Revision history for this message
Alvaro Uria (aluria) wrote :

Why is this change needed? We use "|" on all the charms because we generally want to maintain multi-lines instead of wrapping all the lines into a single line.

review: Needs Information
Revision history for this message
Stuart Bishop (stub) wrote :

You use | where you do need multi-lines, such as indented lists or ascii diagrams. But most descriptions can be and render better when wrapped, allowing the charm store for instance to render the information better. But alas, looks like too many charms just used | and the charm store now wraps all the descriptions, regardless (maybe a bug, maybe deliberate to make the majority of descriptions render better, but a problem since it makes things like extra_options in this charm unreadable).

Revision history for this message
Stuart Bishop (stub) wrote :
Revision history for this message
Alvaro Uria (aluria) wrote :

Thank you the clarification, Stuart. This change makes sense and lgtm.

review: Approve
Revision history for this message
Canonical IS Mergebot (canonical-is-mergebot) wrote :

Change successfully merged at revision 7ab859787d562e723cb4ce8faff44f26c953efa8

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index 454e461..0d02176 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -18,7 +18,7 @@ options:
6 tags:
7 type: string
8 default: ""
9- description: |
10+ description: >
11 Comma separated list of global tags.
12 ie, 'dc=us-east-1,rack=1a' will tag all metrics with dc=us-east-1 and rack=1a
13 interval:
14@@ -28,26 +28,26 @@ options:
15 round_interval:
16 type: boolean
17 default: true
18- description: |
19+ description: >
20 Rounds collection interval to 'interval'
21 ie, if interval="10s" then always collect on :00, :10, :20, etc.
22 flush_interval:
23 type: string
24 default: "10s"
25- description: |
26+ description: >
27 Default data flushing interval for all outputs. You should not set this below
28 interval. Maximum flush_interval will be flush_interval + flush_jitter
29 flush_jitter:
30 type: string
31 default: "0s"
32- description: |
33+ description: >
34 Jitter the flush interval by a random amount. This is primarily to avoid
35 large write spikes for users running a large number of telegraf instances.
36 ie, a jitter of 5s and interval 10s means flushes will happen every 10-15s
37 collection_jitter:
38 type: string
39 default: "0s"
40- description: |
41+ description: >
42 Collection jitter is used to jitter the collection by a random amount.
43 Each plugin will sleep for a random time within jitter before collecting.
44 This can be used to avoid many plugins querying things like sysfs at the
45@@ -55,7 +55,7 @@ options:
46 metric_buffer_limit:
47 type: int
48 default: 10000
49- description: |
50+ description: >
51 Telegraf will cache metric_buffer_limit metrics for each output, and will
52 flush this buffer on a successful write.
53 debug:
54@@ -69,7 +69,7 @@ options:
55 hostname:
56 type: string
57 default: "{model}:{unit}"
58- description: |
59+ description: >
60 Override default hostname. {model} is replaced with the Juju
61 model name and {unit} is replaced with the sanitized unit name
62 (eg. service_name-0). {uuid} is replaced by the model UUID, for
63@@ -78,7 +78,7 @@ options:
64 prometheus_output_port:
65 type: string
66 default: "9103"
67- description: |
68+ description: >
69 If set prometheus output plugin will be configured to listen on the provided port.
70 If set to string "default" the charm will use default port (9103)
71 inputs_config:
72@@ -105,12 +105,12 @@ options:
73 snap_channel:
74 default: "stable"
75 type: string
76- description: |
77+ description: >
78 Snap Store channel from which to install the telegraf snap.
79 extra_options:
80 default: ""
81 type: string
82- description: |
83+ description: >
84 YAML with extra options for out|inputs managed by relations or in the default config.
85 example:
86 inputs:
87@@ -133,25 +133,25 @@ options:
88 extra_plugins:
89 default: ""
90 type: string
91- description: |
92+ description: >
93 Extra plugins, manually configured. This is expected to be a string
94 and will be saved "as is" in telegraf.d/extra_plugins.conf
95 disabled_plugins:
96 type: string
97 default: ""
98- description: |
99+ description: >
100 Colon(:) separated plugins names to disable, including builtin input plugins and custom exec metrics in
101 `files/telegraf_exec_metrics.py`, e.g.: cpu:mem:buddyinfo:zoneinfo
102 wait_time:
103 default: 5m
104 type: string
105- description: |
106+ description: >
107 When exporting Prometheus alerting rules, how long a condition should be
108 true before firing an alert. String, e.g. 5m, 1h, etc.
109 lead_time:
110 default: 14d
111 type: string
112- description: |
113+ description: >
114 Time period to use when alerting on predictive Prometheus rules, e.g a
115 disk might run low on space in $lead_time, based on the previous usage
116 over lead_time. Default 14d, i.e. based on the previous 14 days,
117@@ -159,33 +159,33 @@ options:
118 logfile:
119 default: /var/log/telegraf/telegraf.log
120 type: string
121- description: |
122+ description: >
123 Name of the file to be logged to when using the file logtarget.
124 If set to the empty string then logs are written to stderr.
125 prometheus_context:
126 default: juju
127 type: string
128- description: |
129+ description: >
130 A string that will be used to identify this site in the 'cloud_name'
131 label in Prometheus. If you're running multiple environments with the
132 same services in them this allows you to differentiate between them.
133 cpu_idle:
134 default: 10
135 type: int
136- description: |
137+ description: >
138 Percent of idle CPU at which to generate a Prometheus alert. Default
139 10%, i.e. alert if the CPU has less than 10% CPU running idle therefore
140 90% used by us+sy+wa+st.
141 socket_listener_port:
142 default: "8094"
143 type: string
144- description: |
145+ description: >
146 If set, the input socket_listener will listen on the specified port.
147 The default option is to listen to 8094.
148 nagios_context:
149 default: "juju"
150 type: string
151- description: |
152+ description: >
153 A string that will be prepended to instance name to set the host name
154 in nagios. So for instance the hostname would be something like:
155 juju-myservice-0
156@@ -194,12 +194,12 @@ options:
157 nagios_servicegroups:
158 default: "juju"
159 type: string
160- description: |
161+ description: >
162 Comma separated list of nagios servicegroups for the telegraf check
163 prometheus_datasource:
164 default: "prometheus"
165 type: string
166- description: |
167+ description: >
168 Specifies the datasource for Grafana dashboards. This usually corresponds
169 to the application name of the related Prometheus. Defaults to "prometheus".
170

Subscribers

People subscribed via source and target branches