remote host info

This commit is contained in:
Kar k1
2025-09-19 21:39:41 +05:30
parent 0fe581daa0
commit 96052fe992
2 changed files with 118 additions and 10 deletions

View File

@@ -9,18 +9,30 @@ scrape_configs:
static_configs:
- targets: ['localhost:9090']
# Scrape Node Exporter
- job_name: 'node-exporter'
# Local Node Exporter
- job_name: 'node-exporters'
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
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'