Saturday, September 10, 2022

[update] sysutils/loki to 2.6.1

diff refs/heads/master refs/heads/loki-2.6.1
commit - 9ed778fd588da4df6b7e9c8aa6337a149a8dfd67
commit + 38ea452e06eb8492b04b0eab34e112458c19a5eb
blob - 3fdc638ddb0d4cc670a346b1bb9458b60d84cd45
blob + 8d01cc197e2c2cb05ea81572f47be56d5b323fec
--- sysutils/loki/Makefile
+++ sysutils/loki/Makefile
@@ -1,13 +1,17 @@
-COMMENT = like Prometheus, but for logs
+COMMENT-main = like Prometheus, but for logs
+COMMENT-promtail = tails log files and pushes them to Loki

GH_ACCOUNT = grafana
GH_PROJECT = loki
-GH_TAGNAME = v2.4.2
+GH_TAGNAME = v2.6.1

CATEGORIES = sysutils

HOMEPAGE = https://grafana.com/oss/loki/
+MASTER_SITES = https://ports.lucasraab.me/

+MULTI_PACKAGES = -main -promtail
+
# AGPLv3 + some bits Apache 2.0
PERMIT_PACKAGE = Yes

blob - 81d5f3b62999e665bbcef603474a53186a4268b6
blob + f11d2f4c8a93f986fd5a796aae4ec6746680419f
--- sysutils/loki/distinfo
+++ sysutils/loki/distinfo
@@ -1,2 +1,2 @@
-SHA256 (loki-2.4.2.tar.gz) = 725af867fa3bece6ccd46e0722eb68fe72462b15faa15c8ada609b5b2a476b07
-SIZE (loki-2.4.2.tar.gz) = 26148143
+SHA256 (loki-2.6.1.tar.gz) = q3H2KQo+NGHL+yOOdZAOGGzo77X7CVuVOIfu1Sd+4zk=
+SIZE (loki-2.6.1.tar.gz) = 29338323
blob - 3569b2dff9eda69a2878087edfc649f0b302d379
blob + 87b384453c8075ac8da3a468b4db86426e086bca
--- sysutils/loki/patches/patch-cmd_loki_loki-local-config_yaml
+++ sysutils/loki/patches/patch-cmd_loki_loki-local-config_yaml
@@ -1,6 +1,7 @@
+Index: cmd/loki/loki-local-config.yaml
--- cmd/loki/loki-local-config.yaml.orig
+++ cmd/loki/loki-local-config.yaml
-@@ -5,11 +5,11 @@
+@@ -5,11 +5,11 @@ server:
grpc_listen_port: 9096

