# ------------------------------------------------------------------------------ # Pure FlashArray OpenMetrics Exporter - ServiceMonitor # # Configures Prometheus Operator to scrape Pure FlashArray metrics # # Scrape interval: 60s (storage metrics don't need high frequency) # Endpoint: /metrics?endpoint=utilidor (multi-target exporter pattern) # Metrics namespace: pure_* (purefa_info, purefa_array_*, purefa_volume_*, etc.) # ------------------------------------------------------------------------------ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: pure-fa-exporter namespace: monitoring labels: app.kubernetes.io/name: pure-fa-exporter app.kubernetes.io/component: metrics # Label selector for kube-prometheus-stack release: monitoring spec: # Select the pure-fa-exporter service selector: matchLabels: app.kubernetes.io/name: pure-fa-exporter # Namespace selector namespaceSelector: matchNames: - monitoring # Scrape endpoint configuration endpoints: - port: metrics interval: 60s scrapeTimeout: 30s path: /metrics # Query parameter for multi-target exporter pattern # Uses the array_id from tokens.yaml (utilidor) params: endpoint: - utilidor # Relabeling to add FlashArray identifier and required dashboard labels relabelings: # Add 'instance' label (dashboard expects this for array identification) - sourceLabels: [__param_endpoint] targetLabel: instance action: replace # Keep 'array' label for compatibility - sourceLabels: [__param_endpoint] targetLabel: array action: replace # Static labels for dashboard filters metricRelabelings: # Add 'env' label (dashboard template variable requirement) - targetLabel: env replacement: production action: replace # Add 'location' label (optional dashboard filter) - targetLabel: location replacement: homelab action: replace # Add 'site' label (optional dashboard filter) - targetLabel: site replacement: main action: replace