Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added documentation on how to configure Loki for framelogs #303

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
58 changes: 58 additions & 0 deletions content/docs/Other guides/framelogging-with-loki.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
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+

## 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>
```

## 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)

## 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.