Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions content/docs/Other guides/framelogging-with-loki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
title: "Configuring OpenCue with Loki for framelogs"
linkTitle: "Configuring OpenCue with Loki for framelogs"
weight: 8
date: 2024-11-27
description: >
Configuring OpenCue with Loki for framelogs
---

This page describes how to configure OpenCue to use Loki for framelogs

## How it works
The Loki framelog backend is configured on the cuebot server. When jobs are submitted to the
configured server it will register Loki-enablement on the job submitted together with the configured
address of the Loki instance. When jobs are dispatched to RQD the loki-enablement and address will
be sent to RQD and used for log writing instead of file based logs. Changing loki-enablement and/or
address will not change already submitted jobs.

The framelogs being sent to Loki can be read using a custom LokiView widget in cuegui

## Requirements
- Loki version 2.4+

## How to setup Loki
Latest release can be downloaded from here : https://github.com/grafana/loki/releases

Install the package matching your platform (eg. .deb for Debian/Ubuntu) and architecture (eg. amd64 for x86_64)

This will install Loki with it's configuration file here : `/etc/loki/config.yml`

### Configuring Loki
By default Loki will not allow to query logs older than 30 days. This limitation can be removed with
following option :
```yaml
limits_config:
max_query_length: 0h # Default: 721h
```
Refer to the Loki documentation on how to configure Loki

Note : When the Loki instance has just started, it can take a few seconds before it's ready to
receive requests. It can be "kickstarted" by accessing the <loki-url>/ready
(eg. http://localhost:3100/ready)

## Configuring cuebot
The cuebot server can be configure to use Loki either by setting command line arguments or using the
opencue.properties file

#### Command line arguments :
```bash
# Enable loki
--log.loki.enabled=true
# Base url for the loki instance (eg. http://localhost:3100)
--log.loki.url=<loki-url>
```

#### opencue.properties file :
```toml
# Enable loki
log.loki.enabled=true
# Base url for the loki instance (eg. http://localhost:3100)
log.loki.url=<loki-url>
```


## LokiView widget
![LokiView Widget](/docs/images/lokiview_widget.png)
Binary file added content/docs/images/lokiview_widget.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.