Skip to content

Releases

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 29 Nov 20:26

Changes since v0.4.0.

API socket:

  • procmon-api.service sets RuntimeDirectory=procmon, so systemd creates /run/procmon and the service can create its socket there. MemoryMax is 1G.

Token endpoint:

  • Concurrent Argon2 secret checks on POST /oauth/token share one process-wide limit, including across a configuration reload. A request that arrives while that limit is full receives 503 with Retry-After: 1 and error temporarily_unavailable.

LXC discovery:

  • A cgroup directory that disappears during the scan is skipped. Discovery continues with the payload directories that are still present.

Build:

  • The dev package workflow runs when commits land on dev. The release package workflow runs on a tag push. This release attaches procmon_0.4.1-1_amd64.deb and procmon_0.4.1-1_arm64.deb.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 16:01

Changes since v0.3.1.

Process and thread identity:

  • Each aggregate is keyed by the thread-group id, the thread id, and the comm captured when the call starts. A rename does not merge two names.
  • Those three values are stored in pid_comm. syscall_stats references that row. The collector applies the schema migrations when it opens the database, including a database written by 0.3.1.
  • A row recorded before process ids has a null pid. A row recorded before thread ids has a null tid.
  • GET /v1/syscall-stats returns pid and tid and accepts those names as query parameters. One comm can now be several rows. Summing calls across those rows is the previous total.
  • A query that read comm from syscall_stats now joins pid_comm. The schema is documented in procmon(5).

aarch64:

  • The collector and the API are built for x86-64 and aarch64. Go and Debian call the aarch64 machine arm64. This release attaches procmon_0.4.0-1_amd64.deb and procmon_0.4.0-1_arm64.deb.
  • GET /v1/syscalls returns the syscall numbers for the ABI of the binary that is serving them. The aarch64 numbers are not the x86-64 numbers.
  • Authenticated GET /v1/arch returns machine (x86_64 or aarch64) and goarch (amd64 or arm64).
  • procmon.service and procmon-api.service start on either machine.

Manuals:

  • procmon-api(1) is the command. procmon-api(8) is the HTTP service. procmon(5) is the metrics database. procmon-agents(7) is the agent-facing description. procmon(8) remains the collector.

Build:

  • A tag push runs the unit tests on x86_64 and aarch64, then builds both packages and attaches them here.

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 28 Nov 22:28

Changes since the initial commit.

procmon 0.3.1 monitors system calls made by processes inside LXC containers for audit purposes and writes the totals to SQLite. The package is x86-64 and expects cgroup v2.

Collector:

  • An eBPF program attaches to the raw syscall tracepoint. A task is counted when a cgroup v2 ancestor is a directory named lxc.payload.<name>. The innermost match wins, so nested LXC is attributed to the inner container. Docker containers and lxc.monitor.* are omitted.
  • Aggregates stay in a per-CPU kernel map keyed by container cgroup, process comm, and syscall number. Each flush writes that window to SQLite. calls counts entries, errors counts returns in [-4095, -1], and total_ns is the time spent in the call.
  • Configuration is TOML, /etc/procmon/procmon.toml by default. retain of 0 keeps every row. A duration such as 168h deletes older samples. The installed file sets 0. When the key is omitted, the default is 168h.
  • The systemd unit runs as root with CAP_BPF, CAP_PERFMON, CAP_SYS_ADMIN, and CAP_SYS_RESOURCE. CAP_SYS_ADMIN is what lets tracepoint attach succeed on Debian kernels.
  • SIGINT and SIGTERM flush the current window and exit. SIGHUP rereads the TOML file and applies it. If the file cannot be read or the configuration is invalid, the running configuration is left unchanged. After a successful reload, payload cgroups are rescanned and the current window is flushed.
  • vacuum_interval rewrites the database on that interval and returns pages freed by retention to the OS. 0 disables it. The default is 0.
  • vacuum_on_start rewrites the database once, after it is opened and before cgroup discovery or tracepoint attach. A failure stops the process. The default is false. A reload does not vacuum again.

API:

  • procmon-api reads the metrics database and serves it over HTTP on a unix socket, /run/procmon/api.sock by default. It does not terminate TLS. procmon.target starts the collector and the API. tmpfiles creates /run/procmon for the socket.
  • The process is its own OAuth authorization server. The grant is client_credentials, and tokens are RS256 JWTs. Client ids and Argon2i secret hashes live in a separate SQLite database. client add prints the secret once.
  • base_url is the public https URL, including an optional path prefix. With https://procmon.example/procmon, data routes are under /procmon/v1/ and the discovery document is GET /.well-known/oauth-authorization-server/procmon.
  • Authenticated routes are GET /v1/syscall-stats, GET /v1/flushes, and GET /v1/syscalls. The syscall route returns the assigned x86-64 syscall numbers and names. GET /openapi.json, the JWKS document, and token request are unauthenticated. since and until are RFC3339 timestamps or a Go duration such as 1h.
  • SIGHUP rereads the API configuration. A read or validation error leaves the running configuration unchanged. SIGINT and SIGTERM close the socket and exit. systemctl reload procmon-api sends SIGHUP.

Build and release:

  • make build generates the eBPF object, builds both binaries, and writes dist/procmon_<version>-1_amd64.deb.
  • The package version can be injected at build time. A branch push builds a dev package whose version is <version>-dev.g plus the 12-character git hash, so it sorts before the release package of the same version.
  • A tag push runs the unit tests and, after they pass, attaches the release package here.
  • eBPF generation on Debian and Ubuntu installs llvm for llvm-strip and passes the multiarch include directory so asm/types.h is found.