In this section, we’ll use the Prometheus receiver with the OpenTelemetry collector
to monitor the NVIDIA components running in the OpenShift cluster.
Capture the NVIDIA DCGM Exporter metrics
The NVIDIA DCGM exporter is running in our OpenShift cluster. It
exposes GPU metrics that we can send to Splunk.
Start by navigating to the following directory:
cd otel-collector
To do this, let’s customize the configuration of the collector by editing the
otel-collector-values.yaml file that we used earlier when deploying the collector.
Add the following content, just below the kubeletstats receiver:
receiver_creator/nvidia:# Name of the extensions to watch for endpoints to start and stop.watch_observers:[k8s_observer ]receivers:prometheus/dcgm:config:config:scrape_configs:- job_name:gpu-metricsscrape_interval:60sstatic_configs:- targets:- '`endpoint`:9400'rule:type == "pod" && labels["app"] == "nvidia-dcgm-exporter"
This tells the collector to look for pods with a label of app=nvidia-dcgm-exporter.
And when it finds a pod with this label, scrape the /v1/metrics endpoint using port 9400.
To ensure the receiver is used, we’ll need to add a new pipeline to the otel-collector-values.yaml file
as well.
Before applying the changes, let’s add one more Prometheus receiver in the next section.
Capture the NVIDIA NIM metrics
The meta-llama-3-2-1b-instruct LLM that we just deployed with NVIDIA NIM also
includes a Prometheus endpoint that we can scrape with the collector. Let’s add the
following to the otel-collector-values.yaml file, just below the
prometheus/dcgm receiver we added earlier:
This tells the collector to look for pods with a label of app=meta-llama-3-2-1b-instruct.
And when it finds a pod with this label, scrape the /v1/metrics endpoint using port 8000.
There’s no need to make changes to the pipeline, as this receiver will already be picked up
as part of the receiver_creator/nvidia receiver.
Add a Filter Processor
Prometheus endpoints can expose a large number of metrics, sometimes with high cardinality.
Let’s add a filter processor that defines exactly what metrics we want to send to Splunk.
Specifically, we’ll send only the metrics that are utilized by a dashboard chart or an
alert detector.
Add the following code to the otel-collector-values.yaml file, after the exporters section
but before the receivers section:
Before applying the configuration changes to the collector, take a moment to compare the
contents of your modified otel-collector-values.yaml file with the otel-collector-values-with-nvidia.yaml file.
Update your file as needed to ensure the contents match. Remember that indentation is important
for yaml files, and needs to be precise.
Update the OpenTelemetry Collector Config
Now we can update the OpenTelemetry collector configuration by running the
following Helm command:
Navigate to Dashboards in Splunk Observability Cloud, then search for the
Cisco AI PODs Dashboard, which is included in the Built-in dashboard groups.
Ensure the dashboard is filtered on your OpenShift cluster name.
The charts should be populated as in the following example: