Skip to content

[REQUEST]: update kibana alerting mustache page with EncodeURI and EncodeURIComponent lambdas #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
pmuellr opened this issue Mar 11, 2025 · 5 comments
Assignees
Labels
needs-team Issues pending triage by the Docs Team

Comments

@pmuellr
Copy link
Member

pmuellr commented Mar 11, 2025

Description

The file explore-analyze/alerts-cases/alerts/rule-action-variables.md needs to be updated to add secctions for the new EncodeURI and EncodeURIComponent lambdas added in PR elastic/kibana#213859 . Suggested content in the top comment of that PR.

Current releases this is planned for:

  • 8.18.1
  • 8.19.0
  • 9.0.1
  • 9.1.0

Resources

PR elastic/kibana#213859

Which documentation set does this change impact?

Elastic On-Prem and Cloud (all)

Feature differences

identical for all deployment methods

What release is this request related to?

8.18

Collaboration model

The engineering team

Point of contact.

Main contact: @pmuellr

Stakeholders:

@pmuellr
Copy link
Member Author

pmuellr commented Mar 11, 2025

PR isn't merged yet! I assume it will be :-)

I assume it's ok if devs create PRs for content like this? I'd like to give it a go, if so, but not sure of the process here. I'm going to add to our team project to track anyway.

@pmuellr
Copy link
Member Author

pmuellr commented Mar 19, 2025

Here's the suggested content:


EncodeURI

The EncodeURI lambda will evaluate the text passed by returning the value of the encodeURI() function applied to the text.

For example, when the Mustache variable context.url is https://example.com?query=foo bar (note the embedded space), the following template will render as https://example.com?query=foo%20bar:

{{#EncodeURI}}{{{context.url}}}{{/EncodeURI}}

Note that unlike most lambdas that trim whitespace, this lambda does not. If there is whitespace after {{#EncodeURI}} or before {{/EncodeURI}}, those characters will be encoded in the result.

EncodeURIComponent

The EncodeURIComponent lambda will evaluate the text passed by returning the value of the encodeURIComponent() function applied to the text.

For example, when the Mustache variable context.url is https://example.com?query=foo bar (note the embedded space), the following template will render as https%3A%2F%2Fwww.elastic.co%3Ffoo%3Dbar%26baz%3D%20qux:

{{#EncodeURIComponent}}{{{context.url}}}{{/EncodeURIComponent}}

Note that unlike most lambdas that trim whitespace, this lambda does not. If there is whitespace after {{#EncodeURI}} or before {{/EncodeURI}}, those characters will be encoded in the result.

pmuellr added a commit to elastic/kibana that referenced this issue Mar 19, 2025
…take 2 (#213859)

resolves #168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
elastic/docs-content#735
@pmuellr
Copy link
Member Author

pmuellr commented Mar 19, 2025

PR elastic/kibana#213859 merged, so changing status from Blocked to New in hopes it show up in triage :-)

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Mar 19, 2025
…take 2 (elastic#213859)

resolves elastic#168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
elastic/docs-content#735

(cherry picked from commit a3aaa04)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Mar 19, 2025
…take 2 (elastic#213859)

resolves elastic#168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
elastic/docs-content#735

(cherry picked from commit a3aaa04)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Mar 19, 2025
…take 2 (elastic#213859)

resolves elastic#168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
elastic/docs-content#735

(cherry picked from commit a3aaa04)
kibanamachine added a commit to elastic/kibana that referenced this issue Mar 19, 2025
…nent, take 2 (#213859) (#215235)

# Backport

This will backport the following commits from `main` to `9.0`:
- [[ResponseOps] mustache lambdas for EncodeURI and EncodeURIComponent,
take 2 (#213859)](#213859)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Patrick
Mueller","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-19T18:54:03Z","message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:ResponseOps","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take
2","number":213859,"url":"https://github.com/elastic/kibana/pull/213859","mergeCommit":{"message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213859","number":213859,"mergeCommit":{"message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patrick Mueller <[email protected]>
kibanamachine added a commit to elastic/kibana that referenced this issue Mar 19, 2025
…onent, take 2 (#213859) (#215233)

# Backport

This will backport the following commits from `main` to `8.18`:
- [[ResponseOps] mustache lambdas for EncodeURI and EncodeURIComponent,
take 2 (#213859)](#213859)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Patrick
Mueller","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-19T18:54:03Z","message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:ResponseOps","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take
2","number":213859,"url":"https://github.com/elastic/kibana/pull/213859","mergeCommit":{"message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213859","number":213859,"mergeCommit":{"message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patrick Mueller <[email protected]>
kibanamachine added a commit to elastic/kibana that referenced this issue Mar 19, 2025
…nent, take 2 (#213859) (#215234)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ResponseOps] mustache lambdas for EncodeURI and EncodeURIComponent,
take 2 (#213859)](#213859)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Patrick
Mueller","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-03-19T18:54:03Z","message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:ResponseOps","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1"],"title":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take
2","number":213859,"url":"https://github.com/elastic/kibana/pull/213859","mergeCommit":{"message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/213859","number":213859,"mergeCommit":{"message":"[ResponseOps]
mustache lambdas for EncodeURI and EncodeURIComponent, take 2
(#213859)\n\nresolves
https://github.com/elastic/kibana/issues/168728\n\n## Release
note\n\nAdds Mustache lambdas for alerting actions to encode URLs
with\n`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()`
and\n`encodeURIComponent()`.\n\ndoc to update, in a separate
PR:\nhttps://github.com/elastic/docs-content/issues/735","sha":"a3aaa04eba457e8d1696275c1bf6942b8e1544dd"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Patrick Mueller <[email protected]>
clintandrewhall pushed a commit to clintandrewhall/kibana that referenced this issue Mar 20, 2025
…take 2 (elastic#213859)

resolves elastic#168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
elastic/docs-content#735
JoseLuisGJ pushed a commit to JoseLuisGJ/kibana that referenced this issue Mar 24, 2025
…take 2 (elastic#213859)

resolves elastic#168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
elastic/docs-content#735
cqliu1 pushed a commit to cqliu1/kibana that referenced this issue Mar 31, 2025
…take 2 (elastic#213859)

resolves elastic#168728

## Release note

Adds Mustache lambdas for alerting actions to encode URLs with
`{{#EncodeURI}}` and `{{#EncodeURIComponent}}` using `encodeURI()` and
`encodeURIComponent()`.

doc to update, in a separate PR:
elastic/docs-content#735
@bmorelli25 bmorelli25 added the needs-team Issues pending triage by the Docs Team label Apr 17, 2025
@MakoWish
Copy link

8.18.0 has been released. Any reason these changes to the documentation have not yet been merged?

@pmuellr
Copy link
Member Author

pmuellr commented Apr 29, 2025

Any reason these changes to the documentation have not yet been merged?

There was a delay while the documentation was being reorganized, but will be picking this up soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-team Issues pending triage by the Docs Team
Projects
None yet
Development

No branches or pull requests

3 participants