- 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.
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
# ------------------------------------------------------------------------------
|
|
# 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
|