feat: comprehensive observability stack
- Add restic_backups and mattermost scrape jobs to Prometheus config - Add UnPoller deployment+service+secret for UniFi metrics (unpoller.yaml) - Add unifi scrape job targeting unpoller in-cluster - Add 4 Grafana dashboards as NixOS-managed etc files on hosea: - system-health: CPU, memory, disk, network per host - backup-health: restic backup freshness and duration - kubernetes: pod counts, restart rates, node resources - network: DNS queries, DHCP leases, UniFi ports, ping latency - Add grafana-api-token agenix secret placeholder on hosea - Open firewall ports 9100/9427/9558 for prometheus exporters in baseline.nix
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: unpoller-credentials
|
||||
namespace: monitoring
|
||||
type: Opaque
|
||||
stringData:
|
||||
# Replace with actual UniFi controller password for the 'unpoller' read-only user
|
||||
password: "CHANGEME"
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: unpoller
|
||||
namespace: monitoring
|
||||
labels:
|
||||
app: unpoller
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: unpoller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: unpoller
|
||||
spec:
|
||||
containers:
|
||||
- name: unpoller
|
||||
image: ghcr.io/unpoller/unpoller:latest
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 9130
|
||||
env:
|
||||
- name: UP_UNIFI_DEFAULT_URL
|
||||
value: "https://10.42.1.1:8443"
|
||||
- name: UP_UNIFI_DEFAULT_VERIFY_SSL
|
||||
value: "false"
|
||||
- name: UP_UNIFI_DEFAULT_USER
|
||||
value: "unpoller"
|
||||
- name: UP_UNIFI_DEFAULT_PASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: unpoller-credentials
|
||||
key: password
|
||||
- name: UP_PROMETHEUS_DISABLE
|
||||
value: "false"
|
||||
- name: UP_INFLUXDB_DISABLE
|
||||
value: "true"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unpoller
|
||||
namespace: monitoring
|
||||
labels:
|
||||
app: unpoller
|
||||
spec:
|
||||
selector:
|
||||
app: unpoller
|
||||
ports:
|
||||
- name: metrics
|
||||
port: 9130
|
||||
targetPort: 9130
|
||||
Reference in New Issue
Block a user