API for managing log collection targets, sources, and TLS bundles.

apiKey BearerAuth
Fields
KeyIn
AuthorizationHeader

ListCollectors returns the last-known heartbeat state of all log collectors (Alloy instances) that have polled ConfigService on this cluster.

Auth
GET /api/v2/logs/collectors
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/collectors' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
collectors15 fieldsarray[object]
default

An unexpected error response.

Response
{
"collectors": [
{
"id": "{string}",
"lastSeen": "{string}",
"alloyStatus": "{string}",
"configHash": "{string}",
"remotecfgStatus": "{string}",
"pipelineHealth": "{string}",
"unhealthyComponents": [
{
"localId": "{string}",
"name": "{string}",
"state": "{string}",
"message": "{string}",
"updatedTime": "{string}"
}
],
"pipelineCheckedAt": "{string}",
"pipelineError": "{string}",
"exporterSendFailedDelta": "{string}",
"lokiDroppedEntriesDelta": "{string}",
"failingExporters": [
"{array[string]...}"
],
"totalExporters": "{int32}",
"exporterSendFailedTotal": "{string}",
"exporterQueueSize": "{string}"
}
]
}
Copy

GetCollector returns the heartbeat state for a single collector by ID.

Auth
Path Params
idstring
GET /api/v2/logs/collectors/{id}
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/collectors/{id}' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
collector15 fieldsobject

CollectorStatus is the composite health view for one log collector (Alloy instance).

default

An unexpected error response.

Response
{
"collector": {
"id": "{string}",
"lastSeen": "{string}",
"alloyStatus": "{string}",
"configHash": "{string}",
"remotecfgStatus": "{string}",
"pipelineHealth": "{string}",
"unhealthyComponents": [
{
"localId": "{string}",
"name": "{string}",
"state": "{string}",
"message": "{string}",
"updatedTime": "{string}"
}
],
"pipelineCheckedAt": "{string}",
"pipelineError": "{string}",
"exporterSendFailedDelta": "{string}",
"lokiDroppedEntriesDelta": "{string}",
"failingExporters": [
"{array[string]...}"
],
"totalExporters": "{int32}",
"exporterSendFailedTotal": "{string}",
"exporterQueueSize": "{string}"
}
}
Copy

sources

Auth
GET /api/v2/logs/sources
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/sources' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
sources6 fieldsarray[object]
default

An unexpected error response.

Response
{
"sources": [
{
"name": "{string}",
"enabled": "{boolean}",
"logFormat": "{string}",
"minLevel": "{string}",
"journald": {
"syslogIdentifier": "{string}"
},
"file": {
"paths": [
"{array[string]...}"
],
"labels": {}
}
}
]
}
Copy

sources

Auth
Request Body application/json
objectobject
namestring
enabledboolean
logFormatstring
  • LB_STORE_TEXT: Reserved for the lb-store storage backend, which is under development and not supported in this release. Rust tracing output as captured from its stderr by journald: " module::path: msg".

Enum: LOG_FORMAT_UNSPECIFIED,ZAP_JSON,LOGFMT,DUROSLIGHT_TEXT,GFTL_TEXT,UNSTRUCTURED,LB_STORE_TEXT

Default: LOG_FORMAT_UNSPECIFIED

minLevelstring

Enum: UNSPECIFIED,DEBUG,INFO,WARN,ERROR

Default: UNSPECIFIED

journaldobject
syslogIdentifierstring
file2 fieldsobject
POST /api/v2/logs/sources
curl --request POST \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/sources' \
--header 'Authorization: {Authorization}' \
--data '{
"name": "{string}",
"enabled": "{boolean}",
"logFormat": "{string}",
"minLevel": "{string}",
"journald": {
"syslogIdentifier": "{string}"
},
"file": {
"paths": [
"{array[string]...}"
],
"labels": {}
}
}'
Copy
Responses application/json
200

A successful response.

objectobject
source6 fieldsobject
default

An unexpected error response.

Response
{
"source": {
"name": "{string}",
"enabled": "{boolean}",
"logFormat": "{string}",
"minLevel": "{string}",
"journald": {
"syslogIdentifier": "{string}"
},
"file": {
"paths": [
"{array[string]...}"
],
"labels": {}
}
}
}
Copy

{name}

Auth
Path Params
namestring
GET /api/v2/logs/sources/{name}
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/sources/{name}' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
source6 fieldsobject
default

An unexpected error response.

Response
{
"source": {
"name": "{string}",
"enabled": "{boolean}",
"logFormat": "{string}",
"minLevel": "{string}",
"journald": {
"syslogIdentifier": "{string}"
},
"file": {
"paths": [
"{array[string]...}"
],
"labels": {}
}
}
}
Copy

