From 16910ad438606556959015db54137f828b5bf246 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Fri, 22 Nov 2024 11:10:20 -0600 Subject: [PATCH] New server monitoring stack Grafana+loki+promtail has become a real annoyance. Syslog has never hurt me. Abandon modernity. Embrace tradition. --- .gitmodules | 3 +++ syslog-ng/README.md | 3 --- syslog-ng/syslog-ng.conf | 9 ++++----- tailon/Makefile | 16 ++++++++++++++++ tailon/README.md | 28 ++++++++++++++++++++++++++++ tailon/src | 1 + 6 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 tailon/Makefile create mode 100644 tailon/README.md create mode 160000 tailon/src diff --git a/.gitmodules b/.gitmodules index 302f6a5..e6a5946 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "nginx/nginx-dav-ext-module"] path = nginx/nginx-dav-ext-module url = https://github.com/arut/nginx-dav-ext-module +[submodule "tailon/src"] + path = tailon/src + url = https://github.com/gvalkov/tailon.git diff --git a/syslog-ng/README.md b/syslog-ng/README.md index 669c772..9721cc5 100644 --- a/syslog-ng/README.md +++ b/syslog-ng/README.md @@ -25,6 +25,3 @@ $conman run --detach --name syslog --restart always \ registry.intra.dominic-ricottone.com/syslog-ng:latest ``` -Should be used with `registry.intra.dominic-ricottone.com/loki` -and `registry.intra.dominic-ricottone.com/promtail`. - diff --git a/syslog-ng/syslog-ng.conf b/syslog-ng/syslog-ng.conf index 7ef3d1c..b896559 100644 --- a/syslog-ng/syslog-ng.conf +++ b/syslog-ng/syslog-ng.conf @@ -1,17 +1,16 @@ -@version: 4.1 +@version: 4.7 source src_inet { network(transport("udp") port(514)); network(transport("tcp") port(601)); }; -destination dest_promtail { - syslog("promtail" transport("tcp") port(601)); - file("/var/log/test.log"); +destination dest_file { + file("/var/log/received.log"); }; log { source(src_inet); - destination(dest_promtail); + destination(dest_file); }; diff --git a/tailon/Makefile b/tailon/Makefile new file mode 100644 index 0000000..31458d7 --- /dev/null +++ b/tailon/Makefile @@ -0,0 +1,16 @@ +CONMAN=sudo docker + +REGISTRY=registry.intra.dominic-ricottone.com +IMAGE=tailon +TAG=latest + +src/frontend_bin.go: + cd src && make frontend_bin.go + +image: src/frontend_bin.go + cd src && $(CONMAN) buildx build --push --progress=plain \ + --platform linux/arm64,linux/amd64 \ + --tag $(REGISTRY)/$(IMAGE):$(TAG) \ + . + +.PHONY: image diff --git a/tailon/README.md b/tailon/README.md new file mode 100644 index 0000000..e12825c --- /dev/null +++ b/tailon/README.md @@ -0,0 +1,28 @@ +# tailon + + +## Build and Deploy + +``` +make image +``` + + +### Tags + + + `latest` + +---- + +## Use + +Can be used with any container manager toolchain. + +Try: + +``` +$conman run --detach --name tailon --restart always \ + --mount type=bind,src=$logfile,dst=/var/log/tailon.log \ + registry.intra.dominic-ricottone.com/tailon:latest +``` + diff --git a/tailon/src b/tailon/src new file mode 160000 index 0000000..51b2b77 --- /dev/null +++ b/tailon/src @@ -0,0 +1 @@ +Subproject commit 51b2b779ac1aec154c1288ca54beca39bf1d7d11 -- 2.45.2