Grafana Loki Forwarder – Log Push from Apica
This document describes how to configure Apica to forward logs to Grafana Cloud Loki using the Loki HTTP Push API (/loki/api/v1/push).
Prerequisite: Create Grafana Cloud Loki HTTP Connection & Access Policy Token
Before configuring the Grafana Cloud Loki Forwarder in Apica, you must create an HTTP Logs connection in Grafana Cloud and generate an Access Policy Token with permission to push logs.
Step 1: Log in to Grafana Cloud
Open the Grafana Cloud Portal
Log in using your Grafana Cloud credentials
Step 2: Navigate to Connections
Select Add new Connections
Select Custom data
Choose Logs HTTP
Click Configure sending logs via HTTP
Step 3: Configure Logs HTTP Connection
Under Select format, choose:
Via HTTP
Review the Loki HTTP push endpoint shown (this will be used by the forwarder later)
Step 4: Generate an Access Policy Token
Enter the following details:
Token name Example:
loki-http-forwarder-tokenExpiration date Choose based on your security policy
Create the token
Copy and securely store the token
⚠️ The token will not be shown again
Ensure the selected Access Policy includes the following scopes:
✅ logs:write If this is not enabled, log forwarding to Grafana Loki will fail.
✅ logs:read This must be enabled to query and view logs in Grafana Cloud.
Step 5: Loki HTTP Endpoint Details
You will need the following values for the forwarder configuration:
Loki Push Endpoint
Authorization Header Format
Step 6: Sample Curl Command (Validation)
Use the following curl command to validate that the token and endpoint are working correctly:
Step 7: Create New Grafana Loki Forwarder In Ascent
Login to Apica Ascent
Click on integrations menu item
Click on Forwarders tab
Click on Add Forwarders button
From the modal select Grafana Forwarder
Enter the required details click Create to create the forwarder



Step 8: Map the Forwarder
After creating the Grafana Forwarder, associate it with a data flow to forward logs to Grafana Loki.
Navigate to Logs & Insights
Select the tab called Data
Select the data flow using the check box
Click on 3 dots, and select Map Forwarder
From the Create forwarder mapping modal, select the Grafana Forwarder and click OK
After successful mapping, the data will start flowing...




Step 9: Verify the Logs in Grafana Logs
After sending logs successfully to Grafana Cloud Loki, verify that the logs are visible in Grafana.
Open the Grafana Cloud stack
In the left sidebar, click Explore
Select Logs as the data source
Ensure the correct Loki data source is selected
Use LogQL to query logs, for example:
Adjust the time range to Last 5 minutes or Last 15 minutes
Confirm that the log entries forwarded via ascent is visible

Last updated
Was this helpful?