This commit is contained in:
Kar k1
2025-09-19 21:03:56 +05:30
commit d786fc13ef
7 changed files with 672 additions and 0 deletions

33
prometheus/prometheus.yml Normal file
View File

@@ -0,0 +1,33 @@
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_timeout: 10s
scrape_configs:
# Scrape Prometheus itself
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
# Scrape Node Exporter
- job_name: 'node-exporter'
static_configs:
- targets: ['node-exporter:9100']
relabel_configs:
- source_labels: [__address__]
target_label: instance
replacement: 'node-exporter'
metric_relabel_configs:
- source_labels: [__name__]
regex: 'node_.*'
action: keep
# Scrape cAdvisor for container metrics
- job_name: 'cadvisor'
static_configs:
- targets: ['cadvisor:8080']
# Example: Add more targets here for other systems
# - job_name: 'other-nodes'
# static_configs:
# - targets: ['other-node-ip:9100', 'another-node-ip:9100']