diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-27 14:29:33 +0100 |
|---|---|---|
| committer | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2025-11-27 14:29:33 +0100 |
| commit | 9fc1e24543dc0b79a8f75f078feced6c5ee1fa96 (patch) | |
| tree | 90bd702f686f24b2e15965588114333c7cbc09aa | |
| parent | 0378484a57f219fc0156e208bff5152ee8624837 (diff) | |
| download | monitoring-plugins-9fc1e24543dc0b79a8f75f078feced6c5ee1fa96.tar.gz | |
check_curl: try to be more helpful in check_curls help
Trying to be more specific with the check_curl help.
The idea is to clarify how the parameters are supposed to be used.
| -rw-r--r-- | plugins/check_curl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index fc704171..2c258f36 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
| @@ -1480,7 +1480,9 @@ void print_help(void) { | |||
| 1480 | printf(" %s\n", _("Append a port to include it in the header (eg: example.com:5000)")); | 1480 | printf(" %s\n", _("Append a port to include it in the header (eg: example.com:5000)")); |
| 1481 | printf(" %s\n", "-I, --IP-address=ADDRESS"); | 1481 | printf(" %s\n", "-I, --IP-address=ADDRESS"); |
| 1482 | printf(" %s\n", | 1482 | printf(" %s\n", |
| 1483 | _("IP address or name (use numeric address if possible to bypass DNS lookup).")); | 1483 | "IP address or name (use numeric address if possible to bypass DNS lookup).\n"); |
| 1484 | printf(" %s\n", | ||
| 1485 | "This overwrites the network address of the target while leaving everything else (HTTP headers) as they are"); | ||
| 1484 | printf(" %s\n", "-p, --port=INTEGER"); | 1486 | printf(" %s\n", "-p, --port=INTEGER"); |
| 1485 | printf(" %s", _("Port number (default: ")); | 1487 | printf(" %s", _("Port number (default: ")); |
| 1486 | printf("%d)\n", HTTP_PORT); | 1488 | printf("%d)\n", HTTP_PORT); |
| @@ -1544,6 +1546,7 @@ void print_help(void) { | |||
| 1544 | printf(" %s\n", _("String to expect in the content")); | 1546 | printf(" %s\n", _("String to expect in the content")); |
| 1545 | printf(" %s\n", "-u, --url=PATH"); | 1547 | printf(" %s\n", "-u, --url=PATH"); |
| 1546 | printf(" %s\n", _("URL to GET or POST (default: /)")); | 1548 | printf(" %s\n", _("URL to GET or POST (default: /)")); |
| 1549 | printf(" %s\n", _("This is the part after the address in a URL, so for \"https://example.com/index.html\" it would be '-u /index.html'")); | ||
| 1547 | printf(" %s\n", "-P, --post=STRING"); | 1550 | printf(" %s\n", "-P, --post=STRING"); |
| 1548 | printf(" %s\n", _("URL decoded http POST data")); | 1551 | printf(" %s\n", _("URL decoded http POST data")); |
| 1549 | printf(" %s\n", | 1552 | printf(" %s\n", |
| @@ -1685,7 +1688,7 @@ void print_help(void) { | |||
| 1685 | printf(" %s\n", _("It is recommended to use an environment proxy like:")); | 1688 | printf(" %s\n", _("It is recommended to use an environment proxy like:")); |
| 1686 | printf(" %s\n", | 1689 | printf(" %s\n", |
| 1687 | _("https_proxy=http://192.168.100.35:3128 ./check_curl -H www.verisign.com -S")); | 1690 | _("https_proxy=http://192.168.100.35:3128 ./check_curl -H www.verisign.com -S")); |
| 1688 | printf(" %s\n", _("legacy proxy requests in check_http style still work:")); | 1691 | printf(" %s\n", _("legacy proxy requests in check_http style might still work, but are frowned upon, so DONT:")); |
| 1689 | printf(" %s\n", _("check_curl -I 192.168.100.35 -p 3128 -u https://www.verisign.com/ -S -j " | 1692 | printf(" %s\n", _("check_curl -I 192.168.100.35 -p 3128 -u https://www.verisign.com/ -S -j " |
| 1690 | "CONNECT -H www.verisign.com ")); | 1693 | "CONNECT -H www.verisign.com ")); |
| 1691 | printf(" %s\n", _("all these options are needed: -I <proxy> -p <proxy-port> -u <check-url> " | 1694 | printf(" %s\n", _("all these options are needed: -I <proxy> -p <proxy-port> -u <check-url> " |
