You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The *additions folder* (see [Significant directories and files](#significantFiles)) is a mechanism for additional *IOTstack-ready* configuration options to be provided for Telegraf.
221
233
222
-
At the time of writing (October 2021), two additions are provided:
234
+
Currently there is one addition:
223
235
224
-
1.`inputs.docker.conf` provided by @tablatronix, which instructs Telegraf to collect metrics from Docker.
225
-
2.`inputs.mqtt_consumer.conf` which formed part of the [gcgarner/IOTstack telegraf configuration](https://github.com/gcgarner/IOTstack/blob/master/.templates/telegraf/telegraf.conf) and instructs Telegraf to subscribe to a metric feed from the Mosquitto broker. This assumes, of course, that something is publishing those metrics.
236
+
1.`inputs.mqtt_consumer.conf` which formed part of the [gcgarner/IOTstack telegraf configuration](https://github.com/gcgarner/IOTstack/blob/master/.templates/telegraf/telegraf.conf) and instructs Telegraf to subscribe to a metric feed from the Mosquitto broker. This assumes, of course, that something is publishing those metrics.
226
237
227
-
Using `inputs.docker.conf` as the example, applying that addition to your Telegraf configuration file involves:
238
+
Using `inputs.mqtt_consumer.conf` as the example, applying that addition to
239
+
your Telegraf configuration file involves:
228
240
229
241
```
230
242
$ cd ~/IOTstack/volumes/telegraf
231
-
$ grep -v "^#" additions/inputs.docker.conf | sudo tee -a telegraf.conf >/dev/null
243
+
$ grep -v "^#" additions/inputs.mqtt_consumer.conf | sudo tee -a telegraf.conf >/dev/null
Kernel control groups need to be enabled in order to monitor container specific
184
+
usage. This makes commands like `docker stats` fully work. Also needed for full
185
+
monitoring of docker resource usage by the telegraf container.
186
+
187
+
Enable by running (takes effect after reboot):
188
+
```
189
+
echo $(cat /boot/cmdline.txt) cgroup_memory=1 cgroup_enable=memory | sudo tee /boot/cmdline.txt
190
+
```
191
+
181
192
## <aname="aboutSudo"> a word about the `sudo` command </a>
182
193
183
194
Many first-time users of IOTstack get into difficulty by misusing the `sudo` command. The problem is best understood by example. In the following, you would expect `~` (tilde) to expand to `/home/pi`. It does:
0 commit comments