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

Onboard Synthetics TLS rule type with FAAD #186551

Closed
wants to merge 14 commits into from

Conversation

doakalexi
Copy link
Contributor

@doakalexi doakalexi commented Jun 20, 2024

Resolves: #169867

This PR onboards the Synthetics TLS rule type with FAAD.

I can't get this rule to alert easily to help verify, pls let me know if there is a good way to test.

@doakalexi
Copy link
Contributor Author

/ci

@doakalexi
Copy link
Contributor Author

/ci

@doakalexi doakalexi changed the title Update TLS rule to use faad Onboard Synthetics TLS rule type with FAAD Jun 20, 2024
@doakalexi doakalexi added the ci:cloud-deploy Create or update a Cloud deployment label Jun 21, 2024
@doakalexi
Copy link
Contributor Author

/ci

@doakalexi
Copy link
Contributor Author

/ci

@doakalexi doakalexi requested a review from a team July 1, 2024 18:38
@doakalexi doakalexi marked this pull request as ready for review July 1, 2024 18:38
@doakalexi doakalexi requested a review from a team as a code owner July 1, 2024 18:38
@doakalexi doakalexi requested review from ymao1 and adcoelho July 1, 2024 18:39
@doakalexi doakalexi added the Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) label Jul 1, 2024
@elasticmachine
Copy link
Contributor

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

@doakalexi doakalexi added release_note:skip Skip the PR/issue when compiling release notes v8.15.0 labels Jul 1, 2024
@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team labels Jul 1, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services)

spaceId,
indexedStartedAt,
alertsLocator,
basePath.publicBaseUrl
),
...updateState(ruleState, foundCerts),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ymao1 is the correct place for this?

Copy link
Member

Choose a reason for hiding this comment

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

I assume Ying has more knowledge here, but this doesn't seem quite right, especially since we're calling it again in the return of the executor. And it doesn't look these fields were in the context before.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea, I think you want to set the state during the initial reporting of the alert:

const { uuid, start } = alertsClient.report({
  id: alertId,
  actionGroup: TLS_CERTIFICATE.id,
  state: { ...updateState(ruleState, foundCerts), ...summary },
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay thanks! I thought it was weird but wanted to make sure 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Resolved in this commit 1068617

@kibana-ci
Copy link
Collaborator

kibana-ci commented Jul 1, 2024

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

References to deprecated APIs

id before after diff
synthetics 22 20 -2

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@pmuellr pmuellr left a comment

Choose a reason for hiding this comment

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

code LGTM, but left a question about the ...updateState(ruleState, foundCerts), in setting the alert context variables.

spaceId,
indexedStartedAt,
alertsLocator,
basePath.publicBaseUrl
),
...updateState(ruleState, foundCerts),
Copy link
Member

Choose a reason for hiding this comment

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

I assume Ying has more knowledge here, but this doesn't seem quite right, especially since we're calling it again in the return of the executor. And it doesn't look these fields were in the context before.

@ymao1
Copy link
Contributor

ymao1 commented Jul 3, 2024

@MiriamAparicio Were you able to generate active alerts and then recover & verify that the alert documents contain the expected information?

@MiriamAparicio
Copy link
Contributor

MiriamAparicio commented Jul 4, 2024

hi @ymao1,
I just reviewed the code, I saw the comment to manually test it, I would take a look

@doakalexi doakalexi requested a review from a team as a code owner July 10, 2024 15:35
@botelastic botelastic bot added the Team:obs-ux-management Observability Management User Experience Team label Jul 12, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

Testing in serverless, I don't see any fields presents for the alert

Screenshot 2024-07-12 at 4 29 26 PM

Feel free to sync with me on testing

@elasticmachine
Copy link
Contributor

elasticmachine commented Jul 15, 2024

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

References to deprecated APIs

id before after diff
synthetics 22 20 -2

History

@doakalexi doakalexi closed this Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review ci:cloud-deploy Create or update a Cloud deployment ci:project-deploy-observability Create an Observability project release_note:skip Skip the PR/issue when compiling release notes Team:obs-ux-infra_services Observability Infrastructure & Services User Experience Team Team:obs-ux-management Observability Management User Experience Team Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Progress remaining O11y rule types to FAAD
8 participants