Skip to content

Add Service Definitions: Loki and Promtail#376

Merged
mayanayza merged 1 commit intoscanopy:devfrom
mmanjos:services-grafana-loki
Dec 26, 2025
Merged

Add Service Definitions: Loki and Promtail#376
mayanayza merged 1 commit intoscanopy:devfrom
mmanjos:services-grafana-loki

Conversation

@mmanjos
Copy link
Contributor

@mmanjos mmanjos commented Dec 25, 2025

Add service definition for Grafana Loki and Promtail

Description: Grafana Loki is a logging centralization and query tool. Promtail is an agent that forwards logs to that service.

Official Website: https://github.com/grafana/loki

Default Ports: Loki defaults to tcp/3100 and Promtail defaults to tcp/9080

Discovery Method: Both services have a loki_build_info and promtail_build_info metric present at the /metrics endpoint. The Promtail service also has a /targets UI that contains the project name.

  • Pattern type: Endpoint using the service default port
  • Reasoning: This is my first contribution to scanopy - please critique and provide guidance if it's incorrect.

Icon Source: Dashboard icons (note: I think that the Loki logo is valid for both of these, as the promtail service is an agent of Loki, and is released under the same github page)

Testing:

  • Compiles successfully
  • Tested against real instance (describe setup below)
  • Unable to test (explain why below)

Testing Details:
I'm still trying to set up the dev toolchain and build a full server to locally test, but it hasn't been going well. I figured I'd get the PR in and keep trying in parallel.

@mmanjos mmanjos changed the base branch from main to dev December 25, 2025 03:25
@mmanjos mmanjos mentioned this pull request Dec 25, 2025
3 tasks
@mmanjos
Copy link
Contributor Author

mmanjos commented Dec 26, 2025

I'm stuck at make dev-server using either main or dev as my starting branch. All I get is

2025-12-26T03:28:02.601523Z  INFO server: Server is not serving web assets due to no web_external_path

and every request 404's. I've tried a completely fresh environment and toolchain, but nothing is working and I'm blocked on testing this change

@mayanayza
Copy link
Collaborator

That's expected, static web assets are only bundled and served by the server in the docker image. For dev, run make dev-ui alongside make dev-server to start the svelte UI server; then you can make an account and get authed correctly.

@mmanjos
Copy link
Contributor Author

mmanjos commented Dec 26, 2025

ah - that makes sense. I tried make dev-ui but stopped going down that path because I'm trying to develop and test in a headless system, and vite requires graphical support:

$ make dev-ui
cd ui && npm run dev

> [email protected] dev
> vite dev

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

@mayanayza
Copy link
Collaborator

Gotcha, yeah for the time being in order to auth you'll need to log in and create a session to hit the endpoints needed to test.

@mmanjos
Copy link
Contributor Author

mmanjos commented Dec 26, 2025

I was planning on accessing the dev server's ui from my laptop's browser and/or putting a proxy or tunnel in front of it (if it only listens at localhost)

I'll see if there's some workaround to vite requiring graphics in order to run

@mmanjos mmanjos force-pushed the services-grafana-loki branch from 1185a47 to b855db3 Compare December 26, 2025 04:06
@mayanayza mayanayza merged commit 93a4c32 into scanopy:dev Dec 26, 2025
2 checks passed
mayanayza added a commit that referenced this pull request Feb 24, 2026
Add Service Definitions: Loki and Promtail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants