46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
global:
|
|
scrape_interval: 15s
|
|
evaluation_interval: 15s
|
|
scrape_timeout: 10s
|
|
|
|
scrape_configs:
|
|
# Scrape Prometheus itself
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|
|
|
|
# Local Node Exporter
|
|
- job_name: 'node-exporters'
|
|
static_configs:
|
|
- targets: ['node-exporter:9100']
|
|
labels:
|
|
instance: 'local-node'
|
|
|
|
# Remote Node Exporters
|
|
- job_name: 'remote-node-exporters'
|
|
static_configs:
|
|
- targets:
|
|
- 'REMOTE_VM_IP:9100' # Replace with your remote VM's IP
|
|
labels:
|
|
instance: 'remote-vm' # This will be the node name in Grafana
|
|
|
|
# Optional: If you need basic auth for the remote exporter
|
|
# basic_auth:
|
|
# username: 'your_username'
|
|
# password: 'your_password'
|
|
|
|
# Optional: If your remote exporter uses HTTPS
|
|
# scheme: https
|
|
# tls_config:
|
|
# insecure_skip_verify: true
|
|
|
|
# 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']
|