forked from k-space/kube
Migrate to Prometheus Operator
This commit is contained in:
@@ -1,17 +1,14 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: monitoring
|
||||
name: prometheus-operator
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: 'git@git.k-space.ee:k-space/kube.git'
|
||||
path: monitoring
|
||||
path: prometheus-operator
|
||||
targetRevision: HEAD
|
||||
destination:
|
||||
server: 'https://kubernetes.default.svc'
|
||||
namespace: monitoring
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
namespace: prometheus-operator
|
33
argocd/monitoring.yml
Normal file
33
argocd/monitoring.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: argocd
|
||||
spec:
|
||||
selector: {}
|
||||
podMetricsEndpoints:
|
||||
- port: metrics
|
||||
- port: controller
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: argocd
|
||||
spec:
|
||||
groups:
|
||||
- name: argocd
|
||||
rules:
|
||||
- alert: ArgoNotSynced
|
||||
annotations:
|
||||
summary: Some applications in Argo are out of sync
|
||||
expr: sum by (dest_namespace) (argocd_app_info{sync_status!="Synced"}) > 0
|
||||
for: 8h
|
||||
labels:
|
||||
severity: warning
|
||||
- alert: ArgoNotHealthy
|
||||
annotations:
|
||||
summary: Some applications in Argo are not healthy
|
||||
expr: argocd_app_info{health_status!="Healthy"}
|
||||
for: 30m
|
||||
labels:
|
||||
severity: warning
|
@@ -77,10 +77,6 @@ server:
|
||||
|
||||
metrics:
|
||||
enabled: true
|
||||
service:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8083"
|
||||
|
||||
# We don't use ApplicationSet CRD-s (yet)
|
||||
applicationSet:
|
||||
@@ -89,26 +85,14 @@ applicationSet:
|
||||
repoServer:
|
||||
metrics:
|
||||
enabled: true
|
||||
service:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8084"
|
||||
|
||||
notifications:
|
||||
metrics:
|
||||
enabled: true
|
||||
service:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "9001"
|
||||
|
||||
controller:
|
||||
metrics:
|
||||
enabled: true
|
||||
service:
|
||||
annotations:
|
||||
prometheus.io/scrape: "true"
|
||||
prometheus.io/port: "8082"
|
||||
|
||||
configs:
|
||||
secret:
|
||||
|
Reference in New Issue
Block a user