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
api.go
badge_test.go
badge.go
cache.go
chart_test.go
chart.go
config_test.go
config.go
endpoint_status_test.go
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
spa.go
util_test.go
util.go