Open 0x2b3bfa0 opened 2 years ago
I haven't yet experimented enough so this might not be applicable, but are you open to having an alternative/selectable options for the log capture?
The ideas I have rattling around might be past the scope of what task is trying to provide.
Supporting arbitrary log backends with the same interface doesn't look like a trivial task. Still, you can always install and run software like the CloudWatch Agent as part of the task script.
On public cloud machines, the startup script needs to be compatible with any modern and sensible GNU+Linux image, and that requires some optimizations and workarounds. For example, we should try to avoid depending on package managers and software other than
systemd
.Installing
rclone
Whilst
rclone
binary distributions are self–contained Go executables, they come bundled inzip
files, and extracting them in a portable way is hard.rclone
module.Watching files
In order to avoid installing a file watcher,[^1] we've replaced “smart” data+log synchronization by polling, considerably increasing transfer costs.
md5sum
andsleep
to push logs only when (1) there are new log lines and (2) a significant amount of time has passed since the last synchronization~fsnotify
module.Issues
Other fixes
[^1]: Installing software usually requires resorting to distribution–specific package managers.