-
Notifications
You must be signed in to change notification settings - Fork 18
/
prometheus_nodes.yml
109 lines (94 loc) · 3.38 KB
/
prometheus_nodes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# example for aci-exporter
receivers:
prometheus:
config:
scrape_configs:
# Job for APIC queries
- job_name: 'aci'
scrape_interval: 1m
scrape_timeout: 30s
metrics_path: /probe
params:
queries:
- health,fabric_node_info,object_count,max_capacity
http_sd_configs:
# discovery all fabrics
# To discover an individual fabric use - url: "http://localhost:9643/sd?target=<fabric>"
- url: "http://localhost:9643/sd"
refresh_interval: 5m
relabel_configs:
- source_labels: [ __meta_role ]
# Only include the aci_exporter_fabric __meta_role
regex: "aci_exporter_fabric"
action: "keep"
- source_labels: [ __address__ ]
target_label: __param_target
- source_labels: [ __param_target ]
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9643
# Job for ACI nodes based on discovery
- job_name: 'aci_nodes'
scrape_interval: 1m
scrape_timeout: 30s
metrics_path: /probe
params:
# OBS make sure to specify queries that only works for nodes AND have correct label regex for node based response
queries:
- interface_info
- interface_rx_stats
- interface_tx_stats
- interface_rx_err_stats
- interface_tx_err_stats
http_sd_configs:
# discovery all fabrics
# To discover an individual fabric use - url: "http://localhost:9643/sd?target=<fabric>"
- url: "http://localhost:9643/sd"
refresh_interval: 5m
relabel_configs:
- source_labels: [ __meta_role ]
# Only include the spine and leaf __meta_role
regex: "(spine|leaf)"
action: "keep"
# Get the target param from __address__ that is <fabric>#<oobMgmtAddr> by default
- source_labels: [ __address__ ]
separator: "#"
regex: (.*)#(.*)
replacement: $$1
target_label: __param_target
# Get the node param from __address__ that is <fabric>#<oobMgmtAddr> by default
- source_labels: [ __address__ ]
separator: "#"
regex: (.*)#(.*)
replacement: $$2
target_label: __param_node
# Set instance to the ip/hostname from the __param_node
- source_labels: [ __param_node ]
target_label: instance
# Add labels from discovery
- source_labels: [ __meta_fabricDomain ]
target_label: aci
- source_labels: [ __meta_id ]
target_label: nodeid
- source_labels: [ __meta_podId ]
target_label: podid
- source_labels: [ __meta_role ]
target_label: role
- source_labels: [ __meta_name ]
target_label: name
- target_label: __address__
replacement: 127.0.0.1:9643
processors:
batch:
timeout: 10s
exporters:
otlphttp:
endpoint: https://otlp-gateway
service:
pipelines:
metrics:
receivers:
- prometheus
processors:
- batch
exporters: [otlphttp]