Projects

HPC Job Observability Service

A microservice for tracking and monitoring HPC (High Performance Computing) job resource utilization with Prometheus metrics export.

23 January 2026 · HPC

Tech: Go, Docker, Bash, Slurm

Highlights

  • Microservice for tracking HPC job resource utilization
  • Exports metrics in Prometheus format for easy monitoring
  • Integrates with Slurm workload manager for job data
  • Containerized with Docker for easy deployment

Overview

The HPC Job Observability Service is a specialized microservice proof of concept (POC) designed to bring modern observability practices to High Performance Computing (HPC) environments. Traditional HPC workloads often run as “black boxes” from a metrics perspective. This service bridges that gap by integrating directly with the Slurm workload manager to provide real-time tracking of job resource utilization (CPU, Memory, GPU).

The Problem #

In many HPC clusters, it is difficult for administrators and users to understand exactly how resources are being utilized during a job’s execution. Questions like “Is my job actually using the GPU?” or “Did my job fail because it ran out of memory?” are notoriously hard to answer without detailed, time-series metrics. Standard monitoring tools often aggregate at the host level, losing the context of individual jobs.

Solution Overview #

This project provides a complete observability pipeline that links infrastructure metrics directly to specific HPC jobs:

  1. Slurm Integration: Uses prolog and epilog scripts to capture job lifecycle events instantly without polling.
  2. Resource Collection: Leverages Linux cgroups v2 for accurate CPU and memory tracking, alongside vendor tools for GPU metrics.
  3. Metrics Export: Exposes data via a Prometheus-compatible endpoint, making it easy to create granular Grafana dashboards.

System Architecture #

The system follows a clean microservice architecture built with Go, designed for stability and low overhead on compute nodes.

Lifecycle events, data collection, and metrics export #

Lifecycle Events
Lifecycle Events , Data Collection, and Metrics Export.

Microservice Architecture #

HPC Job Observability Service system architecture diagram
System architecture (Go service, storage layer, collector, and Prometheus exporter).

Core Components #

Technical Highlights #

Event-Based Slurm Integration #

Instead of polling Slurm (which can be slow and stressful for the scheduler), the service uses an event-based approach.

Audit Logging & Traceability #

HPC environments frequently require traceability: who changed a job, what changed, and why. To support this, the service stores an audit trail of job lifecycle events and updates.

At a high level, each significant change to a job results in an audit event that captures:

This makes it much easier to debug cases like “why did a job become cancelled?” or “when did we start sampling metrics for this job?” without relying on ephemeral scheduler logs.

Granular Metrics #

The service pushes the boundaries of standard monitoring by collecting:

This granularity allows for detailed dashboards where users can correlate code execution phases with resource spikes.

API-First Design with OpenAPI Code Generation #

This project follows an API-first workflow: the OpenAPI specification is treated as the source of truth, and Go types + server interfaces are generated from the spec.

In practice, that means the development loop looks like:

  1. Update the OpenAPI YAML specification
  2. Run code generation (go generate ./...)
  3. Implement or update handler logic against generated interfaces

The benefits are substantial for a microservice that needs to stay maintainable:

Results #

This tool provides a “glass box” view into HPC jobs, enabling:

Grafana Dashboards (Examples) #

Once metrics are exported in Prometheus format, Grafana dashboards can provide an immediate “single pane of glass” for both job-level and node-level resource behavior.

Grafana dashboard: job metrics
Job-level view: runtime and per-job CPU/memory/GPU usage.
Grafana dashboard: node metrics overview
Node overview: cluster-wide distribution and hot-spot detection.
Grafana dashboard: node metrics detail
Node detail: utilization and capacity over time.
Grafana dashboard: storage metrics detail
Database: storage I/O metrics over time and failures.
Grafana dashboard: Go runtime metrics detail
Go runtime: heap, CPU usage, goroutines, and GC metrics.

Limitations & Next Steps #

This service is intentionally a proof of concept, focused on validating the architecture and data flow rather than being a hardened, production-complete platform.

There are plenty of directions to take it further: stronger auth and multi-tenancy, deeper scheduler integrations, more robust error handling and backpressure, richer GPU accounting, and more production-grade deployment and operational tooling.

It’s not a perfect complete solution today, but it’s a strong foundation that could be used to develop something even better.