Graylog2 / Graylog2/graylog2-server

Provide full/consistent JMTE template model everywhere templating is used

Open
#24,798 0 comments 1 reaction 0 assignees View on GitHub
bug triaged
Dominant language
Java
Stars
8.1k
Forks
1.1k
Avg merge
1d 20h
Merged PRs (30d)
217

Description

## Expected Behavior

There are several places in the application that support JMTE templating, however the available template model field values available differ between them.

## Current Behavior

Specific example is that Slack and Email Notifications have `${http_external_uri}` available, but custom HTTP notifications do not.

## Possible Solution

We should assess where all we allow templating and switch them to use https://github.com/Graylog2/graylog2-server/blob/f32b0324bcef236fd971c55b0e862279f1586a1c/graylog2-server/src/main/java/org/graylog/events/notifications/TemplateModelProvider.java where appropriate.

## Steps to Reproduce (for bugs)

1. Create an email notification using `${http_external_uri}`
2. See that it works
3. Create custom HTTP notification using `${http_external_uri}`
4. See that it doesn't work

## Context

See slack thread: https://graylog.slack.com/archives/C036LC4K744/p1769034139348449

## Your Environment

* Graylog Version: 7.1
* Java Version:
* OpenSearch Version:
* MongoDB Version:
* Operating System:
* Browser version:

## Checklist
[] This issue fix need to be backported.
[] Does this issue have **security** implications?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.