Skip to main content

Managing Logs

Need help getting logs from your Tembo Instances? This guide can help.


Tembo uses Loki for logs. Tembo grants users access to the Loki API. Users must include an Authorization header, which is a Tembo Cloud token (see authentication), and a header X-Scope-OrgID, which should be set to the Tembo Organization ID (for more information, see Loki docs on multi-tenancy here).



Here is an example script that calls the Tembo Loki API to stream all logs for one instance:

# Your Tembo Org ID
# Your Tembo Instance ID
# Your Tembo Cloud token

# Loki LogQL query, selecting by instance ID

URL_ENCODED_QUERY=$(echo -n "$QUERY" | jq -sRr @uri)

# Websocat is like curl, but for websocket endpoints
websocat "wss://$URL_ENCODED_QUERY" \
-H "X-Scope-OrgID: ${ORG_ID}" \
-H "Authorization: Bearer ${TOKEN}"

There are other endpoints available, please review the Loki API documentation.


To connect your Grafana server to Tembo's logging server, add a new data source.

  • Select "Loki" as the data source type
  • For URL, configure your data plane domain name. For example,
  • Add two HTTP Headers configurations:
    • Header: X-Scope-OrgID, Value: your-tembo-org-here
    • Header: Authorization, Value: Bearer your-tembo-cloud-token-here