Getting started: Promtail / Alloy
Send from an existing Promtail setup to Puck's Loki push API, with a Source's credential. You add a second client; the one that pushes to your Loki keeps working.
You need a Source and its credential first: see Getting started.
Grafana Alloy: known gap
The snippet below is a Promtail clients: entry. Grafana Alloy does not read Promtail YAML: its config is written in Alloy syntax, with a loki.write component. So the snippet can't be pasted into an Alloy config, and this page has no Alloy config to offer yet. This is tracked in LOG-187.
Promtail
Add a client to your Promtail config. It pushes to Puck's Loki endpoint with basic auth from the credential's two variables:
yaml
clients:
- url: https://ingest.usepuck.eu:4318/loki/api/v1/push
basic_auth:
username: ${OBS_SOURCE_API_CREDENTIAL_ID}
password: ${OBS_SOURCE_API_SECRET}If you already have a clients: list, add the entry to it. The variable names are for a Source called api; the app shows yours.
Promtail reads ${VAR} from the environment when started with -config.expand-env=true. Set both variables in Promtail's environment, from your secret store, and restart it.
Check that it works
The Sources page shows "Waiting for logs…" until the first Log record arrives, then "Receiving logs". Then search with the Filter source:api. If nothing arrives, see Troubleshooting.