-
Here's a head-scratcher. I'm allllmost done rebuilding my TrueNAS-hosted Ubuntu/Docker VM with jails. Everything is working, even finnicky Frigate.... except for seemingly-simple Telegraf! What I want to do seems fairly simple: Use Telegraf in a Docker container with a mount or two to read host metrics (see here under "Monitoring the Docker Engine Host") and pump them back to my influxdb. Please bear with me... this might seem like a Telegraf issue but I had it working on the Ubuntu VM and the TrueNAS SCALE host in tandem before this... so I think it's something to do with Jailmaker and/or mount configuration. Here's the first part of my jail config:
The one thing I wonder about is binding '/' inside the jail. Docker compose for Telegraf:
Here's a stripped-down Telegraf config I've been testing with (trying to eliminate something dumb like a typo as a source of error):
No mater what I do, I see messages like It seems like it's stuck loading the config, but I've ruled out file access issues (Telegraf can see the right config file). I thought Telegraf might not have permissions to write to the logfile, but I've tried changing the config to send errors to Any ideas? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Maybe try the simpler setup first as described in "Monitoring docker containers" on the Docker Hub page. Then you can see if it will load the config file and you're not yet involving host storage. Build it out from there... I don't see anything strange in your config files at first glance though. |
Beta Was this translation helpful? Give feedback.
-
The suggestion to try a simpler setup was a good one. Zeroing in on the issue. The one thing that seems to freeze the startup of the container on loading config is my [[outputs.influxdb_v2]] configuration. Which is strange because this is exactly copy & pasted from my pre-jail Telegraf config file.
If I comment out the token line, things actually happen:
... but with the token line included, it hangs on the first "Loading config". I'm not certain this is a Jailmaker issue... but it's strange the config works elsewhere, but not in the jail. I will keep digging later. |
Beta Was this translation helpful? Give feedback.
-
No big update but I have done more testing to zero in on this weird "token" parameter behaviour on the influxdb_v2 output plugin, and I've cross-posted this issue to the telegraf community forums to see if I can get some application-specific ideas. |
Beta Was this translation helpful? Give feedback.
-
Found it! Got a great reply to my post on the telegraf forums above. Still fiddling with the telegraf config but I think this was the big barrier. |
Beta Was this translation helpful? Give feedback.
Found it! Got a great reply to my post on the telegraf forums above.
--capability=CAP_IPC_LOCK
is needed as asystemd_nspawn_user_args
argument because telegraf requires lockable memory.Still fiddling with the telegraf config but I think this was the big barrier.