{name}

Auth
Path Params
namestring
DELETE /api/v2/logs/sources/{name}
curl --request DELETE \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/sources/{name}' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
deletedboolean

True if the source existed and was removed; false if it was already absent.

default

An unexpected error response.

Response
{
"deleted": "{boolean}"
}
Copy

{source.name}

Auth
Path Params
source.namestring
Request Body application/json
objectobject
enabledboolean
logFormatstring
  • LB_STORE_TEXT: Reserved for the lb-store storage backend, which is under development and not supported in this release. Rust tracing output as captured from its stderr by journald: " module::path: msg".

Enum: LOG_FORMAT_UNSPECIFIED,ZAP_JSON,LOGFMT,DUROSLIGHT_TEXT,GFTL_TEXT,UNSTRUCTURED,LB_STORE_TEXT

Default: LOG_FORMAT_UNSPECIFIED

minLevelstring

Enum: UNSPECIFIED,DEBUG,INFO,WARN,ERROR

Default: UNSPECIFIED

journaldobject
syslogIdentifierstring
file2 fieldsobject
PUT /api/v2/logs/sources/{source.name}
curl --request PUT \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/sources/{source.name}' \
--header 'Authorization: {Authorization}' \
--data '{
"enabled": "{boolean}",
"logFormat": "{string}",
"minLevel": "{string}",
"journald": {
"syslogIdentifier": "{string}"
},
"file": {
"paths": [
"{array[string]...}"
],
"labels": {}
}
}'
Copy
Responses application/json
200

A successful response.

objectobject
source6 fieldsobject
default

An unexpected error response.

Response
{
"source": {
"name": "{string}",
"enabled": "{boolean}",
"logFormat": "{string}",
"minLevel": "{string}",
"journald": {
"syslogIdentifier": "{string}"
},
"file": {
"paths": [
"{array[string]...}"
],
"labels": {}
}
}
}
Copy

targets

Auth
GET /api/v2/logs/targets
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/targets' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
targets5 fieldsarray[object]
default

An unexpected error response.

Response
{
"targets": [
{
"name": "{string}",
"type": "{string}",
"enabled": "{boolean}",
"loki": {
"url": "{string}",
"username": "{string}",
"password": "{string}",
"tlsBundle": "{string}"
},
"rsyslog": {
"endpoint": "{string}",
"port": "{int32}",
"timeout": "{string}",
"debug": "{boolean}",
"tlsBundle": "{string}"
}
}
]
}
Copy

targets

Auth
Request Body application/json
objectobject
namestring
typestring

Enum: TYPE_UNSPECIFIED,LOKI,RSYSLOG

Default: TYPE_UNSPECIFIED

enabledboolean
loki4 fieldsobject
rsyslog5 fieldsobject
POST /api/v2/logs/targets
curl --request POST \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/targets' \
--header 'Authorization: {Authorization}' \
--data '{
"name": "{string}",
"type": "{string}",
"enabled": "{boolean}",
"loki": {
"url": "{string}",
"username": "{string}",
"password": "{string}",
"tlsBundle": "{string}"
},
"rsyslog": {
"endpoint": "{string}",
"port": "{int32}",
"timeout": "{string}",
"debug": "{boolean}",
"tlsBundle": "{string}"
}
}'
Copy
Responses application/json
200

A successful response.

objectobject
target5 fieldsobject
default

An unexpected error response.

Response
{
"target": {
"name": "{string}",
"type": "{string}",
"enabled": "{boolean}",
"loki": {
"url": "{string}",
"username": "{string}",
"password": "{string}",
"tlsBundle": "{string}"
},
"rsyslog": {
"endpoint": "{string}",
"port": "{int32}",
"timeout": "{string}",
"debug": "{boolean}",
"tlsBundle": "{string}"
}
}
}
Copy

{name}

Auth
Path Params
namestring
GET /api/v2/logs/targets/{name}
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/targets/{name}' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
target5 fieldsobject
default

An unexpected error response.

Response
{
"target": {
"name": "{string}",
"type": "{string}",
"enabled": "{boolean}",
"loki": {
"url": "{string}",
"username": "{string}",
"password": "{string}",
"tlsBundle": "{string}"
},
"rsyslog": {
"endpoint": "{string}",
"port": "{int32}",
"timeout": "{string}",
"debug": "{boolean}",
"tlsBundle": "{string}"
}
}
}
Copy

{name}

Auth
Path Params
namestring
DELETE /api/v2/logs/targets/{name}
curl --request DELETE \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/targets/{name}' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
deletedboolean

