Files
zeekayandHanzo Dev 3e48e928f9 monitoring: fix validator exporter /ext->/v1 + add node/pod memory (OOM eyes)
luxd v1.34 serves the JSON-RPC/info/health APIs under /v1/* not /ext/*, so the
validator-health exporter was polling dead paths and every mainnet validator
falsely reported down. Repoint exporter.py to /v1/*.

Add the incident-critical node/pod memory pipeline on lux-k8s (the owner is
debugging luxd OOM-evictions):
- node-exporter DaemonSet (per-node host memory, all nodes incl luxd nodes)
- kube-state-metrics (pod phase/restarts/OOM+Evicted reasons, node conditions)
- vmagent RBAC + scrape jobs for node-exporter, kubelet cAdvisor (pod mem,
  drop-filtered), kube-state-metrics; heavy pods pinned to roomy non-luxd nodes
- Grafana dashboard 'Lux — Cluster Nodes & OOM' (uid lux-nodes-oom)

Read-only w.r.t. luxd/ns lux-mainnet. Ships via the existing vmagent ->
metrics.hanzo.ai hub.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-24 12:45:39 -07:00

30 lines
950 B
YAML

# RBAC for lux-validator-vmagent so it can Kubernetes-SD scrape node-exporter
# endpoints and the kubelet cAdvisor (via apiserver proxy). Read-only.
apiVersion: v1
kind: ServiceAccount
metadata:
name: lux-validator-vmagent
namespace: lux-system
labels: {app: lux-validator-vmagent, brand: lux}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: lux-validator-vmagent
labels: {brand: lux}
rules:
- apiGroups: [""]
resources: [nodes, nodes/metrics, nodes/proxy, services, endpoints, pods]
verbs: [get, list, watch]
- nonResourceURLs: ["/metrics", "/metrics/cadvisor"]
verbs: [get]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: lux-validator-vmagent
labels: {brand: lux}
roleRef: {apiGroup: rbac.authorization.k8s.io, kind: ClusterRole, name: lux-validator-vmagent}
subjects:
- {kind: ServiceAccount, name: lux-validator-vmagent, namespace: lux-system}