liveBook · Manning

Prometheus

As explained in LLMs in Production

Prometheus is an open-source monitoring system that collects time-series metrics and supports querying and alerting.

Kubernetes can scale pods using CPU and memory metrics, but it does not provide GPU metrics to its autoscaler out of the box. For an LLM service, GPU utilization or GPU memory utilization may be the more useful signal. Prometheus collects those metrics from a source such as NVIDIA’s DCGM exporter and stores them as queryable time-series data. section 6.2.2

Prometheus is a monitoring system, not an autoscaling controller. It can collect metrics from Kubernetes APIs and applications through exporters, agents, or sidecars. It also supports alerting and exposes an HTTP API that tools such as Grafana can query for dashboards. section 6.2.2

Figure 6.7 Autoscaling based on a custom metric like GPU utilization requires several extra tools to work, including NVIDIA’s DCGM, a monitoring system like Prometheus Operator, and a custom metrics API like that provided by KEDA.
figure

The diagram shows why GPU-based autoscaling needs more than a metric exporter: DCGM supplies GPU measurements, Prometheus handles monitoring, and a custom-metrics API makes the signal available for scaling. section 6.2.2

The operational catch is that storing a metric in Prometheus does not make it visible to Kubernetes’s horizontal pod autoscaler. An adapter must expose the metric through Kubernetes’s custom or external metrics API; KEDA is one option in this stack. Plan for that extra service when moving from dashboards to GPU-based scaling. section 6.2.2 section 6.5

How LLMs in Production covers it

How deep it goes
Explains collection, time-series storage, querying, and the adapter requirement, but does not provide a Prometheus configuration walkthrough.
Examples
Illustrates GPU-utilization scaling with a diagram linking DCGM, Prometheus Operator, and a custom metrics API.
What you can do after
Evaluate/understand it as a metrics store for GPU-aware scaling, while recognizing that HPA needs an adapter to access those metrics.
How it connects
Connects NVIDIA DCGM, GPU utilization, Kubernetes horizontal pod autoscaling, custom metrics APIs, KEDA, and Grafana.

Also explained in

Compare how 8 books explain Prometheus →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.