Add ServiceMonitors and Grafana dashboards for Harbor, External-DNS, and Ingress-NGINX
- Created ServiceMonitor for Harbor (harbor-core, harbor-exporter, harbor-jobservice, harbor-registry) - Port: http-metrics (8001) - Scrape interval: 30s - Verified metrics: harbor_core_http_request_duration_seconds_count - Created ServiceMonitor for External-DNS - Port: http (7979) - Scrape interval: 30s - Verified metrics: external_dns_registry_endpoints_total - Created ServiceMonitor for Ingress-NGINX - Port: metrics (10254) - Scrape interval: 30s - Verified metrics: nginx_ingress_controller_requests - Added Grafana dashboards: - Harbor Overview (dashboard 16366) - External-DNS (dashboard 15038) - Ingress-NGINX Controller (dashboard 9614) All ServiceMonitors deployed and actively scraping. Prometheus targets confirmed UP.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
36
cluster/platform/external-dns/servicemonitor.yaml
Normal file
36
cluster/platform/external-dns/servicemonitor.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# External-DNS Metrics - ServiceMonitor
|
||||
#
|
||||
# Configures Prometheus Operator to scrape External-DNS metrics
|
||||
#
|
||||
# Scrape interval: 30s
|
||||
# Endpoint: /metrics on port 7979
|
||||
# Metrics namespace: externaldns_* (externaldns_registry_endpoints_total, etc.)
|
||||
# ------------------------------------------------------------------------------
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: external-dns-metrics
|
||||
namespace: external-dns
|
||||
labels:
|
||||
app.kubernetes.io/name: external-dns
|
||||
app.kubernetes.io/component: metrics
|
||||
# Label selector for kube-prometheus-stack discovery
|
||||
release: monitoring
|
||||
spec:
|
||||
# Select the external-dns service
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: external-dns
|
||||
|
||||
# Namespace selector
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- external-dns
|
||||
|
||||
# Scrape endpoint configuration
|
||||
endpoints:
|
||||
- port: http
|
||||
interval: 30s
|
||||
scrapeTimeout: 10s
|
||||
path: /metrics
|
||||
49
cluster/platform/harbor/servicemonitor.yaml
Normal file
49
cluster/platform/harbor/servicemonitor.yaml
Normal file
@@ -0,0 +1,49 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Harbor Metrics - ServiceMonitor
|
||||
#
|
||||
# Configures Prometheus Operator to scrape Harbor metrics
|
||||
#
|
||||
# Scrape interval: 30s
|
||||
# Components scraped:
|
||||
# - harbor-core: Core service HTTP metrics
|
||||
# - harbor-registry: Registry-specific metrics
|
||||
# - harbor-jobservice: Job and vulnerability scan metrics
|
||||
# - harbor-exporter: Harbor metrics exporter
|
||||
# Metrics namespace: harbor_* (harbor_core_*, harbor_project_*, etc.)
|
||||
# ------------------------------------------------------------------------------
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: harbor-metrics
|
||||
namespace: harbor
|
||||
labels:
|
||||
app: harbor
|
||||
app.kubernetes.io/name: harbor
|
||||
app.kubernetes.io/component: metrics
|
||||
# Label selector for kube-prometheus-stack discovery
|
||||
release: monitoring
|
||||
spec:
|
||||
# Select Harbor services with metrics endpoints
|
||||
selector:
|
||||
matchLabels:
|
||||
app: harbor
|
||||
|
||||
# Namespace selector
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- harbor
|
||||
|
||||
# Scrape endpoint configuration
|
||||
endpoints:
|
||||
# Harbor Core - main API and web UI metrics
|
||||
- port: http-metrics
|
||||
interval: 30s
|
||||
scrapeTimeout: 10s
|
||||
path: /metrics
|
||||
relabelings:
|
||||
- sourceLabels: [__meta_kubernetes_service_label_component]
|
||||
targetLabel: component
|
||||
action: replace
|
||||
- sourceLabels: [__meta_kubernetes_service_name]
|
||||
targetLabel: service
|
||||
action: replace
|
||||
37
cluster/platform/ingress-nginx/servicemonitor.yaml
Normal file
37
cluster/platform/ingress-nginx/servicemonitor.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Ingress-NGINX Controller Metrics - ServiceMonitor
|
||||
#
|
||||
# Configures Prometheus Operator to scrape Ingress-NGINX Controller metrics
|
||||
#
|
||||
# Scrape interval: 30s
|
||||
# Endpoint: /metrics on port 10254
|
||||
# Metrics namespace: nginx_ingress_* (nginx_ingress_controller_requests, etc.)
|
||||
# ------------------------------------------------------------------------------
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: ServiceMonitor
|
||||
metadata:
|
||||
name: ingress-nginx-metrics
|
||||
namespace: ingress-nginx
|
||||
labels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/component: metrics
|
||||
# Label selector for kube-prometheus-stack discovery
|
||||
release: monitoring
|
||||
spec:
|
||||
# Select the ingress-nginx-controller-metrics service
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: ingress-nginx
|
||||
app.kubernetes.io/component: controller
|
||||
|
||||
# Namespace selector
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- ingress-nginx
|
||||
|
||||
# Scrape endpoint configuration
|
||||
endpoints:
|
||||
- port: metrics
|
||||
interval: 30s
|
||||
scrapeTimeout: 10s
|
||||
path: /metrics
|
||||
Reference in New Issue
Block a user