-
Notifications
You must be signed in to change notification settings - Fork 198
[common] Add honeytail as an addon #138
base: main
Are you sure you want to change the base?
Conversation
👋 @mterhar, thanks for taking the time to submit this PR. 🙏🏽 We have noticed that the PR title does not adhere to our desired format. Thanks! |
Signed-off-by: Mike Terhar <[email protected]>
8e14111
to
2358d9f
Compare
While I appreciate the PR we were actually thinking about deprecating promtail in favor of Vector. Vector is a much better choice because it supports a lot of different sinks including honeycomb, loki, and others. https://vector.dev/docs/reference/configuration/sinks/honeycomb/ I would rather have one addon for Vector than maintain a bunch of different addons for each log aggregator. I hope that makes sense. |
Sounds look a superior future plan. As I threw in the description, what's really best is having the ability to trace from the ingress through the app servers so the handoff latency can be tracked. I planned on using this PR's contents as a starting point to enhance apps with the ability to generate spans and then figure out the best ingress approach that can start a span and include the right baggage. Vector as a log shipper is fine but abandons the otel aspect and so we'd be stuck with classic grep-style troubleshooting. |
I am curious, since Sonarr and most applications log to stdout/stderr, why not deploy the Vector agent with helm and have that run as a daemonset on your nodes to ship container logs to Honeycomb? I am doing this but with using Loki. E.g. Here I am sending container logs and journald logs (from the OS) to Loki (which would be Honeycomb in your instance). The main reason we included promtail was because some containers do not log to stdout/stderr like Plex. Promtail is used to read the log files in the Plex container and ship them to Loki, which if we replaced the promtail addon with Vector would open up to shipping file logs to any sink supported by Vector. |
As discussed in Discord...
We can leave this as a draft for now. I will see about redoing the Dockerfile so it pulls vector and configures a honeycomb sink. |
Description of the change
This is similar to promtail but rather than sending to grafana, it goes to Honeycomb which has a free plan that should cover homelab usage. Not trying to add a costly subscription.
It defaults to off so most users should see this change as a noop. If they want to enable tailing for any given service, they can do so using the addon yaml.
Benefits
I prefer Honeycomb to Promtail and would like this as the low-effort option to get something into honeycomb. The next iteration on this is to upstream actual open telemetry emission to the various projects so the output is more useful and meaningful.
Possible drawbacks
The way data is sent to Honeycomb requires that it be parsed into key/value pairs. Many of the applications in k8s-at-home emit a more traditional style of console.line or even multi-line outputs. It requires a bit of Regex effort.
For example:
Emby
(?P<time>\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d+) (?P<level>\w+) \w+: (?P<protocol>\S+) (?P<method>\S+) (?P<status>\S+) to (?P<client_ip>\S+). Time: (?P<latency_ms>\d+)ms. (?P<url>http.*$)
Sonarr and Radarr
(?P<time>\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d+)\W(?P<level>\w+)\W(?P<method>\w+)\W(?P<msg>.*)
Nzbgets logging is a nightmare and unlikely to be usable without being rewritten or otel instrumented
Additional information
Checklist
Chart.yaml
according to semver.