* introduces TwiN/logr library
* use new features of logr library
* minor tweaks and formatting
* Apply suggestions from code review
---------
Co-authored-by: TwiN <twin@linux.com>
* POC Teams Workflow Alerting
Signed-off-by: James Hillyard <james.hillyard@payara.fish>
* Document Teams Workflow Alert
Signed-off-by: James Hillyard <james.hillyard@payara.fish>
* Rename 'teamsworkflow' to 'teams-workflows'
Signed-off-by: James Hillyard <james.hillyard@payara.fish>
* Fix README Table Format
Signed-off-by: James Hillyard <james.hillyard@payara.fish>
* Fix Test to Expect Correct Emoji
Signed-off-by: James Hillyard <james.hillyard@payara.fish>
---------
Signed-off-by: James Hillyard <james.hillyard@payara.fish>
Co-authored-by: TwiN <twin@linux.com>
* feat(alerting): add optional email to ntfy provider
https://docs.ntfy.sh/publish/#e-mail-notifications
* feat(alerting): add optional click action to ntfy provider
https://docs.ntfy.sh/publish/#click-action
* feat(alerting): add option to disable firebase in ntfy provider
https://docs.ntfy.sh/publish/#disable-firebase
* feat(alerting): add option to disable message caching in ntfy provider
https://docs.ntfy.sh/publish/#message-caching
* test(alerting): add buildRequestBody tests for email and click properties
* test(alerting): add tests for Send to verify request headers
* feat(alerting): refactor to prefix firebase & cache with "disable"
This avoids the need for a pointer, as omitting these bools in the config defaults to false
and omitting to set these headers will use the server's default - which is enabled on ntfy.sh
* 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>
* feat: implement Gitea alerting provider integration
- Add TypeGitea for the gitea alerting provider
- Introduce a new file for the gitea alerting provider implementation
- Implement the AlertProvider struct with necessary fields for gitea integration
- Add validation logic for the AlertProvider configuration
- Create tests for the AlertProvider's validation and sending functionality
- Update go.mod to include the gitea SDK as a dependency
- Modify the alerting configuration validation to recognize TypeGitea
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* chore: integrate Gitea alerting provider configuration
- Add Gitea alerting provider import to the configuration file
- Update the comment for the RepositoryURL field to reflect Gitea instead of GitHub
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* feat: add Assignees support to AlertProvider functionality
- Add a field for Assignees to the AlertProvider struct
- Update the Send function to include Assignees in the alert payload
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* feat: implement Gitea alerting configuration and documentation
- Add a new image asset for Gitea alerts
- Update the README to include configuration details for Gitea alerts
- Introduce parameters for Gitea alerting, including repository URL and personal access token
- Document the behavior of the Gitea alerting provider regarding issue creation and resolution
- Include an example YAML configuration for Gitea alerts
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Update README.md
Co-authored-by: TwiN <twin@linux.com>
* Update README.md
Co-authored-by: TwiN <twin@linux.com>
* Update README.md
Co-authored-by: TwiN <twin@linux.com>
* feat: refactor AlertProvider for improved client configuration
- Add import for the Gatus client library
- Remove the SkipVerify field from the AlertProvider struct
- Introduce ClientConfig field in the AlertProvider struct for client configuration
- Update validation logic to check for ClientConfig instead of SkipVerify
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Update README.md
Co-authored-by: TwiN <twin@linux.com>
* chore: update configuration for Gitea integration
- Change references from GitHub to Gitea in the configuration section
- Update alerting provider descriptions to reflect the correct platform
- Swap the order of GitHub and Gitea configurations
- Replace Gitea alert image with GitHub alert image
- Adjust the type field from gitea to github in the relevant sections
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* fix: ensure ClientConfig is validated and defaults set
- Add a check for nil ClientConfig in the IsValid function
- Set ClientConfig to a default configuration if it is nil
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: TwiN <twin@linux.com>
* feat(storage): Add support for 30d uptime badge
Fix#714
* Fix typo
* Fix test
* Fix typo
* Improve implementation
* Add check in existing test
* Add extra test to ensure functionality works
* Add support for 30d response time chart too
* feat(alerting): add timezone for maintenance
* Update config/maintenance/maintenance.go
* docs: Add example of maintenance.timezone in readme.md
* fix: Only set time to timezone location if the location is set
* fix: Include the original error in the message
---------
Co-authored-by: TwiN <twin@linux.com>
* refactor: Partially break core package into dns, result and ssh packages
* refactor: Move core package to config/endpoint
* refactor: Fix warning about overlapping imported package name with endpoint variable
* refactor: Rename EndpointStatus to Status
* refactor: Merge result pkg back into endpoint pkg, because it makes more sense
* refactor: Rename parameter r to result in Condition.evaluate
* refactor: Rename parameter r to result
* refactor: Revert accidental change to endpoint.TypeDNS
* refactor: Rename parameter r to result
* refactor: Merge util package into endpoint package
* refactor: Rename parameter r to result