diff options
author | Luca Matei Pintilie <luca@lucamatei.com> | 2025-02-05 19:23:49 +0000 |
---|---|---|
committer | Luca Matei Pintilie <luca@lucamatei.com> | 2025-02-20 21:22:16 +0000 |
commit | 342e18b4841d37e8c98016725d6108b1d72f8563 (patch) | |
tree | b777a5bbda3e2b8a9b2a59508a0608e74ce3b5c2 /README | |
parent | a8f0e58428de51a055bf31db44965266ff7d5640 (diff) | |
download | runit-otel-master.tar runit-otel-master.tar.gz runit-otel-master.tar.bz2 runit-otel-master.tar.lz runit-otel-master.tar.xz runit-otel-master.tar.zst runit-otel-master.zip |
/etc/vlogger can be hijacked to send stdout/stderr logs on a void-linux
systems to otel. This first implementation does just that.
Diffstat (limited to 'README')
-rw-r--r-- | README | 29 |
1 files changed, 29 insertions, 0 deletions
@@ -0,0 +1,29 @@ +runit-otel +========== + +A /etc/vlogger replacement or enhancer to send logs to an opentelemetry collector. + +Usage +----- + +Copy the binary to `/etc/vlogger` if all stdout logs should be sent to +opentelemetry, or add a file such as this one to both send logs to +opentelemetry and process the logs as normal. + + +```sh +#!/usr/bin/env sh + +level="${2:-"level"}" +facility="${3:-"user"}" +tag="${1:-"${facility}"}" + +exec runit-otel "$tag" "$level" "$facility" | logger --tag "$tag" --priority "$facility"."$level" +``` + +TODO +---- + +- [ ] GRPC +- [ ] Configure by environment variables +- [ ] Syslog (through `socklog unix /dev/log`) |