sthen 8d3164d939 import ports/sysutils/loki, from Eric Elena, ok landry@
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
2020-03-07 10:12:55 +00:00

40 lines
1.3 KiB
Makefile

# $OpenBSD: Makefile,v 1.1.1.1 2020/03/07 10:12:55 sthen Exp $
COMMENT = like Prometheus, but for logs
GH_ACCOUNT = grafana
GH_PROJECT = loki
GH_TAGNAME = v1.3.0
CATEGORIES = sysutils
HOMEPAGE = https://grafana.com/oss/loki/
# Apache 2.0
PERMIT_PACKAGE = Yes
MODULES = lang/go
WANTLIB = c pthread
MODGO_FLAGS += -ldflags="-w -X github.com/grafana/loki/pkg/build.Version=${GH_TAGNAME:C/^v//}"
do-build:
cd ${WRKSRC} && ${MODGO_CMD} build ${MODGO_FLAGS} -o bin/loki ./cmd/loki
cd ${WRKSRC} && ${MODGO_CMD} build ${MODGO_FLAGS} -o bin/promtail ./cmd/promtail
cd ${WRKSRC} && ${MODGO_CMD} build ${MODGO_FLAGS} -o bin/logcli ./cmd/logcli
cd ${WRKSRC} && ${MODGO_CMD} build ${MODGO_FLAGS} -o bin/loki-canary ./cmd/loki-canary
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/bin/loki ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/loki
${INSTALL_DATA} ${WRKSRC}/cmd/loki/loki-local-config.yaml \
${PREFIX}/share/examples/loki
${INSTALL_PROGRAM} ${WRKSRC}/bin/promtail ${PREFIX}/bin
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/promtail
${INSTALL_DATA} ${WRKSRC}/cmd/promtail/promtail-local-config.yaml \
${PREFIX}/share/examples/promtail
${INSTALL_PROGRAM} ${WRKSRC}/bin/logcli ${PREFIX}/bin
${INSTALL_PROGRAM} ${WRKSRC}/bin/loki-canary ${PREFIX}/bin
.include <bsd.port.mk>