Lightbits CLI Reference Guide
3.19.x
Lightbits Command Line Interface
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
lbcli create logs sources
Copy Markdown
Open in ChatGPT
Open in Claude
Creates a new log source.
Log streaming is currently in tech preview.
Synopsis
Creates a new log source. Exactly one of --journald-id or --file-paths must be provided to specify the collection mechanism.
Log format is inferred automatically when --journald-id is used (defaults to ZAP_JSON for most Lightbits services). For file sources, you can set it explicitly with --log-format.
Supported log formats: zap-json, logfmt, duroslight-text, gftl-text, unstructured.
Supported min levels: debug, info, warn, error.
Bash
xxxxxxxxxxlbcli create logs sources [flags]Examples
Bash
xxxxxxxxxx# Create a journald source for the node-manager servicelbcli -J $JWT create logs sources \ --name=node-manager \ --journald-id=node-manager \ --enabled \ --min-level=info # Create a file source that watches a log file, tagging it with metadatalbcli -J $JWT create logs sources \ --name=custom-app \ --file-paths=/var/log/custom-app.log \ --log-format=zap-json \ --label=app=custom-app \ --label=env=prod # Create a disabled source (enable it later with "update")lbcli -J $JWT create logs sources \ --name=api-service \ --journald-id=api-service| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
| --help | -h | bool | Help for source. | |
| --enabled | bool | true | Enable this source immediately (default: true). | |
| --file-paths | stringSlice | Comma-separated list of file glob patterns for file-based collection; e.g. /var/log/app.log,/var/log/app-*.log. | ||
| --journald-id | string | Journald syslog identifier (unit name) to collect from; e.g., node-manager. | ||
| --label | stringArray | Label to attach to log entries, in key=value format (repeatable, file sources only). | ||
| --log-format | string | Log format hint: zap-json, logfmt, duroslight-text, gftl-text, unstructured (auto-detected when empty). | ||
| --min-level | string | Minimum log severity to forward: debug, info, warn, error (default: all). | ||
| --name | string | Name of the log source (required). |
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Was this page helpful?
Next to read:
lbcli create logs targets© 2026 Lightbits Labs™
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message