Skip to content

[synthetics] Add lightweight monitor configuration options #2729

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

Merged
merged 11 commits into from
Apr 3, 2023

Conversation

colleenmcginnis
Copy link
Contributor

@colleenmcginnis colleenmcginnis commented Mar 7, 2023

Closes #2372

Approach

This is still a work in progress, but here's the plan:

Open questions

In the original issue, @andrewvc mentioned:

If you're using a project based lightweight monitor it doesn't make sense to have to go to the heartbeat docs, ideally you don't even know what heartbeat is.

How far do we want to take this? Do we not want to link back to any Heartbeat-related docs? If so, we would need to also copy (or single-source) content that is linked to from these reference pages. For example, if processors is a supported config option, users would probably need to know how processors can be defined.

Feel free to tag in others to provide feedback!

@colleenmcginnis colleenmcginnis added Area:Synthetics Synthetics Docs Issue backport-8.7 Automated backport with mergify labels Mar 7, 2023
@colleenmcginnis colleenmcginnis self-assigned this Mar 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

A documentation preview will be available soon:

@paulb-elastic
Copy link
Contributor

I'm not sure if the example on the initial page might be a bit confusing?

For instance, https://observability-docs_2729.docs-preview.app.elstc.co/guide/en/observability/master/synthetics-lightweight.html#synthetics-lightweight talks about the different types of monitor, with links to how to go and set those up (which I think works).

The section beneath though shows an example YML, but it's not necessarily clear what that relates to (e.g. someone can't use those if they are configuring through the UI).

Maybe the common/http/icmp/tcp/data-types pages should be linked to from Project Monitors for example. I wonder if it will be easier to understand that with the split of the docs between Synthetics and Uptime/Heartbeat too.

Be interested to hear from @andrewvc too on how this fits in with what he had in mind initially too.

@colleenmcginnis
Copy link
Contributor Author

Maybe the common/http/icmp/tcp/data-types pages should be linked to from Project Monitors for example.

Ahh interesting. Do you think it would be helpful to document lightweight monitor options regardless of whether they are created in the Synthetics UI or using projects? Or do you think we should just document options for YAML configuration and let the UI text serve as its own documentation for the monitors configured in the UI?

For example, if there's enough overlap between configuration options for each method, we could structure the docs with a single description for each option with the ability to switch between "Synthetics app" and "Project Monitors" for more specific details and examples. Here's a snapshot of what the TCP options page could look like:

Synthetics app (UI) Project Monitors (YAML)
Screenshot 2023-03-08 at 12 10 12 PM Screenshot 2023-03-08 at 12 10 31 PM

This could also highlight limitations of each method for creating monitors like... if you want to set a schedule/frequency that isn't one of the available durations available in the UI, you could use a project to customize it. I'm not sure if that's a good thing or a bad thing, though. Let me know what you think.

@paulb-elastic
Copy link
Contributor

There is a gap between the configurations in the UI, Project Monitors, and traditional heartbeat.yml.

We have a variety of issues to close this gap, but it will take time, they are:

The full set is the current implementation in heartbeat.yml, but that's already documented in Heartbeat and I understand @andrewvc's purpose here was to remove the need to know or understand what Heartbeat is (when running monitors via the new mechanism).

I think that adding all these options under Synthetics will be confusing as many configurations are not supported. I think the UI does a good job of describing the various configurations (and as we add them, this will continue). That leaves Project Monitors, for which it is not clear what options are supported.

@andrewvc what were your thoughts here, should this be something like:

  • Leave the full set (heartbeat.yml docs as they are anyway) <= don't think there was any intention of removing these
  • Not document anything for the UI settings right now (maybe in the future when they're all implemented)
  • Document the config options available for Project Monitors (and just be mindful to keep adding to these docs as we add new capabilities)

@andrewvc
Copy link
Contributor

andrewvc commented Mar 9, 2023

This is certainly a complex issue, I think the guiding principle here should be that we should remove the need for most users to look at the heartbeat docs.

That means that we should document the YAML for lightweight monitors enough to cover at 95% of use cases.

I think your last comments are dead on in aligning with that @paulb-elastic . No need to document the UI, and just document the available config options for project monitors, making it clear that they only affect the YAML options for project monitors.

@colleenmcginnis
Copy link
Contributor Author

Thanks @paulb-elastic @andrewvc! Is the latest preview looking closer to what you're describing?

If yes, next up is to determine if we should replace all instances of the word "Heartbeat".

I understand @andrewvc's purpose here was to remove the need to know or understand what Heartbeat is (when running monitors via the new mechanism).

The copied-over content from the Heartbeat docs references "Heartbeat" several times. Should we replace it as to not confuse users? What is the right replacement... "Synthetics"? Here are a couple examples:

Document the config options available for Project Monitors (and just be mindful to keep adding to these docs as we add new capabilities)

Yes. It will be a bit of a challenge to keep these docs up to dat, but I structured the tables of options in a way that (hopefully) in the future we could generate docs from structured data.

Copy link
Contributor Author

@colleenmcginnis colleenmcginnis left a comment

Choose a reason for hiding this comment

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

To expand on my previous comment, I've added some specific questions I'd like to get answers to in order to move this PR forward. @paulb-elastic who's the best point of contact for this PR?

@colleenmcginnis colleenmcginnis marked this pull request as ready for review March 23, 2023 15:31
@colleenmcginnis colleenmcginnis requested a review from a team as a code owner March 23, 2023 15:31
Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM

@colleenmcginnis colleenmcginnis merged commit c4af37c into elastic:main Apr 3, 2023
@colleenmcginnis colleenmcginnis deleted the issue-2372 branch April 3, 2023 21:01
mergify bot pushed a commit that referenced this pull request Apr 3, 2023
* copy-paste from beats

* add data types

* format and edit common options

* fix links

* update structure

* clean up

* add links

* address feedback from @andrewvc

* address remaining feedback, clean up

* fix tiny typo

(cherry picked from commit c4af37c)
colleenmcginnis added a commit that referenced this pull request Apr 3, 2023
…2824)

* copy-paste from beats

* add data types

* format and edit common options

* fix links

* update structure

* clean up

* add links

* address feedback from @andrewvc

* address remaining feedback, clean up

* fix tiny typo

(cherry picked from commit c4af37c)

Co-authored-by: Colleen McGinnis <[email protected]>
////////////////////////
| [[monitor-enabled]] *`enabled`*
(<<synthetics-lightweight-data-bool,boolean>>)
a| Whether the module is enabled.
Copy link
Member

Choose a reason for hiding this comment

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

typo: module -> monitor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Synthetics Synthetics Docs Issue backport-8.7 Automated backport with mergify
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[REQUEST]: Document all lightweight monitor configuration options
4 participants