-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathspec.yaml
More file actions
254 lines (234 loc) · 9 KB
/
Copy pathspec.yaml
File metadata and controls
254 lines (234 loc) · 9 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
name: HAProxy
fleet_configurable: true
files:
- name: haproxy.yaml
discovery:
strategies:
- strategy: from_ports
port_hints:
- 8404
candidates:
- use_openmetrics: "true"
openmetrics_endpoint: "http://{service.host}:{port.number}/metrics"
options:
- template: init_config
options:
- template: init_config/openmetrics
- template: instances
options:
- name: use_prometheus
fleet_configurable: true
hidden: true
value:
example: false
type: boolean
description: |
Enable to preview the new version of the check which supports HAProxy version 2+
or environments using the HAProxy exporter.
Prometheus-related options take effect only when this is set to `true`.
- name: use_openmetrics
fleet_configurable: true
value:
example: false
type: boolean
description: |
Enable to preview the new version of the check which supports HAProxy version 2+
or environments using the HAProxy exporter.
OpenMetrics-related options take effect only when this is set to `true`.
This check uses the latest OpenMetrics V2 implementation for more features and better performance.
Note: To see the configuration options for the OpenMetrics V1 implementation (Agent 7.34 or older),
https://github.com/DataDog/integrations-core/blob/7.34.x/haproxy/datadog_checks/haproxy/data/conf.yaml.example
- template: instances/openmetrics
overrides:
openmetrics_endpoint.required: false
- template: instances/openmetrics_legacy_base
hidden: true
overrides:
prometheus_url.required: false
- name: url
fleet_configurable: true
formats: ["url"]
enabled: true
legacy: true
value:
example: http://localhost/admin?stats
type: string
display_default: null
description: |
HAProxy URL to connect to gather metrics.
Set the appropriate <USERNAME> and <PASSWORD>, or use a UNIX stats
or admin socket directly: unix:///var/run/haproxy.sock
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: status_check
fleet_configurable: true
legacy: true
value:
example: false
type: boolean
description: |
This parameter instructs the check to send events on status changes in the backend.
This is DEPRECATED in favor of the creation of a monitor on the service check status
and will be removed in a future version.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: collect_aggregates_only
fleet_configurable: true
legacy: true
value:
anyOf:
- type: boolean
- type: string
example: true
description: |
This parameter instructs the check to collect metrics only from the aggregate frontend/backend
status lines from the stats output instead of for each backend. With this parameter set to false the agent
collects data for each backend but ignores the aggregated data for backends. Because some metrics are only
available for aggregates, you can also set this parameter to the string 'both' to collect everything.
Please note that this means that if you have queries like computing the sum of all requests being made, the
result will be twice as expected. To get the correct result, you have to explicitly add some filters to the
query.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: collect_status_metrics
fleet_configurable: true
legacy: true
value:
example: false
type: boolean
description: |
This parameter instructs the check to collect metrics on status counts (e.g. haproxy.count_per_status)
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: collect_status_metrics_by_host
fleet_configurable: true
legacy: true
value:
example: false
type: boolean
description: |
This parameter instructs the check to collect status metrics per host instead of per service.
This only applies if `collect_status_metrics` is true.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: collate_status_tags_per_host
fleet_configurable: true
legacy: true
value:
example: true
type: boolean
description: |
This parameter collects `status` tags for `haproxy.count_per_status` up to one of
(`available`, `unavailable`) for each discovered backend.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: count_status_by_service
fleet_configurable: true
legacy: true
value:
example: true
type: boolean
description: |
This parameter instructs the check to tag the status counts it collects by service in addition to by host.
This only applies if `collect_status_metrics` is `true`.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: tag_service_check_by_host
fleet_configurable: true
legacy: true
value:
example: false
type: boolean
description: |
This parameter instructs the check to tag the service check status by host on top of other tags.
The default case will only tag by backend and service.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: services_include
legacy: true
value:
example:
- <SERVICE_NAME_1>
- <SERVICE_NAME_2>
type: array
items:
type: string
description: |
Filter metrics by services. If a tag matches an exclude rule, it won't be included
unless it also matches an include rule.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
fleet_configurable: false
- name: services_exclude
fleet_configurable: true
legacy: true
value:
example:
- .*
type: array
items:
type: string
description: |
Filter metrics by services. If a service name matches an exclude rule, it won't be included
unless it also matches an include rule.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: disable_legacy_service_tag
fleet_configurable: true
legacy: true
value:
example: false
type: boolean
description: |
Whether or not to stop submitting the tag `service` that has been renamed
to `haproxy_service` and disable the associated deprecation warning.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
- name: active_tag
legacy: true
value:
example: false
type: boolean
description: |
Includes the 'active' tag to metrics to denote whether a backend belongs to the
"active" pool of connections normally used for servicing requests.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
fleet_configurable: false
- name: enable_service_check
fleet_configurable: true
legacy: true
value:
example: false
type: boolean
description: |
Enable the HAProxy service check.
- name: tags_regex
legacy: true
value:
type: string
description: |
This parameter instructs the check to use the defined named regex for creating
additional tags based on the name of the HAProxy service.
tags_regex: 'be_edge_http_(?P<team>[a-z]+)\-(?P<env>[a-z]+)_(?P<app>.*)'
would match service name be_edge_http_sre-prod_elk and include additional
tags: ['team:sre','env:prod','app:elk']
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
fleet_configurable: false
- name: startup_grace_seconds
legacy: true
value:
example: 0
type: number
description: |
Time to wait on startup or reload of haproxy before sending metrics
When haproxy reloads, if there is a `grace` period on some proxies, 2
haproxies will stay running for that period, possibly including the
stats endpoint. Stats returned by haproxy during this period will only
refer to one of the multiple instances of haproxy, and will not
accurately reflect the state of the system.
If this parameter is >0, no datapoints will be sent until the uptime of
haproxy reaches this many seconds.
NOTE: This only takes effect when `use_openmetrics` is set to `false`.
fleet_configurable: false
- template: logs
example:
- type: udp
port: 514
service: haproxy
source: haproxy
- name: auto_conf.yaml
options:
- template: ad_identifiers
overrides:
value.example:
- haproxy
- template: auto_conf/discovery