ntopng — a high-speed web-based network traffic monitor that shows real-time flows, hosts, protocols and bandwidth usage on your network. Deployed as a single host-networked Nomad service (with a bundled Redis).
Needs nomad-pack on PATH. The script only adds the nomploy registry and runs this pack.
Source ↗ Project ↗ ★ 8.2k ⚑ Report an issue
Save as values.hcl, edit, then run:
# The name of the Nomad job.
job_name = "ntopng"
# The Nomad namespace to deploy into.
namespace = "default"
# The datacenters to deploy to.
datacenters = ["*"]
# The ntopng container image. Pin a tag in production.
image = "ntop/ntopng:latest"
# Host port for the ntopng web UI.
port = 3000
# The host network interface to capture traffic from (e.g. eth0, ens18).
interface = "eth0"
# Named volume for ntopng data and its bundled Redis (/var/lib/ntopng).
data_volume = "ntopng_data"
# Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". Pin to the node whose traffic you want to analyse.
constraints = []
# The task resources.
resources = {
cpu = 1000
memory = 1024
}
| Name | Type | Default | Description |
|---|---|---|---|
| job_name | string | "ntopng" | The name of the Nomad job. |
| namespace | string | "default" | The Nomad namespace to deploy into. |
| datacenters | list | ["*"] | The datacenters to deploy to. |
| image | string | "ntop/ntopng:latest" | The ntopng container image. Pin a tag in production. |
| port | number | 3000 | Host port for the ntopng web UI. |
| interface | string | "eth0" | The host network interface to capture traffic from (e.g. eth0, ens18). |
| data_volume | string | "ntopng_data" | Named volume for ntopng data and its bundled Redis (/var/lib/ntopng). |
| constraints | list | [] | Placement constraints. On a nomploy cluster: attribute = "$${meta.nomploy_control_plane}", operator = "=", value = "true". Pin to the node whose traffic you want to analyse. |
| resources | object | {
cpu = 1000
memory = 1024
} | The task resources. |
No variables match.
This pack stores data in one Docker named volume:
ntopng_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/ntopng_data/_data
rclone (sync to S3/R2)
rclone sync /var/lib/docker/volumes/ntopng_data/_data backup:<bucket>/ntopng_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.
ntopng is a high-speed, web-based network traffic monitor. It passively captures packets on a network interface and shows real-time and historical flows, talkers, hosts, application protocols (via nDPI), bandwidth usage, alerts and geolocation — a powerful way to see exactly what's happening on your network.
This pack runs ntopng as a single host-networked Nomad service. The official image bundles its own Redis, so no external database is needed.
nomad-pack run ntopng --registry=nomploy --var interface=eth0
Open http://<node-ip>:3000 and log in with admin / admin (change it on
first login).
| Variable | Default | Description |
|---|---|---|
image |
ntop/ntopng:latest |
Container image (pin a tag in production). |
port |
3000 |
Host port for the web UI. |
interface |
eth0 |
Host NIC to capture traffic from — set to your NIC. |
data_volume |
ntopng_data |
Volume for data + bundled Redis (/var/lib/ntopng). |
resources |
1000 MHz / 1024 MB | CPU and memory for the task. |
ntopng monitors the interface on the node it runs on, so set interface to that
node's real NIC and pin the job there with constraints. It needs the
NET_ADMIN/NET_RAW capabilities (granted here) to capture packets.