forked from megaease/easeprobe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support proxy config and env vars for HTTP, TCP and TLS Probers (…
…megaease#194) * support proxy config and env vars for HTTP, TCP and TLS Probers * Apply suggestions from code review Co-authored-by: Bomin Zhang <[email protected]> * add the proxy notes for notification * Update README.md Co-authored-by: Pantelis Roditis <[email protected]> * fix unit test failed in Windows * fix unit test failed in Windows * add the log for unit test * fix lint warrning * add the debug log and adjust the unit test Co-authored-by: Bomin Zhang <[email protected]> Co-authored-by: Pantelis Roditis <[email protected]>
- Loading branch information
1 parent
46f758f
commit f4fab9a
Showing
12 changed files
with
164 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -554,6 +554,7 @@ http: | |
# proxy: http://proxy.server:8080 | ||
# proxy: socks5://localhost:1085 | ||
# proxy: https://user:[email protected]:443 | ||
# Also support `HTTP_PROXY` & `HTTPS_PROXY` environment variables | ||
proxy: http://proxy.server:8080 | ||
# Request Method | ||
method: GET | ||
|
@@ -602,7 +603,8 @@ tcp: | |
host: example.com:22 | ||
timeout: 10s # default is 30 seconds | ||
interval: 2m # default is 60 seconds | ||
proxy: socks5://proxy.server:1080 # Optional. Only support socks5. | ||
# Also support the `ALL_PROXY` environment. | ||
- name: Kafka | ||
host: kafka.server:9093 | ||
``` | ||
|
@@ -721,6 +723,8 @@ TLS ping to remote endpoint, can probe for revoked or expired certificates | |
tls: | ||
- name: expired test | ||
host: expired.badssl.com:443 | ||
proxy: socks5://proxy.server:1080 # Optional. Only support socks5. | ||
# Also support the `ALL_PROXY` environment. | ||
insecure_skip_verify: true # dont check cert validity | ||
expire_skip_verify: true # dont check cert expire date | ||
alert_expire_before: 168h # alert if cert expire date is before X, the value is a Duration, see https://pkg.go.dev/time#ParseDuration. example: 1h, 1m, 1s. expire_skip_verify must be false to use this feature. | ||
|
@@ -964,15 +968,19 @@ notify: | |
- "KEY=Value" | ||
``` | ||
**Note**: All of the notifications support the following optional configuration parameters. | ||
```YAML | ||
dry: true # dry notification, print the Discord JSON in log(STDOUT) | ||
timeout: 20s # the timeout send out notification, default: 30s | ||
retry: # somehow the network is not good and needs to retry. | ||
times: 3 # default: 3 | ||
interval: 10s # default: 5s | ||
``` | ||
> **Note**: | ||
> | ||
> 1) Setting the environment variables `$HTTP_PROXY` & `$HTTPS_PROXY` allows for configuring the proxy settings for all HTTP related webhook notifications such as discord, slack, telegram etc. | ||
> | ||
> 2) All of the notifications support the following optional configuration parameters. | ||
> | ||
> ```YAML | ||
> dry: true # dry notification, print the Discord JSON in log(STDOUT) | ||
> timeout: 20s # the timeout send out notification, default: 30s | ||
> retry: # somehow the network is not good and needs to retry. | ||
> times: 3 # default: 3 | ||
> interval: 10s # default: 5s | ||
> ``` | ||
|
||
|
||
### 3.9 Global Setting Configuration | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.