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

Add enhanced alerting details to host monitoring docs #3879

Merged
merged 5 commits into from
May 20, 2024

Conversation

dedemorton
Copy link
Contributor

@dedemorton dedemorton commented May 10, 2024

Closes #3747 and #3627.

  • Newbie question: It's possible I don't understand this feature fully, but it seems like users need to group by hostname when they create the alert, or the alert will not appear in the Hosts view. Is this correct? If so, I think we should mention that somewhere. Since this setting is optional, users might not realize it's required if they want to view alerts for specific hosts. WDYT? Am I missing something here?

    image

TODO (after merging):

@dedemorton dedemorton self-assigned this May 10, 2024
@dedemorton dedemorton requested a review from a team as a code owner May 10, 2024 22:18
Copy link
Contributor

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

Copy link
Contributor

mergify bot commented May 10, 2024

This pull request does not have a backport label. Could you fix it @dedemorton? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-/d./d is the label to automatically backport to the /d./d branch. /d is the digit
    NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label May 10, 2024
@dedemorton dedemorton requested a review from a team May 10, 2024 22:36
@dedemorton dedemorton added the backport-8.14 Automated backport with mergify label May 10, 2024
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label May 10, 2024
@dedemorton dedemorton requested review from roshan-elastic and crespocarlos and removed request for a team May 10, 2024 22:38
@dedemorton
Copy link
Contributor Author

@roshan-elastic @crespocarlos Can you take a look when you have a chance and respond to my question here? Thanks! (Sorry didn't mean to add your names to the related issue. Just got my browser tabs messed up.)

@roshan-elastic
Copy link
Contributor

Hey @dedemorton

Closes #3747 and #3627.

Newbie question: It's possible I don't understand this feature fully, but it seems like users need to group by hostname when they create the alert, or the alert will not appear in the Hosts view. Is this correct? If so, I think we should mention that somewhere. Since this setting is optional, users might not realize it's required if they want to view alerts for specific hosts. WDYT? Am I missing something here?

image

TODO (after merging):

  • Port to serverless docs.

Yeah, that's right. There are pretty much two ways for alerts to show up against hosts:

(1) They use the 'Inventory' rule and select the 'Host'

image

(2) If they use a rule which is possible to 'group by' host.name then it should show as well

e.g. metric threshold rules, custom threshold rules [beta]

Sample Metrics Threshold Rule
screenshot

Sample Custom Threshold Rule
screenshot

However, let me double-check with the engineers on this.

@crespocarlos (cc @jennypavlova) - When I test the custom threshold and metric threshold rules:

  1. Metric Threshold doesn't appear to fire at all (so not sure if this will show as an alert in the host view)
  2. The custom threshold rule fires but doesn't show in the host view...is this because we only show 'inventory' and 'metric threshold' rules?

Example Host

Only one alert showing in the host view
image

Here are the alerts set up:

See alert rules


image

Question

  • Are you able to confirm the logic on which alerts show against a host (and how we determine that)?

@crespocarlos
Copy link

Hey @roshan-elastic

  • Metric Threshold doesn't appear to fire at all (so not sure if this will show as an alert in the host view)

It was using host.cpu.pct field, which has no value. Was this intentional?

image

After adjusting it to use system.cpu.system.norm.pct field, the alert fired and appeared in the hosts view.
image

  • The custom threshold rule fires but doesn't show in the host view...is this because we only show 'inventory' and 'metric threshold' rules?

Yeah. We might need to adjust something in the custom threshold executor for it to show up in the alerts table. The actionable observability owns that, but I guess we can submit a PR.

Copy link
Contributor

mergify bot commented May 13, 2024

This pull request is now in conflict. Could you fix it @dedemorton? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b issue#3747 upstream/issue#3747
git merge upstream/main
git push upstream issue#3747

@dedemorton
Copy link
Contributor Author

We might need to adjust something in the custom threshold executor for it to show up in the alerts table.

@crespocarlos Is there something I can say in the docs to help users? Maybe something like, "To see alerts on the Hosts page, the rule triggering the alert must either select hosts in a condition or be configured to group by hostname." Is this statement correct?

@crespocarlos
Copy link

Hi @dedemorton , regarding Custom Threshold it's something we need to fix in the code first, but it will work the same way as Metrics Threshold.

The conditions for users to see alerts in the Hosts view are - Similar to what you wrote, but it might help to specify what needs to be done depending on the rule type?

Metrics Threshold - When creating the alert, inform host.name on the group by field
Custom Threshold - When creating the alert, inform host.name on the group by field (When fixed)
Inventory - Select Host in Condition

@dedemorton
Copy link
Contributor Author

@roshan-elastic @crespocarlos I've updated the documentation. Can you confirm my changes and approve the topic if you think it's ready to merge? Thanks!

@roshan-elastic
Copy link
Contributor

It was using host.cpu.pct field, which has no value. Was this intentional?

@crespocarlos - 🤦 thanks! Even I can't use ECS haha

@dedemorton
Copy link
Contributor Author

@roshan-elastic Is this PR ready to merge? I still need SME approval. Thanks!

Copy link
Contributor

@roshan-elastic roshan-elastic left a comment

Choose a reason for hiding this comment

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

Sorry @dedemorton - completely missed this.

Might be too late for this version but approving for whenever it can go in

@dedemorton dedemorton merged commit 625d303 into elastic:main May 20, 2024
3 checks passed
@dedemorton dedemorton deleted the issue#3747 branch May 20, 2024 16:29
mergify bot pushed a commit that referenced this pull request May 20, 2024
* Add enhanced alerting details to host monitoring docs

* Clarify config required to show alerts on Hosts page

* Change the note to an informational box

* Fix sentence

(cherry picked from commit 625d303)
dedemorton added a commit that referenced this pull request May 20, 2024
* Add enhanced alerting details to host monitoring docs

* Clarify config required to show alerts on Hosts page

* Change the note to an informational box

* Fix sentence

(cherry picked from commit 625d303)

Co-authored-by: DeDe Morton <dede.morton@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.14 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Request]: Enhanced Alerting in Hosts
4 participants