Grafana Cloud (Loki) Log Integration
CloudAMQP ships broker logs to Grafana Cloud, stored in Loki, via the OpenTelemetry Protocol (OTLP). Available on RabbitMQ and LavinMQ dedicated instances.
Link: https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/
Setup
- Sign in to the Grafana Cloud Portal and select your stack from the organization overview.
-
Click
Configure
on the
OpenTelemetry
tile. You will find your
OTLP endpoint
(e.g.
https://otlp-gateway-prod-<region>.grafana.net/otlp), your numeric instance ID, and the option to generate an API token. -
Generate an API token with at minimum the
logs:writescope, or use a Service Account token with theMetricsPublisherrole. - Enter the endpoint URL, instance ID, and API token in the CloudAMQP console and click Save.
Querying your logs
Once connected, open Explore in Grafana, select the Loki data source, and query by cluster or node:
{service_name="your-cluster-name"}
{host_name="your-cluster-name-01"}Log attributes
Each log record includes the following resource attributes:
-
service_name— your CloudAMQP cluster name (Loki renamesservice.name) -
host_name— the individual node hostname (Loki renameshost.name) -
appname— alwaysrabbitmqorlavinmq - Severity — mapped from the journald PRIORITY field to the OpenTelemetry severity spec (INFO = 9, WARN = 13, ERROR = 17)
Metrics can be shipped to the same Grafana Cloud stack with the Grafana Cloud metrics integration.