Skip to content

Commit 9b1f049

Browse files
committed
20220327 Telegraf documentation
Repairs broken internal hyperlinks by restoring internal anchors. Restored anchors converted to null-anchor form. Signed-off-by: Phill Kelley <[email protected]>
1 parent 9cc8533 commit 9b1f049

File tree

1 file changed

+26
-26
lines changed

1 file changed

+26
-26
lines changed

docs/Containers/Telegraf.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ The purpose of the Dockerfile is to:
77
* tailor the default configuration to be IOTstack-ready; and
88
* enable the container to perform self-repair if essential elements of the persistent storage area disappear.
99

10-
## References
10+
## <a name="references"></a>References
1111

1212
- [*influxdata Telegraf* home](https://www.influxdata.com/time-series-platform/telegraf/)
1313
- [*GitHub*: influxdata/influxdata-docker/telegraf](https://github.com/influxdata/influxdata-docker/tree/master/telegraf)
1414
- [*DockerHub*: influxdata Telegraf](https://hub.docker.com/_/telegraf)
1515

16-
## Significant directories and files
16+
## <a name="significantFiles"></a>Significant directories and files
1717

1818
```
1919
~/IOTstack
@@ -38,34 +38,34 @@ The purpose of the Dockerfile is to:
3838

3939
1. The *Dockerfile* used to customise Telegraf for IOTstack.
4040
2. A replacement for the `telegraf` container script of the same name, extended to handle container self-repair.
41-
3. The *additions folder*. See [Applying optional additions](#applying-optional-additions).
41+
3. The *additions folder*. See [Applying optional additions](#optionalAdditions).
4242
4. The *auto_include folder*. Additions automatically applied to
43-
`telegraf.conf`. See [Automatic includes to telegraf.conf](#automatic-includes-to-telegrafconf).
43+
`telegraf.conf`. See [Automatic includes to telegraf.conf](#autoInclude).
4444
5. The *template service definition*.
4545
6. The *working service definition* (only relevant to old-menu, copied from ❹).
4646
7. The *persistent storage area* for the `telegraf` container.
47-
8. A working copy of the *additions folder* (copied from ❸). See [Applying optional additions](#applying-optional-additions).
48-
9. The *reference configuration file*. See [Changing Telegraf's configuration](#changing-telegrafs-configuration).
47+
8. A working copy of the *additions folder* (copied from ❸). See [Applying optional additions](#optionalAdditions).
48+
9. The *reference configuration file*. See [Changing Telegraf's configuration](#editConfiguration).
4949
10. The *active configuration file*. A subset of ➒ altered to support communication with InfluxDB running in a container in the same IOTstack instance.
5050

5151
Everything in the persistent storage area ❼:
5252

5353
* will be replaced if it is not present when the container starts; but
5454
* will never be overwritten if altered by you.
5555

56-
## How Telegraf gets built for IOTstack
56+
## <a name="howTelegrafIOTstackGetsBuilt"></a>How Telegraf gets built for IOTstack
5757

58-
### Telegraf images ([*DockerHub*](https://hub.docker.com))
58+
### <a name="dockerHubImages"></a>Telegraf images ([*DockerHub*](https://hub.docker.com))
5959

6060
Periodically, the source code is recompiled and the resulting image is pushed to [influxdata Telegraf](https://hub.docker.com/_/telegraf?tab=tags&page=1&ordering=last_updated) on *DockerHub*.
6161

62-
### IOTstack menu
62+
### <a name="iotstackMenu"></a>IOTstack menu
6363

6464
When you select Telegraf in the IOTstack menu, the *template service definition* is copied into the *Compose* file.
6565

6666
> Under old menu, it is also copied to the *working service definition* and then not really used.
6767
68-
### IOTstack first run
68+
### <a name="iotstackFirstRun"></a>IOTstack first run
6969

7070
On a first install of IOTstack, you run the menu, choose your containers, and are told to do this:
7171

@@ -74,7 +74,7 @@ $ cd ~/IOTstack
7474
$ docker-compose up -d
7575
```
7676

77-
> See also the [Migration considerations](#migration-considerations) (below).
77+
> See also the [Migration considerations](#migration) (below).
7878
7979
`docker-compose` reads the *Compose* file. When it arrives at the `telegraf` fragment, it finds:
8080

@@ -99,7 +99,7 @@ The *Dockerfile* begins with:
9999
FROM telegraf:latest
100100
```
101101

102-
> If you need to pin to a particular version of Telegraf, the *Dockerfile* is the place to do it. See [Telegraf version pinning](#telegraf-version-pinning).
102+
> If you need to pin to a particular version of Telegraf, the *Dockerfile* is the place to do it. See [Telegraf version pinning](#versionPinning).
103103
104104
The `FROM` statement tells the build process to pull down the ***base image*** from [*DockerHub*](https://hub.docker.com).
105105

@@ -134,7 +134,7 @@ You *may* see the same pattern in *Portainer*, which reports the ***base image**
134134

135135
> Whether you see one or two rows depends on the version of `docker-compose` you are using and how your version of `docker-compose` builds local images.
136136
137-
### Migration considerations
137+
### <a name="migration"></a>Migration considerations
138138

139139
Under the original IOTstack implementation of Telegraf (just "as it comes" from *DockerHub*), the service definition expected `telegraf.conf` to be at:
140140

@@ -154,9 +154,9 @@ With one exception, all prior and current versions of the default configuration
154154

155155
> In other words, once you strip away comments and blank lines, and remove any "active" configuration options that simply repeat their default setting, you get the same subset of "active" configuration options. The default configuration file supplied with gcgarner/IOTstack is available [here](https://github.com/gcgarner/IOTstack/blob/master/.templates/telegraf/telegraf.conf) if you wish to refer to it.
156156
157-
The exception is `[[inputs.mqtt_consumer]]` which is now provided as an optional addition. If your existing Telegraf configuration depends on that input, you will need to apply it. See [applying optional additions](#applying-optional-additions).
157+
The exception is `[[inputs.mqtt_consumer]]` which is now provided as an optional addition. If your existing Telegraf configuration depends on that input, you will need to apply it. See [applying optional additions](#optionalAdditions).
158158

159-
## Logging
159+
## <a name="logging"></a>Logging
160160

161161
You can inspect Telegraf's log by:
162162

@@ -166,7 +166,7 @@ $ docker logs telegraf
166166

167167
These logs are ephemeral and will disappear when your Telegraf container is rebuilt.
168168

169-
### log message: *database "telegraf" creation failed*
169+
### <a name="logTelegrafDB"></a>log message: *database "telegraf" creation failed*
170170

171171
The following log message can be misleading:
172172

@@ -178,7 +178,7 @@ If InfluxDB is not running when Telegraf starts, the `depends_on:` clause in Tel
178178

179179
What this error message *usually* means is that Telegraf has tried to communicate with InfluxDB before the latter is ready to accept connections. Telegraf typically retries after a short delay and is then able to communicate with InfluxDB.
180180

181-
## Changing Telegraf's configuration
181+
## <a name="editConfiguration"></a>Changing Telegraf's configuration
182182

183183
The first time you launch the Telegraf container, the following structure will be created in the persistent storage area:
184184

@@ -204,7 +204,7 @@ The file:
204204
- is created by removing all comment lines and blank lines from `telegraf-reference.conf`, leaving only the "active" configuration options, and then adding options necessary for IOTstack.
205205
- is less than 30 lines and is significantly easier to understand than `telegraf-reference.conf`.
206206

207-
* `inputs.docker.conf` – see [Applying optional additions](#applying-optional-additions) below.
207+
* `inputs.docker.conf` – see [Applying optional additions](#optionalAdditions) below.
208208

209209
The intention of this structure is that you:
210210

@@ -219,7 +219,7 @@ $ cd ~/IOTstack
219219
$ docker-compose restart telegraf
220220
```
221221

222-
### Automatic includes to telegraf.conf
222+
### <a name="autoInclude"></a>Automatic includes to telegraf.conf
223223

224224
* `inputs.docker.conf` instructs Telegraf to collect metrics from Docker. Requires kernel control
225225
groups to be enabled to collect memory usage data. If not done during initial installation,
@@ -229,9 +229,9 @@ $ docker-compose restart telegraf
229229
```
230230
* `inputs.cpu_temp.conf' collects cpu temperature.
231231

232-
### Applying optional additions
232+
### <a name="optionalAdditions"></a>Applying optional additions
233233

234-
The *additions folder* (see [Significant directories and files](#significant-directories-and-files)) is a mechanism for additional *IOTstack-ready* configuration options to be provided for Telegraf.
234+
The *additions folder* (see [Significant directories and files](#significantFiles)) is a mechanism for additional *IOTstack-ready* configuration options to be provided for Telegraf.
235235

236236
Currently there is one addition:
237237

@@ -249,9 +249,9 @@ $ docker-compose restart telegraf
249249

250250
The `grep` strips comment lines and the `sudo tee` is a safe way of appending the result to `telegraf.conf`. The `restart` causes Telegraf to notice the change.
251251

252-
## Getting a clean slate
252+
## <a name="cleanSlate"></a>Getting a clean slate
253253

254-
### Erasing the persistent storage area
254+
### <a name="resetDB"></a>Erasing the persistent storage area
255255

256256
Erasing Telegraf's persistent storage area triggers self-healing and restores known defaults:
257257

@@ -272,7 +272,7 @@ Note:
272272
$ docker-compose restart telegraf
273273
```
274274

275-
### Resetting the InfluxDB database
275+
### <a name="resetDB"></a>Resetting the InfluxDB database
276276

277277
To reset the InfluxDB database that Telegraf writes into, proceed like this:
278278

@@ -293,7 +293,7 @@ In words:
293293
* Delete the `telegraf` database, and then exit the CLI.
294294
* Start the Telegraf container. This re-creates the database automatically.
295295

296-
## Upgrading Telegraf
296+
## <a name="upgradingTelegraf"></a>Upgrading Telegraf
297297

298298
You can update most containers like this:
299299

@@ -335,7 +335,7 @@ Your existing Telegraf container continues to run while the rebuild proceeds. On
335335

336336
The `prune` is the simplest way of cleaning up. The first call removes the old ***local image***. The second call cleans up the old ***base image***. Whether an old ***base image*** exists depends on the version of `docker-compose` you are using and how your version of `docker-compose` builds local images.
337337

338-
### Telegraf version pinning
338+
### <a name="versionPinning"></a>Telegraf version pinning
339339

340340
If you need to pin Telegraf to a particular version:
341341

0 commit comments

Comments
 (0)