Commit Graph

173 Commits

Author SHA1 Message Date
Bo-Yi Wu
7de5a1fe48
feat(alerting): implement Gitea alerting provider (#842)
* 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>
2024-08-21 17:51:45 -04:00
lefes
af00dfdb73
feat(alerting): add timezone for maintenance (#653)
* 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>
2024-07-01 19:41:33 -04:00
TwiN
11aeec45c9
chore(deps): Update Go to 1.22 and update all Go dependencies (#794)
* fix: Print the right variable when logging used config path on start

* chore(deps): Update Go to 1.22 and update all Go dependencies
2024-06-08 12:39:26 -04:00
TwiN
fdd00e7851 fix(alerting): Remove duplicate code and improve testing
Related to #768
2024-05-19 18:31:01 -04:00
TwiN
f2c5f5911c
feat(alerting): Persist triggered alerts across application restart (#764)
* feat(alerting): Persist triggered alerts across application restart

Fixes #679

* test(alerting): Add numerous tests related to alerts
2024-05-15 21:29:45 -04:00
TwiN
9d151fcdb4
refactor: Break core package into multiple packages under config/endpoint (#759)
* 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
2024-05-09 22:56:16 -04:00
TwiN
76a84031c2 refactor: Update connectivity.Checker struct to use pointer on receiver 2024-04-18 21:08:43 -04:00
TwiN
f54c45e20e
feat: Implement push-based external endpoints (#724)
* refactor: Move SSH outside of endpoint.go
* refactor: Use pointers for Alert receivers
* feat: Implement push-based external endpoints
* Fix failing tests
* Validate external endpoints on start
* Add tests for external endpoints
* refactor some error equality checks
* Improve docs and refactor some code
* Fix UI-related issues with external endpoints
2024-04-08 21:00:40 -04:00
TwiN
922638e071
refactor: Clean up code and change log format (#719) 2024-04-01 21:47:14 -04:00
michael-baraboo
ae750aa367
feat(alerting): add alerting support for jetbrains space (#713)
* add alerting support for jetbrains space

* readme fixes

* add jetbrainsspace to provider interface compilation check

* add jetbrainsspace to a couple more tests
2024-03-28 18:36:22 -04:00
TwiN
2a623a59d3
fix(web): Allow configuration of read-buffer-size (#675)
This fixes the `431 Request Header Fields Too Large` error

By default, the read-buffer-size is 8192, up from fiber's default of 4096.

Fixes #674

Fixes #636

Supersedes #637

Supersedes #663
2024-02-07 18:54:30 -05:00
Bugra Kocabay
c6515c4b1c
feat(alerting): Add gotify provider (#605)
* feat(alerting): add gotify provider feature

* feat(alerting): update alert message

* feat(test): add tests for gotify provider

* feat(docs): add documentation for gotify provider

* feat(alerting): rename apptoken to token

* feat(docs): update docs for apptoken renaming to token

---------

Co-authored-by: Bugra Kocabay <kocabay.bugra@gmail.com>
Co-authored-by: TwiN <twin@linux.com>
2023-11-03 18:21:52 -04:00
Kevin Richter
802ad7ff8f
feat(alerting): Add AWS SES Alerting Provider (#579)
* Add SES Provider

* Formatting

* Rename ses to aws-ses

* Typo

* Parse tag instead of type name

* Use aws.slice to convert string array & rename awsses -> aws-ses

* Rename type

* Update README.md

* Update alerting/config.go

* Rename package aws-ses to awsses

* Update README.md

* PR comments

---------

Co-authored-by: TwiN <twin@linux.com>
2023-10-25 23:52:43 -04:00
TwiN
fd17dcd204
fix(tls): Pass certificate and private key files to listener method (#531)
Fixes #530
2023-07-20 19:02:34 -04:00
TwiN
6bb65f4eec feat(api): Migrate from gorilla/mux to fiber
Fixes #468
2023-07-11 22:46:49 -04:00
Hugues Lismonde
7e163c3fcf
feat(alerting): Add GitLab alerting provider (#485)
* feat:  add gitlab provider

* docs: 📝 add documentation for gitlab provider

* docs: 📝 fix removed github screenshot

* refactor:  remove uniuri dependency

* refactor: 🎨 correctly capitalize GitLab

* Update alerting/alert/type.go

* fix: 💡 correct comments about webhook url and authorization key

* Update alerting/provider/gitlab/gitlab.go

* Update alerting/provider/gitlab/gitlab_test.go

---------

Co-authored-by: TwiN <twin@linux.com>
2023-05-30 21:57:15 -04:00
Sergey Khokhlov
c3e1835dd6
fix(alerting): Unable to set maintenance interval to all day (#475) 2023-05-17 18:45:18 -04:00
TwiN
447e140479
feat(connectivity): Allow internet connection validation prior to endpoint execution (#461) 2023-05-02 22:41:22 -04:00
TwiN
83edca6e80
refactor: Modify implementation of TLS (#457)
* refactor: Don't generate certificates programmatically

* build: Add testdata folder to .dockerignore
2023-04-22 15:22:09 -04:00
Christian Krudewig
a05daeda2e
feat(web): Support TLS encryption (#322)
* Basic setup to serve HTTPS

* Correctly handle the case of missing TLS configs

* Documenting TLS

* Refactor TLS configuration setup

* Add TLS Encryption section again to README

* Extending TOC in README

* Moving TLS settings to subsection of web settings

* Adding tests for config/web

* Add test for handling TLS

* Rename some variables as suggested

* Corrected error formatting

* Update test module import

* Polishing the readme file

* Error handling for TLSConfig()

---------

Co-authored-by: TwiN <twin@linux.com>
2023-04-22 12:12:56 -04:00
TwiN
7d6923730e
fix(config): Support $$ in config for literal $ (#427) 2023-02-11 22:43:13 -05:00
Kevin Woblick
21f62f362f
feat(alerting): Add Pushover provider (#405)
* Add a new Pushover provider (#129)
- Adds new provider named Pushover with corresponding tests
- Adds Pushover as a provider to the configuration and adjusts test accordingly
- Adds Pushover to alerting_test.go, provider.go and type.go
- Updates the readme with configuration details

* Correct import order

* Fix some missing pushover references

* Apply suggestions from code review

* Rename application-key to application-token for Pushover

---------

Co-authored-by: TwiN <twin@linux.com>
2023-01-29 17:32:16 -05:00
TwiN
78dccc90e1 fix(#400): Use proper configuration path when iterating over options 2023-01-10 00:24:56 -05:00
TwiN
3059e3e028
feat: Support multiple configuration files (#396)
* Revert "Revert "feat: Support multiple configuration files" (#395)"

This reverts commit 87740e74a6.

* feat: Properly implement support for config directory
2023-01-08 17:53:37 -05:00
TwiN
87740e74a6
Revert "feat: Support multiple configuration files" (#395)
Revert "feat: Support multiple configuration files (#389)"

This reverts commit 8e14302765.
2023-01-07 03:45:43 -05:00
Henning Janßen
8e14302765
feat: Support multiple configuration files (#389)
* Allow configuration to be distributed

* catch iteration errors when collecting config files

* rm unused func

* Fix suffix check for config loading

* test configuration loading

* GATUS_CONFIG_PATH can be a file or a directory now

* Add deprecation note

* Fix cs

Co-authored-by: TwiN <twin@linux.com>

* cs fixes

Co-authored-by: TwiN <twin@linux.com>

* cs fixes

Co-authored-by: TwiN <twin@linux.com>

* cs fixes

Co-authored-by: TwiN <twin@linux.com>

* cs + rm useless line

Co-authored-by: TwiN <twin@linux.com>

* Update config/config.go

Co-authored-by: TwiN <twin@linux.com>
2023-01-06 23:46:19 -05:00
TwiN
ecc0636a59 feat(alerting): Implement GitHub alerting provider 2022-12-15 23:38:44 -05:00
TwiN
dfcea93080 fix(alerting): Use reflection to set invalid providers to nil instead of re-validating on every alert trigger/resolve 2022-12-15 21:37:34 -05:00
TwiN
f6a621da28 chore: Bump module version to v5 2022-12-06 01:41:18 -05:00
TwiN
741109f25d
chore!: Remove deprecated "services" in favor of "endpoints" (#381)
BREAKING CHANGE: `services` has been replaced by `endpoints` in v3.3.0, but backward compatibility has been retained until now. v5.0.0, however, will no longer support `services`, so make sure to update your configuration to use `endpoints` instead.

See #374 for more information
2022-12-06 01:27:31 -05:00
TwiN
d058d7a54b
fix!: Default Alert.Enabled to true (#380)
BREAKING CHANGE: It used to default to false, which meant that users had to explicitly set endpoints[].alerts[].enabled to true
2022-12-05 23:15:19 -05:00
TwiN
64f4dac705 fix: Wrap error properly (%s -> %w) 2022-11-12 14:56:25 -05:00
David Wheatley
22d74a5ea8
feat(ui): Allow configuring meta description (#342)
* feat: add description prop to HTML template

* feat: add desc property to backend config validation

* test: add desc field to ui config test

* chore: add default description text

* test: add test for description default

* docs: add description config option explanation

* Update README.md

* Update config/ui/ui_test.go

Co-authored-by: TwiN <twin@linux.com>
2022-11-01 00:33:19 -04:00
David Wheatley
e5a94979dd
fix: add Google Chat to list of alert types when determining valid providers (#341) 2022-10-15 17:56:38 -04:00
TwiN
00b56ecefd
feat: Bundle assets in binary using go:embed (#340)
Fixes #47
2022-10-09 21:33:31 -04:00
TwiN
35038a63c4 feat(alerting): Implement ntfy provider
Closes #308

Work remaining:
- Add the documentation on the README.md
- Test it with an actual Ntfy instance (I've only used https://ntfy.sh/docs/examples/#gatus as a reference; I haven't actually tested it yet)
2022-10-09 16:45:01 -04:00
TwiN
33ce0e99b5 chore: Fix typo in deprecation message 2022-09-15 17:41:24 -04:00
TwiN
52d7cb6f04 ux: Improve endpoint validation by checking type on start 2022-09-01 21:12:29 -04:00
TwiN
5c6bf84106 ux: Improve error message when endpoint is invalid 2022-09-01 21:12:29 -04:00
TwiN
df719958cf chore(remote): Log message about feature being a candidate for removal 2022-08-23 21:38:50 -04:00
Jesibu
1bce4e727e
feat(api): Configurable response time badge thresholds (#309)
* recreated all changes for setting thresholds on Uptime Badges

* Suggestion accepted: Update core/ui/ui.go

Co-authored-by: TwiN <twin@linux.com>

* Suggestion accepted: Update core/ui/ui.go

Co-authored-by: TwiN <twin@linux.com>

* implemented final suggestions by Twin

* Update controller/handler/badge.go

* Update README.md

* test: added the suggestons to set the UiConfig at another line

Co-authored-by: TwiN <twin@linux.com>
2022-08-10 21:05:34 -04:00
TwiN
1aa94a3365 feat(remote): Implement lazy distributed feature (#64)
THIS IS AN EXPERIMENTAL FEATURE/IMPLEMENTATION, AND IT MAY BE REMOVED IN THE FUTURE.

Note that for now, it will be an undocumented feature.
2022-07-28 20:29:29 -04:00
Kalissaac
755c8bb43a fix(alerting): Alphabetically sort Matrix provider 2022-07-20 19:00:12 -04:00
Kalissaac
37f3f964ea feat(alerts): Add Matrix alert provider 2022-07-20 19:00:12 -04:00
TwiN
ab2bee9c4b chore!: Update module from v3 to v4 2022-06-20 21:25:14 -04:00
TwiN
c873b0ba0c feat(security)!: Remove deprecated SHA512 parameter for password hashing 2022-06-14 23:48:28 -04:00
TwiN
0792f5490b feat(storage)!: Remove persistence for memory storage 2022-06-14 23:36:18 -04:00
TwiN
fbdb5a3f0f test(maintenance): Add tests for edge cases 2022-05-07 16:46:51 -04:00
TwiN
9ede992e4e feat(ui): Add support for buttons below header (#106) 2022-04-25 20:20:32 -04:00
TwiN
932ecc436a test(security): Replace password-sha512 by password-bcrypt-base64 for test case 2022-01-17 11:55:05 -05:00