gatus/api
raojinlin 59842d5e88
feat(alerting): custom alert support endpoint errors (#844)
* feat(alerting): add support for including endpoint errors in custom alerts

- Updated `buildHTTPRequest` method in `AlertProvider` to accept a `result` parameter.
- Added support for including `[ENDPOINT_ERRORS]` in both the request body and URL, which will be replaced by the errors from `Result.Errors[]`.
- Adjusted `CreateExternalEndpointResult` to capture and store errors from query parameters.
- This allows custom alerts to include detailed error information, enhancing the flexibility of alert notifications.

* feat: add ENDPOINT_ERRORS example

* feat: add tests

* Refactor: code review feedback

* delete unsed errors

* Update README.md

* Apply suggestions from code review

---------

Co-authored-by: raojinlin <raojinlin302@gmail.com>
Co-authored-by: TwiN <twin@linux.com>
2024-09-17 22:26:21 -04:00
..
api_test.go test(security): Make sure router behaves as intended when authn is required 2023-07-11 22:46:49 -04:00
api.go feat: Implement push-based external endpoints (#724) 2024-04-08 21:00:40 -04:00
badge_test.go refactor: Break core package into multiple packages under config/endpoint (#759) 2024-05-09 22:56:16 -04:00
badge.go feat(storage): Support 30d badges (#836) 2024-08-11 22:40:19 -04:00
cache.go feat(api): Migrate from gorilla/mux to fiber 2023-07-11 22:46:49 -04:00
chart_test.go feat(storage): Support 30d badges (#836) 2024-08-11 22:40:19 -04:00
chart.go feat(storage): Support 30d badges (#836) 2024-08-11 22:40:19 -04:00
config_test.go feat(api): Migrate from gorilla/mux to fiber 2023-07-11 22:46:49 -04:00
config.go feat(api): Migrate from gorilla/mux to fiber 2023-07-11 22:46:49 -04:00
endpoint_status_test.go refactor: Break core package into multiple packages under config/endpoint (#759) 2024-05-09 22:56:16 -04:00
endpoint_status.go fix(remote): Stream endpoint statuses from remote instances instead of loading them all into memory 2024-08-26 21:30:53 -04:00
external_endpoint_test.go feat(alerting): custom alert support endpoint errors (#844) 2024-09-17 22:26:21 -04:00
external_endpoint.go feat(alerting): custom alert support endpoint errors (#844) 2024-09-17 22:26:21 -04:00
spa_test.go refactor: Break core package into multiple packages under config/endpoint (#759) 2024-05-09 22:56:16 -04:00
spa.go refactor: Clean up code and change log format (#719) 2024-04-01 21:47:14 -04:00
util_test.go feat(api): Migrate from gorilla/mux to fiber 2023-07-11 22:46:49 -04:00
util.go feat(api): Migrate from gorilla/mux to fiber 2023-07-11 22:46:49 -04:00