common:
blob - e77c7f94b619cd025d5a543ac09b15c7281abafd (mode 644)
blob + /dev/null
--- sysutils/loki/pkg/DESCR
+++ /dev/null
@@ -1,17 +0,0 @@
-Loki is a log aggregation system inspired by Prometheus. It does not index the
-contents of the logs, but rather a set of labels for each log stream.
-
-Compared to other log aggregation systems, Loki:
-- does not do full text indexing on logs
-- indexes and groups log streams using the same labels as Prometheus, allowing
- to seamlessly switch between metrics and logs using the same labels
-- has native support in Grafana
-
-A Loki-based logging stack consists of 3 components:
-- promtail is the agent, responsible for gathering logs and sending them to Loki
-- loki is the main server, responsible for storing logs and processing queries
-- Grafana for querying and displaying the logs
-
-Additionally 2 other components are provided:
-- logcli to run LoqQL queries against a Loki server
-- loki-canary to audit the log capturing performance of Loki
blob - /dev/null
blob + e77c7f94b619cd025d5a543ac09b15c7281abafd (mode 644)
--- /dev/null
+++ sysutils/loki/pkg/DESCR-main
@@ -0,0 +1,17 @@
+Loki is a log aggregation system inspired by Prometheus. It does not index the
+contents of the logs, but rather a set of labels for each log stream.
+
+Compared to other log aggregation systems, Loki:
+- does not do full text indexing on logs
+- indexes and groups log streams using the same labels as Prometheus, allowing
+ to seamlessly switch between metrics and logs using the same labels
+- has native support in Grafana
+
+A Loki-based logging stack consists of 3 components:
+- promtail is the agent, responsible for gathering logs and sending them to Loki
+- loki is the main server, responsible for storing logs and processing queries
+- Grafana for querying and displaying the logs
+
+Additionally 2 other components are provided:
+- logcli to run LoqQL queries against a Loki server
+- loki-canary to audit the log capturing performance of Loki
blob - 1f6c724bc149f23d72c3cfe1a656ee81eba2ff9b (mode 644)
blob + /dev/null
--- sysutils/loki/pkg/PLIST
+++ /dev/null
@@ -1,40 +0,0 @@
-@newgroup _loki:848
-@newuser _loki:848:848:daemon:Loki Daemon:/var/empty:/sbin/nologin
-@extraunexec rm -rf /var/loki/
-@extraunexec rm -rf /var/promtail/
-@rcscript ${RCDIR}/loki
-@rcscript ${RCDIR}/promtail
-@bin bin/logcli
-@bin bin/loki
-@bin bin/loki-canary
-@bin bin/promtail
-share/examples/loki/
-@mode 0755
-@owner root
-@group _loki
-@sample ${SYSCONFDIR}/loki/
-@mode
-@owner
-@group
-share/examples/loki/loki-local-config.yaml
-@mode 0640
-@group _loki
-@sample ${SYSCONFDIR}/loki/loki-config.yaml
-@mode
-@group
-share/examples/promtail/
-@mode 0755
-@owner root
-@group _loki
-@sample ${SYSCONFDIR}/promtail/
-@mode
-@owner
-@group
-share/examples/promtail/promtail-local-config.yaml
-@mode 0640
-@group _loki
-@sample ${SYSCONFDIR}/promtail/promtail-config.yaml
-@mode 0750
-@owner _loki
-@sample /var/loki/
-@sample /var/promtail/
blob - /dev/null
blob + 3cdd03c713432a7872d4daae791cdfef59e0867a (mode 644)
--- /dev/null
+++ sysutils/loki/pkg/DESCR-promtail
@@ -0,0 +1 @@
+agent which tails log files and pushes them to Loki
blob - /dev/null
blob + 0ccbe727a68e24e049f0e46487222064e9c3612b (mode 644)
--- /dev/null
+++ sysutils/loki/pkg/PLIST-main
@@ -0,0 +1,23 @@
+@newgroup _loki:848
+@newuser _loki:848:848:daemon:Loki Daemon:/var/empty:/sbin/nologin
+@extraunexec rm -rf /var/loki/
+@rcscript ${RCDIR}/loki
+@bin bin/logcli
+@bin bin/loki
+@bin bin/loki-canary
+share/examples/loki/
+@mode 0755
+@owner root
+@group _loki
+@sample ${SYSCONFDIR}/loki/
+@mode
+@owner
+@group
+share/examples/loki/loki-local-config.yaml
+@mode 0640
+@group _loki
+@sample ${SYSCONFDIR}/loki/loki-config.yaml
+@mode 0750
+@owner _loki
+@group
+@sample /var/loki/
blob - /dev/null
blob + 9653c2b9abbc8b48abba51f65b48b521d6a0a798 (mode 644)
--- /dev/null
+++ sysutils/loki/pkg/PLIST-promtail
@@ -0,0 +1,20 @@
+@newgroup _loki:848
+@newuser _loki:848:848:daemon:Loki Daemon:/var/empty:/sbin/nologin
+@extraunexec rm -rf /var/promtail/
+@rcscript ${RCDIR}/promtail
+@bin bin/promtail
+share/examples/promtail/
+@mode 0755
+@owner root
+@group _loki
+@sample ${SYSCONFDIR}/promtail/
+@mode
+@owner
+@group
+share/examples/promtail/promtail-local-config.yaml
+@mode 0640
+@group _loki
+@sample ${SYSCONFDIR}/promtail/promtail-config.yaml
+@mode 0750
+@owner _loki
+@sample /var/promtail/
Hello,

Here's an update for loki up to 2.6.1 as well as breaking it apart
into -main and -promtail subpackages. promtail is the log forwarder
for loki and meant to be distributed to endpoints. For now, I've
bundled two extra merge requests from upstream that will be included
in the next release: https://github.com/grafana/loki/pull/6833 and
https://github.com/grafana/loki/pull/7021. These are to support
building with Go 1.19 and on OpenBSD after the syscall changes
respectively. Upstream does the vendoring within the repo itself so
when the next version is released, the MASTER_SITES can be removed.

This has been working for the past couple weeks with syslog forwarding
to it and with a grafana instance for searching. Any other tests
and/or feedback?

Thanks,
Lucas

No comments:

Post a Comment