Nomploy Nomad Packs

← All packs

victoria-logs v0.1.0

Observability

VictoriaLogs — a fast, resource-efficient open-source log database from the VictoriaMetrics team, with its own LogsQL query language and a built-in UI. A lightweight alternative to Loki/Elasticsearch. Deployed as a single host-networked Nomad service with a persistent volume.

nomad-pack run victoria-logs --registry nomploy
1 task http 9428 1 volume image victoriametrics/victoria-logs:latest
Variables 9
values.hcl

Save as values.hcl, edit, then run:

nomad-pack run victoria-logs -f values.hcl --registry nomploy
# The name of the Nomad job.
job_name = "victoria-logs"

# The Nomad namespace to deploy into.
namespace = "default"

# The datacenters to deploy to.
datacenters = ["*"]

# The VictoriaLogs container image. Pin a tag in production.
image = "victoriametrics/victoria-logs:latest"

# Host port for the HTTP API + UI (ingestion, LogsQL queries; UI at /select/vmui).
port = 9428

# How long to keep logs (-retentionPeriod), e.g. "7d", "30d", "1y".
retention = "30d"

# Docker named volume for /victoria-logs-data (the log storage). VictoriaLogs runs as root, so a fresh volume is writable. Back it up.
data_volume = "victoria_logs_data"

# Placement constraints — pin to one node so the local storage volume stays put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources. Raise for high log ingestion / long retention.
resources = {
    cpu    = 500
    memory = 512
  }
NameTypeDefaultDescription
job_name string
"victoria-logs"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"victoriametrics/victoria-logs:latest"
The VictoriaLogs container image. Pin a tag in production.
port number
9428
Host port for the HTTP API + UI (ingestion, LogsQL queries; UI at /select/vmui).
retention string
"30d"
How long to keep logs (-retentionPeriod), e.g. "7d", "30d", "1y".
data_volume string
"victoria_logs_data"
Docker named volume for /victoria-logs-data (the log storage). VictoriaLogs runs as root, so a fresh volume is writable. Back it up.
constraints list
[]
Placement constraints — pin to one node so the local storage volume stays put. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 500
    memory = 512
  }
The task resources. Raise for high log ingestion / long retention.
Readme

victoria-logs

VictoriaLogs — a fast, resource-efficient open-source log database from the VictoriaMetrics team, with its own LogsQL query language and a built-in UI. A lighter alternative to the loki pack / Elasticsearch. Single host-networked Nomad service with a persistent volume.

Usage

nomad-pack registry add nomploy github.com/Nomploy/nomad-packs
nomad-pack run victoria-logs --registry nomploy

In nomploy: create a Compose service, type Nomad Pack, pack victoria-logs, custom registry github.com/Nomploy/nomad-packs, then Deploy. UI at http://<node-ip>:9428/select/vmui.

Shipping logs

VictoriaLogs accepts several ingestion formats — Loki push, Elasticsearch bulk, OpenTelemetry, journald, syslog — so point a shipper (Grafana Alloy, Fluent Bit, Vector, …) at it. It can also be added to Grafana via the VictoriaLogs datasource.

Key variables

Variable Default Notes
image victoriametrics/victoria-logs:latest Pin a tag in production.
port 9428 HTTP API + UI.
retention 30d -retentionPeriod (e.g. 7d, 1y).
data_volume victoria_logs_data Log storage. Back it up.
constraints [] Pin to a node so the local volume stays put.
resources cpu 500 / mem 512 Raise for high ingestion / long retention.

Notes