remote host info
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user