Nomploy Nomad Packs

← All packs

pyroscope v0.1.0

Observability

Pyroscope — Grafana's continuous profiling backend and UI: store and explore CPU/memory flame graphs from your applications over time. Deployed as a single host-networked Nomad service.

nomad-pack run pyroscope --registry nomploy
…or one line (add registry + run)
curl -fsSL https://packs.nomploy.com/install.sh | sh -s -- pyroscope

Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.

2 tasks http 4040 1 volume image grafana/pyroscope:latest tracks :latest image bumped today
Variables 8
values.hcl

Save as values.hcl, edit, then run:

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

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

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

# The Pyroscope container image. Pin a tag in production.
image = "grafana/pyroscope:latest"

# Host port for the Pyroscope web UI.
port = 4040

# Named volume mounted at /data.
data_volume = "pyroscope_data"

# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
constraints = []

# The task resources.
resources = {
    cpu    = 300
    memory = 256
  }
NameTypeDefaultDescription
job_name string
"pyroscope"
The name of the Nomad job.
namespace string
"default"
The Nomad namespace to deploy into.
datacenters list
["*"]
The datacenters to deploy to.
image string
"grafana/pyroscope:latest"
The Pyroscope container image. Pin a tag in production.
port number
4040
Host port for the Pyroscope web UI.
data_volume string
"pyroscope_data"
Named volume mounted at /data.
constraints list
[]
Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true".
resources object
{
    cpu    = 300
    memory = 256
  }
The task resources.
Back up this pack

This pack stores data in one Docker named volume: pyroscope_data

restic

# Run on the node hosting this pack. Point restic at your repo first:
#   export RESTIC_REPOSITORY="s3:https://<account>.r2.cloudflarestorage.com/<bucket>"
#   export RESTIC_PASSWORD="<repo-password>"
#   export AWS_ACCESS_KEY_ID=<key>  AWS_SECRET_ACCESS_KEY=<secret>
restic backup \
  /var/lib/docker/volumes/pyroscope_data/_data

rclone (sync to S3/R2)

rclone sync /var/lib/docker/volumes/pyroscope_data/_data backup:<bucket>/pyroscope_data

Paths assume the default Docker volume location (/var/lib/docker/volumes). Restore by stopping the job, restoring files into the same volume, and re-running the pack.

Readme

pyroscope

Pyroscope — Grafana's open-source continuous profiling backend and UI. Continuously collect CPU, memory and other profiles from your applications and explore them as flame graphs over time to find performance and resource bottlenecks. Query from its own UI or from Grafana.

Single host-networked Nomad service (single-binary mode) with a persistent data volume.

Deploy

nomad-pack registry add nomploy https://github.com/Nomploy/nomad-packs
nomad-pack run pyroscope --registry=nomploy

Configure

Variable Default Description
port 4040 Web UI / ingest port (-server.http-listen-port).
image grafana/pyroscope:latest Container image. Pin a tag in production.
data_volume pyroscope_data /data — the local profile store.
resources { cpu = 300, memory = 256 } Task resources. Bump for heavy ingestion.

Send profiles from your apps with the Pyroscope SDKs, Grafana Alloy, or the OTel profiling exporter, pointing them at http://<host>:4040. Add it to grafana as a data source to explore flame graphs there. A prestart init task chowns the data volume to uid 10001. Pin the job to the node holding the volume with constraints.