paultanay opened a new issue, #4349: URL: https://github.com/apache/hertzbeat/issues/4349
### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior ### Describe the bug `AlerterProperties.java` defines the fallback default Gotify webhook URL as: ```java private String gotifyWebhookUrl = "https://push.example.de/message?token="; ``` But `GotifyAlertNotifyHandlerImpl` formats this value with the receiver token: ```java String webHookUrl = String.format(alerterProperties.getGotifyWebhookUrl(), receiver.getGotifyToken()); ``` Because the fallback default does not contain a `%s` placeholder, `String.format()` ignores `receiver.getGotifyToken()`. If this Java fallback value is used, the generated URL becomes: ```text https://push.example.de/message?token= ``` instead of including the Gotify token. The configured value in `application.yml` already uses the expected format: ```yaml gotify-webhook-url: http://127.0.0.1/message?token=%s ``` So the Java fallback default should be consistent with the configured default. ### Expected Behavior The fallback default should include the token placeholder: ```java private String gotifyWebhookUrl = "https://push.example.de/message?token=%s"; ``` ### Steps To Reproduce _No response_ ### Environment ```markdown HertzBeat master branch / 2.0-SNAPSHOT. ``` ### Debug logs _No response_ ### Anything else? _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
