Skip to content

Conversation

@PythonGermany
Copy link
Contributor

Summary

Simple addition to allow placeholders in the click link. This way it's easy to add a generic click link that links to the correct gatus endpoint details view:

alerting:
  ntfy:
    url: "http://ntfy"
    topic: "gatus-alerts"
    click: "https://${GATUS_DOMAIN}/endpoints/[ENDPOINT_KEY]"

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

@github-actions github-actions bot added the feature New feature or request label Dec 21, 2025
Comment on lines +174 to +183
func resolveEndpointPlaceholders(data string, ep *endpoint.Endpoint) string {
placeholders := map[string]string{
"[ENDPOINT_URL]": ep.URL,
"[ENDPOINT_KEY]": ep.Key(),
}
for placeholder, value := range placeholders {
data = strings.ReplaceAll(data, placeholder, value)
}
return data
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if there is a need or interest for more supported placeholders for this and other alert providers. In case there is it would probably make sense to move this out to a file that is shared by all providers and implement it in a more generic way.

This is especially the case if, like in the case of the click url. The part of the input data that is not replaced is static. It does not really make sense to search and replace the same placeholders each time an alert is sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant