-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Uptime] TLS alerting #63913
[Uptime] TLS alerting #63913
Conversation
Pinging @elastic/uptime (Team:uptime) |
a01a84e
to
0729fbe
Compare
0729fbe
to
5870a59
Compare
One functional thing I immediately noticed. The design spec calls for a new alerts drop down menu on the certificates page. In this PR the alert creation action is added to the overview page. |
Running with the demo monitor list and a server log action I get the following error:
|
This was a defect I injected while implementing other feedback, will notify when I push the fix. |
`); | ||
}); | ||
|
||
it('handles negative diff values appropriately for aging certs', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice test for completeness
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@andrewvc might want to have another look to verify you're alright with the changes in d1b414a and 86add5b. Essentially these allow the alert flyout toggle dropdown to handle a list of alert types. If there is |
x-pack/plugins/uptime/public/components/overview/alerts/translations.ts
Outdated
Show resolved
Hide resolved
> | ||
<FormattedMessage | ||
id="xpack.uptime.alerts.tls.settingsPageNav.text" | ||
defaultMessage="You can edit these thresholds on the {settingsPageLink}." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be less verbose?
instead of saying 'You can edit these thresholds on the settings page.'
You can edit this threshold in Settings.
though i am not a native english speaker
so you probably know better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The copy comes from the spec, so I think we can just leave it for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, left few suggestions.
As far user experience goes, i know there is some technical limitation as to check if user is creating duplicate alerts.
Even if we can't enforce it, we should somehow let user know to make sure, to check if they have already created an alert or something.
It probably requires design. Otherwise Looks good.
@shahzad31 yes, that's probably in the second iteration WRT ensuring there aren't dupe alerts. Currently this is a limitation of alerting, so it's better to give people the option. |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Refactor settings form event handling and modify certs fields. * Fix/improve broken types/unit/integration/api tests. * Modify default expiration threshold. * Rename test vars. * Implement PR feedback. * Refresh snapshots, fix broken tests/types. * Remove unnecessary state spreading. * Add type for settings field errors. * Refresh test snapshots. * Improve punctuation. * Add TLS alert type. * Add cert API request and runtime type checking. * Add api test for cert api. * Add unload command to certs test. * Extract API params interface to io-ts type. * Add TLS alert type on server. * WIP - add state for changing selected alert type. * Finish adding alert type for client, add server alert summary. * Add some state variables. * Update certs summary function to create required values. * Refresh test snapshots. * Clean up message generator function. * Add a comment. * Update formatting for alert messages, add flags denoting presence of age/expiration data. * Add relative date information to tls alert messages. * Clean up more logic in certs request function. * Fix broken unit tests. * Move tests for common function to new file. * Fix logic error in test and add common state fields to tls alerts. * Extract common state field translations from status check alert. * Add a comment. * Add nested context navigation for uptime alert selection. * Clean up types. * Fix translation key typo. * Extract translations from tls alert factory. * Extract summary messages to translation file. * Change default tls alert time window from 1w to 1d. * Remove unnecessary import. * Simplify page linking. * Extract a non-trivial component to a dedicated file. * Simplify create alert copy. * Fix broken functional test. * Fix busted types. * Fix tls query error. * Allow for alerts toggle button to receive a set of types to display. * Add alerts toggle button to certs page. * Fix copy. * Fixup punctuation in default message to avoid double-period symbols. * Refresh snapshots.
* Refactor settings form event handling and modify certs fields. * Fix/improve broken types/unit/integration/api tests. * Modify default expiration threshold. * Rename test vars. * Implement PR feedback. * Refresh snapshots, fix broken tests/types. * Remove unnecessary state spreading. * Add type for settings field errors. * Refresh test snapshots. * Improve punctuation. * Add TLS alert type. * Add cert API request and runtime type checking. * Add api test for cert api. * Add unload command to certs test. * Extract API params interface to io-ts type. * Add TLS alert type on server. * WIP - add state for changing selected alert type. * Finish adding alert type for client, add server alert summary. * Add some state variables. * Update certs summary function to create required values. * Refresh test snapshots. * Clean up message generator function. * Add a comment. * Update formatting for alert messages, add flags denoting presence of age/expiration data. * Add relative date information to tls alert messages. * Clean up more logic in certs request function. * Fix broken unit tests. * Move tests for common function to new file. * Fix logic error in test and add common state fields to tls alerts. * Extract common state field translations from status check alert. * Add a comment. * Add nested context navigation for uptime alert selection. * Clean up types. * Fix translation key typo. * Extract translations from tls alert factory. * Extract summary messages to translation file. * Change default tls alert time window from 1w to 1d. * Remove unnecessary import. * Simplify page linking. * Extract a non-trivial component to a dedicated file. * Simplify create alert copy. * Fix broken functional test. * Fix busted types. * Fix tls query error. * Allow for alerts toggle button to receive a set of types to display. * Add alerts toggle button to certs page. * Fix copy. * Fixup punctuation in default message to avoid double-period symbols. * Refresh snapshots.
Summary
The goal here is to create simple alerts that allow users to monitor their TLS certificate status, and alert them when any of the certs they maintain are either close to expiring or have lived beyond a certain age threshold.
Resolves elastic/uptime#162.
WIP, creating TLS alerts for UptimeTesting this PR
Checklist
Delete any items that are not applicable to this PR.
For maintainers