Skip to content

Commit 12d0e16

Browse files
committed
chore(haproxy-status): regenerate Director basket for URL-embedded basic auth
Drops the now-removed `--username` and `--password` arguments, their `haproxy_status_username` / `haproxy_status_password` DataFields and the matching default in the service template. Notes field re-rendered from the updated DESCRIPTION which now documents the URL-embedded basic auth pattern. Existing Icinga services still need to migrate the URL field to embed the credentials (e.g. `https://stats:s3cret@webserver:8443/server-status`); the plugin hard-UNKNOWNs with a clear migration pointer if `--username` or `--password` are still passed through.
1 parent 54c14ce commit 12d0e16

File tree

1 file changed

+4
-43
lines changed

1 file changed

+4
-43
lines changed

check-plugins/haproxy-status/icingaweb2-module-director/haproxy-status.json

Lines changed: 4 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,12 @@
2121
"--no-proxy": {
2222
"set_if": "$haproxy_status_no_proxy$"
2323
},
24-
"--password": {
25-
"value": "$haproxy_status_password$"
26-
},
2724
"--timeout": {
2825
"value": "$haproxy_status_timeout$"
2926
},
3027
"--url": {
3128
"value": "$haproxy_status_url$"
3229
},
33-
"--username": {
34-
"value": "$haproxy_status_username$"
35-
},
3630
"--warning": {
3731
"value": "$haproxy_status_warning$"
3832
}
@@ -84,16 +78,6 @@
8478
"datafield_id": 9,
8579
"is_required": "n",
8680
"var_filter": null
87-
},
88-
{
89-
"datafield_id": 10,
90-
"is_required": "n",
91-
"var_filter": null
92-
},
93-
{
94-
"datafield_id": 11,
95-
"is_required": "n",
96-
"var_filter": null
9781
}
9882
],
9983
"imports": [],
@@ -137,7 +121,7 @@
137121
"tpl-service-generic"
138122
],
139123
"max_check_attempts": 5,
140-
"notes": "Monitors HAProxy performance and health via the stats endpoint. Reports frontend and backend session usage, request rates, response times, error rates, and server states. Alerts when session usage exceeds the configured thresholds. Proxies, frontends, backends or individual servers can be filtered out with --ignore (e.g. an on-demand certbot backend that is only UP during cert renewal). Supports extended reporting via --lengthy.",
124+
"notes": "Monitors HAProxy performance and health via the stats endpoint. Reports frontend and backend session usage, request rates, response times, error rates, and server states. Alerts when session usage exceeds the configured thresholds. Proxies, frontends, backends or individual servers can be filtered out with --ignore (e.g. an on-demand certbot backend that is only UP during cert renewal). HTTP basic auth is supplied through the URL itself (`https://user:secret@host/server-status`); the credentials are stripped from the URL before the request is sent and instead carried in an `Authorization: Basic` header so they never reach the request line or any proxy access log. Supports extended reporting via --lengthy.",
141125
"notes_url": "https://linuxfabrik.github.io/monitoring-plugins/check-plugins/haproxy-status/",
142126
"object_name": "tpl-service-haproxy-status",
143127
"object_type": "template",
@@ -156,7 +140,6 @@
156140
"haproxy_status_no_proxy": false,
157141
"haproxy_status_timeout": 3,
158142
"haproxy_status_url": "unix:///run/haproxy.sock",
159-
"haproxy_status_username": "haproxy-stats",
160143
"haproxy_status_warning": 80
161144
},
162145
"volatile": null,
@@ -224,17 +207,6 @@
224207
"uuid": "a309e05c-4de7-443e-9c0e-a5ffb0f7c017"
225208
},
226209
"7": {
227-
"varname": "haproxy_status_password",
228-
"caption": "HAProxy Status: Password",
229-
"description": "HAProxy stats auth password. Not needed for socket access.",
230-
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
231-
"format": null,
232-
"settings": {
233-
"visibility": "hidden"
234-
},
235-
"uuid": "faf92ec9-694a-49e8-bbab-2c926539dfd6"
236-
},
237-
"8": {
238210
"varname": "haproxy_status_timeout",
239211
"caption": "HAProxy Status: Timeout",
240212
"description": "Network timeout in seconds.",
@@ -245,29 +217,18 @@
245217
},
246218
"uuid": "803a48ca-c842-48b7-8c06-ab626230eadb"
247219
},
248-
"9": {
220+
"8": {
249221
"varname": "haproxy_status_url",
250222
"caption": "HAProxy Status: URL",
251-
"description": "HAProxy stats URI. Accepts `unix:///path/to/haproxy.sock` or an HTTP(S) URL. Example: `--url https://webserver:8443/server-status`.",
223+
"description": "HAProxy stats URI. Accepts `unix:///path/to/haproxy.sock` or an HTTP(S) URL. For HTTP basic auth, embed the credentials in the URL itself; the plugin strips them from the netloc before the request is sent and carries them in an `Authorization: Basic` header. Example: `--url https://webserver:8443/server-status`. Example: `--url https://stats:s3cret@webserver:8443/server-status`.",
252224
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
253225
"format": null,
254226
"settings": {
255227
"visibility": "visible"
256228
},
257229
"uuid": "9a5bdff2-0b2c-4a02-a478-9723f60ea9cd"
258230
},
259-
"10": {
260-
"varname": "haproxy_status_username",
261-
"caption": "HAProxy Status: Username",
262-
"description": "HAProxy stats auth username. Not needed for socket access.",
263-
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
264-
"format": null,
265-
"settings": {
266-
"visibility": "visible"
267-
},
268-
"uuid": "e1afab75-bc8a-4c88-915b-fe423c9fd19d"
269-
},
270-
"11": {
231+
"9": {
271232
"varname": "haproxy_status_warning",
272233
"caption": "HAProxy Status: Warning",
273234
"description": "WARN threshold in percent.",

0 commit comments

Comments
 (0)