PORTWORX-ENTERPRISE-PROFESSIONAL practice question 2 of 15

How should a Portworx administrator expose metrics to externally provisioned Prometheus?

Full set: 75 questions
Answer options
A: Enable metrics in the storagecluster object by setting the following: spec: monitoring: prometheus: exportMetrics: true Correct answer
B: Enable metrics in the storagecluster object by setting: spec: monitoring: exportMetrics: true
C: Enable metrics in the Portworx cluster by running the command: pxctl service monitoring enable --export-metrics-only
Correct Answer:
A. Enable metrics in the storagecluster object by setting the following: spec: monitoring: prometheus: exportMetrics: true
Explanation

To expose Portworx metrics to an externally managed Prometheus instance, the administrator must modify the StorageCluster custom resource. The correct method is to set the exportMetrics flag to true under the spec.monitoring.prometheus path. This declarative approach instructs the Portworx Operator to create the necessary ServiceMonitor or PodMonitor resources that the external Prometheus Operator can discover, allowing it to scrape metrics from Portworx pods without deploying the Portworx-internal Prometheus stack.

Why Incorrect

B. The exportMetrics field is incorrectly placed. According to the StorageCluster CRD schema, it must be nested within the prometheus object, not directly under monitoring.
C. Using pxctl is an imperative command. The standard, declarative, and idempotent method for managing cluster-wide configuration in an operator-managed Portworx installation is by modifying the StorageCluster object.

References

1. Portworx Enterprise Documentation

"Monitor Portworx with Prometheus": This official document details the configuration for monitoring. In the section "Using an existing Prometheus Operator

" it explicitly states: "If you want to use an existing Prometheus Operator to monitor Portworx

you must enable the exportMetrics flag in the StorageCluster spec." It then provides the exact YAML structure shown in option A.

Source: Portworx by Pure Storage Official Documentation. Navigate to the Monitor and Troubleshoot -> Monitor Portworx with Prometheus -> Using an existing Prometheus Operator section.

2. Portworx Enterprise Documentation

"Portworx Operator Spec / CRD Reference": The reference for the StorageCluster Custom Resource Definition confirms the object hierarchy. The monitoring spec contains a prometheus object

which in turn contains the exportMetrics boolean field. This schema validates that spec.monitoring.prometheus.exportMetrics is the correct path.

Source: Portworx by Pure Storage Official Documentation. Navigate to the Reference -> Portworx Operator on Kubernetes -> Operator Spec / CRD Reference section and inspect the StorageCluster spec.

Scroll to Top