Files
casa/monitoring/prometheus/deploy/README.md
Márcio Fernandes a56f573a6f
All checks were successful
Monitoring services CI/CD Pipeline / deploy (push) Successful in 18s
monitoring - increase scrapeInterval to 120s, better selectors on Agent and memory decrease of agent from 360MB to 228MB
2026-03-18 12:17:38 +00:00

45 lines
1.1 KiB
Markdown

# Prometheus Setup
- <https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack>
- <https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml>
## helm chart
```bash
#add repo
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
```
**This helm chart, installs:**
- crd
- Operator
- kubernetes services monitors
```bash
kubectl get namespace monitoring || kubectl create namespace monitoring
helm upgrade --install prometheus-stack prometheus-community/kube-prometheus-stack \
--namespace monitoring \
--values=./helm/01-only-crd-and-operator.yaml \
--values=./helm/02-kube-metrics.yaml \
--values=./helm/03-node-exporter.yaml \
--values=./helm/04-kubelet.yaml \
--values=./helm/10-testing-values.yaml
```
## deploy prometheus agent
**requirements:**
On namespaces running prometheus monitors add label `prometheus-monitoring=enabled`
**Example:**
``` bash
kubectl label namespace monitoring prometheus-monitoring=enabled --overwrite
```
```bash
kubectl apply -f ./prometheus-agent.yaml
```