True if the target existed and was removed; false if it was already absent.

default

An unexpected error response.

Response
{
"deleted": "{boolean}"
}
Copy

{target.name}

Auth
Path Params
target.namestring
Request Body application/json
objectobject
typestring

Enum: TYPE_UNSPECIFIED,LOKI,RSYSLOG

Default: TYPE_UNSPECIFIED

enabledboolean
loki4 fieldsobject
rsyslog5 fieldsobject
PUT /api/v2/logs/targets/{target.name}
curl --request PUT \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/targets/{target.name}' \
--header 'Authorization: {Authorization}' \
--data '{
"type": "{string}",
"enabled": "{boolean}",
"loki": {
"url": "{string}",
"username": "{string}",
"password": "{string}",
"tlsBundle": "{string}"
},
"rsyslog": {
"endpoint": "{string}",
"port": "{int32}",
"timeout": "{string}",
"debug": "{boolean}",
"tlsBundle": "{string}"
}
}'
Copy
Responses application/json
200

A successful response.

objectobject
target5 fieldsobject
default

An unexpected error response.

Response
{
"target": {
"name": "{string}",
"type": "{string}",
"enabled": "{boolean}",
"loki": {
"url": "{string}",
"username": "{string}",
"password": "{string}",
"tlsBundle": "{string}"
},
"rsyslog": {
"endpoint": "{string}",
"port": "{int32}",
"timeout": "{string}",
"debug": "{boolean}",
"tlsBundle": "{string}"
}
}
}
Copy

tls-bundles

Auth
GET /api/v2/logs/tls-bundles
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/tls-bundles' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
bundles4 fieldsarray[object]
default

An unexpected error response.

Response
{
"bundles": [
{
"name": "{string}",
"caPem": "{string}",
"certPem": "{string}",
"keyPem": "{string}"
}
]
}
Copy

tls-bundles

Auth
Request Body application/json
objectobject
namestring

Stable name used as the etcd key and referenced from target configs.

caPemstring

PEM-encoded CA certificate (required). Used to verify the remote server.

certPemstring

PEM-encoded client certificate (optional). Present = mTLS mode.

keyPemstring

PEM-encoded client private key (optional). Present = mTLS mode. Stored AES-256-GCM encrypted in etcd when TLS_BUNDLE_KEY is configured.

POST /api/v2/logs/tls-bundles
curl --request POST \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/tls-bundles' \
--header 'Authorization: {Authorization}' \
--data '{
"name": "{string}",
"caPem": "{string}",
"certPem": "{string}",
"keyPem": "{string}"
}'
Copy
Responses application/json
200

A successful response.

objectobject
bundle4 fieldsobject
default

An unexpected error response.

Response
{
"bundle": {
"name": "{string}",
"caPem": "{string}",
"certPem": "{string}",
"keyPem": "{string}"
}
}
Copy

{bundle.name}

Auth
Path Params
bundle.namestring

Stable name used as the etcd key and referenced from target configs.

Request Body application/json
objectobject
caPemstring

PEM-encoded CA certificate (required). Used to verify the remote server.

certPemstring

PEM-encoded client certificate (optional). Present = mTLS mode.

keyPemstring

PEM-encoded client private key (optional). Present = mTLS mode. Stored AES-256-GCM encrypted in etcd when TLS_BUNDLE_KEY is configured.

PUT /api/v2/logs/tls-bundles/{bundle.name}
curl --request PUT \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/tls-bundles/{bundle.name}' \
--header 'Authorization: {Authorization}' \
--data '{
"caPem": "{string}",
"certPem": "{string}",
"keyPem": "{string}"
}'
Copy
Responses application/json
200

A successful response.

objectobject
bundle4 fieldsobject
default

An unexpected error response.

Response
{
"bundle": {
"name": "{string}",
"caPem": "{string}",
"certPem": "{string}",
"keyPem": "{string}"
}
}
Copy

{name}

Auth
Path Params
namestring
GET /api/v2/logs/tls-bundles/{name}
curl --get \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/tls-bundles/{name}' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
bundle4 fieldsobject
default

An unexpected error response.

Response
{
"bundle": {
"name": "{string}",
"caPem": "{string}",
"certPem": "{string}",
"keyPem": "{string}"
}
}
Copy

{name}

Auth
Path Params
namestring
DELETE /api/v2/logs/tls-bundles/{name}
curl --request DELETE \
--url 'https://documentation.lightbitslabs.com/api/v2/logs/tls-bundles/{name}' \
--header 'Authorization: {Authorization}'
Copy
Responses application/json
200

A successful response.

objectobject
default

An unexpected error response.

Response
{}
Copy