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

[Project Monitors] Support multiple hosts/urls/ports in lightweight monitors. #627

Open
andrewvc opened this issue Oct 19, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@andrewvc
Copy link
Contributor

andrewvc commented Oct 19, 2022

Lightweight monitors in the synthetics agent currently do not support the popular multiple hosts feature. When users want to check a list of hosts with the same config, they can use a config like:

- type: tcp 
  id: special-monitors
  name: Special Monitors
  hosts: ["10.0.0.1:8080", "10.0.0.2:8080", "10.0.0.3:8080"]
  schedule: "@every 5m"
  tags: ["special"]

and easily monitor all three. We currently prevent that in our Kibana validation, because it would move us from a 1:1 saved object -> monitor relationship to a 1:N relationship. This issue would solve that by having the synthetics agent essentially treat the hosts and urls fields as a macro, expanding it before communicating to the API.

This requires us to also add the host to both the id and name fields to prevent clashes. This is done today in heartbeat by hashing the host then appending it to the ID in wrappers.go. We currently do not do something similar for the name, relying on the UI to show the name and the URL consistently side-by-side. I propose we change this, and include the plain text URL in the name as a suffix, so, in the example above we'd have names like Special Monitors - 10.0.0.1:8080.

ACs:

  • Add support for multiple urls
  • Add support for multiple hosts
  • Add support for multiple ports
@robdiluca
Copy link

Are there any updates about this issue?

@paulb-elastic
Copy link
Contributor

@robdiluca we don't have an update about when this will be prioritised that we can share at the moment (aside from updating the docs to clarify this is not currently possible).

For now, the work around would be to create multiple monitors for each of the hosts/endpoints.

@paulb-elastic paulb-elastic changed the title [Project Monitors] Support multiple hosts/urls in lightweight monitors. [Project Monitors] Support multiple hosts/urls/ports in lightweight monitors. Nov 23, 2023
@paulb-elastic
Copy link
Contributor

Added this is also needed for ports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants