File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 11IMAGE_NAME ?= beeai-agent
22COMPOSE_FILE ?= compose.yaml
33DRY_RUN ?= false
4+ LOKI_URL ?= http://loki.tft.osci.redhat.com/
5+ LOKI_SINCE ?= 24h
6+ LOKI_LIMIT ?= 3000
7+ LOKI_POD ?= mcp-gateway
48
59COMPOSE ?= $(shell command -v podman >/dev/null 2>&1 && echo "podman compose" || echo "docker-compose")
610COMPOSE_AGENTS =$(COMPOSE ) -f $(COMPOSE_FILE ) --profile=agents
@@ -132,6 +136,31 @@ logs-rebase:
132136logs-jira-issue-fetcher :
133137 $(COMPOSE ) -f $(COMPOSE_FILE ) --profile manual logs -f jira-issue-fetcher
134138
139+
140+ # Loki logcli targets
141+ # https://grafana.com/docs/loki/latest/setup/install/local/
142+ # add their RPM repos and `dnf install logcli`
143+ LOKI_CMD = logcli --output-timestamp-format=unixdate --addr=$(LOKI_URL ) query --since=$(LOKI_SINCE ) --limit=$(LOKI_LIMIT ) -o raw
144+ LOKI_FILTER = '{kubernetes_container_name="$(1 ) ",kubernetes_namespace_name="jotnar-prod"} | json | line_format "{{._timestamp}} {{.kubernetes_pod_name}} {{.message}}"'
145+
146+ .PHONY : logs-loki-help
147+ logs-loki-help :
148+ @echo " Available pod names:"
149+ @echo " - triage-agent"
150+ @echo " - backport-agent-c9s"
151+ @echo " - backport-agent-c10s"
152+ @echo " - rebase-agent-c9s"
153+ @echo " - rebase-agent-c10s"
154+ @echo " - supervisor-collector"
155+ @echo " - supervisor-processor"
156+ @echo " - mcp-gateway"
157+ @echo " - valkey"
158+ @echo " Usage example: LOKI_SINCE=24h LOKI_POD=<pod-name> make logs-loki"
159+
160+ .PHONY : logs-loki
161+ logs-loki :
162+ $(LOKI_CMD ) $(call LOKI_FILTER,$(LOKI_POD ) )
163+
135164.PHONY : trigger-pipeline
136165trigger-pipeline :
137166 @if [ -z " $( JIRA_ISSUE) " ]; then \
You can’t perform that action at this time.
0 commit comments