---
title: "Configuring Decisions with Grafana Loki"
slug: "grafana-loki-for-logging"
tags: ["loki", "Logs", "grafana", "docker"]
updated: 2025-06-06T15:46:49Z
published: 2025-06-06T15:46:49Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuring Decisions with Grafana Loki

## Overview

Grafana Loki is a log aggregation tool that allows users to get logs from different Decision nodes into one place. This document demonstrates how to set up the Grafana and Loki for Decisions. For more information, refer to [Grafana Loki Documentation](https://grafana.com/oss/loki/).

### Prerequisite

- Loki Server
- Grafana

**Note**: Both applications can be hosted [on-premises](https://grafana.com/docs/loki/latest/setup/install/) or on [Grafana Cloud](https://grafana.com/auth/sign-in/?plcmt=top-nav&amp;cta=myaccount).

#### [**Access Policies**](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/create-api-key/)

To interact with the Grafana Cloud API, users must create two access policies. These access policies must be configured with the [scope](https://grafana.com/docs/grafana-cloud/account-management/authentication-and-permissions/access-policies/#scopes) to **Read** and **Write** the Logs. Users must generate API tokens under both access policies. Specifically, the API Token with Read scope will enable Grafana to retrieve data from the Loki server, while the API Token with Write scope will facilitate Decisions in writing logs to the Loki server.

---

## Configuring Loki Server in Decisions

1. Log in to Decisions Studio, navigate to **System > Settings > Logging Settings > Loki**.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-07-24_11h36_15.png)
2. Configure the following settings from the **Loki**window.  
  

| Setting Name | Description |
| --- | --- |
| Use Global Settings | This will follow the settings configured under the Global Log settings, located at **System > Settings > Logging Settings > Global**. |
| Is Enabled | Enables the logging to the Loki Server. |
| Levels | Allows to select the Log [Level](https://documentation.decisions.com/v9/docs/logging-overview#log-levels). |
| Loki Server Address | Enter the Loki Server Address. - If Grafana is hosted on-premises, ensure to use the IP and the port number. `http://[System IP]:[Port Number]`. - If using the Loki server on Grafana Cloud, the server address should resemble this format. `https://[Domain Name]`. |
| Application Name | Enter the name of the application under which you want to store the logs. If no name is given, a new "Decisions" app will be created on the server to store the logs. |
| Email or Username* | Enter the User ID, which can be found at Grafana Stack. `grafana.com/orgs/yourorganziation/hosted-logs/[User Id]` |
| Password* | Enter the API Token generated for the access policy that is configured with **Write** Scope. |

*Not a compulsory field. If left blank, no authentication is added to the headers.  
  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/2024-07-24_11h40_37.png)

---

## Configuring Loki Server in Grafana

1. Navigate to the Grafana server and configure the [Loki data source](https://grafana.com/docs/grafana/latest/datasources/loki/configure-loki-data-source/). Refer to the following table for required fields.  
  

| Setting Name | Description |
| --- | --- |
| Loki Server Address | Enter the Loki Server Address. - If Grafana is hosted locally, ensure to use the IP and the port number. http://[System IP]:[Port Number] - If using the Grafana Cloud, the server address should resemble this format. https://[Domain Name] |
| Authentication Methods > Basic authentication | Not a compulsory field. If left blank, no authentication is added to the headers. |
| User | Enter the User ID, which can be found at Grafana Stack. `grafana.com/orgs/yourorganziation/hosted-logs/[User Id]` |
| Password | Enter the API Token generated for the access policy that is configured with **Read** Scope. |

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1696443384115.png)
2. After configuring all the details, click on **Save & test**.
3. The connection should be successful, and the following message should be displayed.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1696424787560.png)

---

## Troubleshooting the Loki Connection

Users might face a connection error with the following message

![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1670410001257.png)

This validation will pop up when the URL in the Loki server is not the same as in the Decisions Loki settings. Ensure to push the Logs from the Decisions Server by configuring the server URL in Decisions Loki Settings first and then using the same URL in Loki Server so that the Loki database populates with the logs.

---

## Accessing the Logs

1. Navigate to **Grafana > Menu****(Hamburger Button) > Explore.**
2. Select the desired Loki from the drop-down.****
3. Under **Label Filters,**set **Application = [Application Name given in Decisions]**,****and hit [**Run Query**](https://grafana.com/docs/grafana-cloud/introduction/dashboards/#queries). The Logs will be generated.  
![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1696445722540.png)

---

## Feature Changes

| Description | Version | Date | Developer Task |
| --- | --- | --- | --- |
| Add the Ability To Use Authenticated Loki Servers With Decisions | [8.15](https://documentation.decisions.com/v99/docs) | October 12, 2023 | [DT-038823] |

---

For further information on Administration, visit the [Decisions Forum](https://community.decisions.com/categories/Administration).
