Add Pure FlashArray OpenMetrics exporter to monitoring namespace

- Deploy purestorage/pure-fa-om-exporter:v1.0.27 container
- Configure API token secret for utilidor FlashArray (jarvis user)
- Expose /metrics endpoint via ClusterIP service on port 9490
- ServiceMonitor for kube-prometheus-stack auto-discovery
- ArgoCD application for GitOps deployment (wave 3)
- Scrape interval: 60s (storage metrics low frequency)
- Resource limits: 200m CPU / 128Mi memory

Provides pure_* metrics namespace for FlashArray capacity, performance,
volume stats, host connectivity, etc.
This commit is contained in:
Hermes Agent service account
2026-06-19 17:48:20 -05:00
parent f375c9567f
commit cb5ffc16d8
5 changed files with 230 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
# ------------------------------------------------------------------------------
# Platform: pure-exporter
# Wave 3 — monitoring infrastructure, depends on kube-prometheus-stack
#
# Pure Storage FlashArray OpenMetrics Exporter
# Provides FlashArray telemetry (capacity, performance, volumes, hosts) to Prometheus
#
# Installation flow:
# 1. Secret with FlashArray API token created
# 2. Deployment spins up exporter container
# 3. Service exposes /metrics endpoint
# 4. ServiceMonitor registers with Prometheus Operator
# 5. Prometheus begins scraping pure_* metrics
#
# Prerequisites:
# - kube-prometheus-stack deployed in monitoring namespace (wave 2)
# - FlashArray API token for jarvis readonly user
# - Network connectivity to utilidor.local.mk-labs.cloud:443
# ------------------------------------------------------------------------------
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: pure-exporter
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: default
source:
repoURL: https://gitea.mk-labs.cloud/rblundon/homelab.git
targetRevision: main
path: cluster/platform/pure-exporter
directory:
exclude: "application.yaml"
destination:
server: https://kubernetes.default.svc
namespace: monitoring
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=false # monitoring namespace already exists
- ServerSideApply=true

View File

@@ -0,0 +1,90 @@
# ------------------------------------------------------------------------------
# Pure FlashArray OpenMetrics Exporter - Deployment
#
# Provides Prometheus-scrapable metrics from Pure Storage FlashArray
# Polls FlashArray API and exposes /metrics endpoint for Prometheus ServiceMonitor
#
# Container: quay.io/purestorage/pure-fa-om-exporter (official image)
# Port: 9490 (standard exporter port)
# Config: tokens.yaml mounted from Secret
# ------------------------------------------------------------------------------
apiVersion: apps/v1
kind: Deployment
metadata:
name: pure-fa-exporter
namespace: monitoring
labels:
app.kubernetes.io/name: pure-fa-exporter
app.kubernetes.io/component: metrics
app.kubernetes.io/part-of: monitoring
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: pure-fa-exporter
template:
metadata:
labels:
app.kubernetes.io/name: pure-fa-exporter
app.kubernetes.io/component: metrics
spec:
containers:
- name: exporter
image: quay.io/purestorage/pure-fa-om-exporter:v1.0.27
imagePullPolicy: IfNotPresent
# Command args - point to tokens file
args:
- --port=9490
- --tokens=/etc/pure-exporter/tokens.yaml
ports:
- name: metrics
containerPort: 9490
protocol: TCP
# Resource limits (exporter is lightweight)
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
# Health checks
livenessProbe:
httpGet:
path: /
port: metrics
initialDelaySeconds: 10
periodSeconds: 30
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /
port: metrics
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 5
# Mount tokens.yaml from secret
volumeMounts:
- name: tokens
mountPath: /etc/pure-exporter
readOnly: true
volumes:
- name: tokens
secret:
secretName: pure-fa-exporter-token
items:
- key: tokens.yaml
path: tokens.yaml
# Security context
securityContext:
runAsNonRoot: true
runAsUser: 65534
fsGroup: 65534

View File

@@ -0,0 +1,26 @@
# ------------------------------------------------------------------------------
# Pure FlashArray OpenMetrics Exporter - API Token Secret
#
# Contains the FlashArray endpoint and API token for the exporter to authenticate
#
# Endpoint: utilidor.local.mk-labs.cloud (10.1.71.5)
# API User: jarvis (readonly)
#
# Note: This is a base64-encoded secret. For production, consider using
# ExternalSecret with 1Password integration like portworx-csi does.
# ------------------------------------------------------------------------------
apiVersion: v1
kind: Secret
metadata:
name: pure-fa-exporter-token
namespace: monitoring
labels:
app.kubernetes.io/name: pure-fa-exporter
app.kubernetes.io/component: metrics
type: Opaque
stringData:
# tokens.yaml format for the exporter
tokens.yaml: |
utilidor:
address: utilidor.local.mk-labs.cloud
api_token: 6157dea0-4c0d-b14b-6e6a-453aa649355d

View File

@@ -0,0 +1,23 @@
# ------------------------------------------------------------------------------
# Pure FlashArray OpenMetrics Exporter - Service
#
# ClusterIP service exposing /metrics endpoint for Prometheus scraping
# No ingress needed - pure east/west traffic within monitoring namespace
# ------------------------------------------------------------------------------
apiVersion: v1
kind: Service
metadata:
name: pure-fa-exporter
namespace: monitoring
labels:
app.kubernetes.io/name: pure-fa-exporter
app.kubernetes.io/component: metrics
spec:
type: ClusterIP
ports:
- name: metrics
port: 9490
targetPort: metrics
protocol: TCP
selector:
app.kubernetes.io/name: pure-fa-exporter

View File

@@ -0,0 +1,47 @@
# ------------------------------------------------------------------------------
# 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
relabelings:
- sourceLabels: [__param_endpoint]
targetLabel: array
action: replace