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

[Uptime] One click simple monitor down alert #73835

Merged
merged 113 commits into from
Aug 27, 2020

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Jul 30, 2020

Summary

Fixes: elastic/uptime#242

Looking for some feedback on functionality. Did this as part of experiment while working on anomaly alert.

Added the ability to configure simple down alert on each monitor by simple one icon.

User will be able to enable/disable alert by clicking icons.

For once they will have to define default alert connector in uptime settings.

image

image

image

User should receive alert once monitor is down like this , containing monitor info, url, observer location and latest error.

server log [14:30:22.205] [info][actions][actions][plugins] Server log: Always Down Local Port with url tcp://localhost:18278 is down from London. The latest error message: dial tcp 127.0.0.1:18278: connect: connection refused

Another addition is that all enabled alerts for a specific monitor will be displayed in expanded list, by clicking user can do to alert ui and edit those or can delete directly.

image

User will be able to add connectors from flyout in settings

image

@shahzad31 shahzad31 requested a review from justinkambic August 25, 2020 13:03
@shahzad31
Copy link
Contributor Author

@justinkambic i have removed delete action from expanded list to keep things simple.

const { actionTypeId: type } = data?.find((dt) => dt.id === value) ?? {};
return (
<EuiText size="s">
<EuiIcon type={getActionTypeIcon(type as string)} /> <span>{label}</span>
Copy link
Contributor

@mikecote mikecote Aug 26, 2020

Choose a reason for hiding this comment

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

I took a look to see if this can be done in a more dynamic way (once plugins start adding their own 3rd party action types) and I think using the actionTypeRegistry exposed by the triggers_actions_ui plugin's start contract may do the trick? Let me know!

startPlugins.triggers_actions_ui.actionTypeRegistry.get(type as string).iconClass

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, this looks good

@shahzad31 shahzad31 requested a review from mikecote August 26, 2020 13:41
Copy link
Contributor

@mikecote mikecote left a comment

Choose a reason for hiding this comment

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

Triggers actions UI changes LGTM

@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

LGTM

One thing I would mention is if you haven't run this against the flaky test runner a few times it is probably worth doing to make sure we aren't injecting any flakiness into the CI process.

@shahzad31
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
uptime 513 +6 507

async chunks size

id value diff baseline
uptime 1.6MB +73.4KB 1.6MB

page load bundle size

id value diff baseline
triggers_actions_ui 263.6KB +92.0B 263.5KB
uptime 25.1KB +93.0B 25.0KB
total +185.0B

distributable file count

id value diff baseline
total 53204 +7 53197

History

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

@shahzad31
Copy link
Contributor Author

@shahzad31 shahzad31 merged commit a358c57 into elastic:master Aug 27, 2020
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 73835 or prevent reminders by adding the backport:skip label.

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Aug 31, 2020
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create backports run node scripts/backport --pr 73835 or prevent reminders by adding the backport:skip label.

shahzad31 added a commit to shahzad31/kibana that referenced this pull request Sep 1, 2020
* WIP

* added anomaly alert

* update types

* update types

* update

* types

* types

* update ML part

* update ML part

* update ML part

* unnecessary change

* icon for disable

* update test

* update api

* update labels

* resolve conflicts

* fix types

* fix editing alert

* fix types

* added actions column

* added code to add alert

* update anomaly message

* added anomaly alert test

* update

* update type

* fix ml legacy scoped client

* update

* WIP

* fix conflict

* added aria label

* Added deleteion loading

* fix type

* update

* update tests

* update

* update type

* fix types

* WIP

* added enabled alerts section

* add data

* update

* update tests

* fix test

* update i18n

* update i18n

* update i18n

* fix

* update message

* update

* update

* update

* revert

* update types

* added component

* update test

* incorporate PR feedback

* fix focus

* update drawer

* handle edge case

* improve btn text

* improve btn text

* use switch instead of icons

* update snapshot

* use compressed form

* fix type

* update snapshot

* update snapshot

* update test

* update test

* PR feedback

* fix test and type

* remove delete action

* remove unnecessary function

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.

@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Sep 2, 2020
shahzad31 added a commit that referenced this pull request Sep 2, 2020
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@shahzad31 shahzad31 deleted the one-click-alert branch February 15, 2021 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:enhancement Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User should be able to create simple monitor down alert by single click
7 participants