Skip to content
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

[ResponseOps] examples in docs referencing deprecated context variables #160760

Closed
pmuellr opened this issue Jun 28, 2023 · 6 comments
Closed

[ResponseOps] examples in docs referencing deprecated context variables #160760

pmuellr opened this issue Jun 28, 2023 · 6 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience docs Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@pmuellr
Copy link
Member

pmuellr commented Jun 28, 2023

A customer noted that some of the examples in our docs use deprecated context variables. Actually, these aren't even documented - I think we deprecated in 7.x and then removed the doc in 8.x or something. We actually do still set the variables, for existing old rules, but would like customers to use the documented ones.

The examples noted were using {{alertName}}, but should be using {{rule.name}}:

We should check other docs that include action parameter templates for other deprecated/not-documented variables.

@pmuellr pmuellr added bug Fixes for quality problems that affect the customer experience Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) docs labels Jun 28, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@pmuellr
Copy link
Member Author

pmuellr commented Jun 28, 2023

cc: @lcawl

@lcawl lcawl self-assigned this Jun 28, 2023
@doakalexi doakalexi moved this from Awaiting Triage to Todo in AppEx: ResponseOps - Execution & Connectors Jun 29, 2023
@lcawl
Copy link
Contributor

lcawl commented Jun 30, 2023

Relates to elastic/security-docs#3498, #161126

@lcawl
Copy link
Contributor

lcawl commented Jun 30, 2023

The following pages require updates:

Screenshots will likely also be affected in pages like these (after #161136 is merged):

If the deprecated variables are removed from the preconfigured index connector, the screenshot on this page will be affected:

@pmuellr
Copy link
Member Author

pmuellr commented Jul 3, 2023

Ya, looks like most of these are using {{alertName}} which should be replaced with {{rule.name}}.

There are also a few references in actual code, but seems like mainly tests, for example:

describe('Metrics Inventory Threshold rule', () => {
test('Migrates incorrect action group spelling', () => {
const migration800 = SavedObjectsUtils.getMigrationFunction(
getMigrations(encryptedSavedObjectsSetup, {}, isPreconfigured)['8.0.0']
);
const actions = [
{
group: 'metrics.invenotry_threshold.fired',
params: {
level: 'info',
message:
'""{{alertName}} - {{context.group}} is in a state of {{context.alertState}} Reason: {{context.reason}}""',
},
actionRef: 'action_0',
actionTypeId: '.server-log',
},
];

Feels like we should remove them everywhere, except where we are setting and testing for the valid uses (since we will likely always have to support these), so keep the surface area smaller, in hopes they don't get copied around more.

@lcawl
Copy link
Contributor

lcawl commented Jul 11, 2023

I've also created #161710, since I was investigating adding rule.params to https://www.elastic.co/guide/en/kibana/master/rule-action-variables.html and noticed some were missing descriptions in the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience docs Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
No open projects
Development

No branches or pull requests

3 participants