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

Quick access to edit Fleet/Integration monitor from Uptime #307

Open
paulb-elastic opened this issue Feb 24, 2021 · 1 comment
Open

Quick access to edit Fleet/Integration monitor from Uptime #307

paulb-elastic opened this issue Feb 24, 2021 · 1 comment

Comments

@paulb-elastic
Copy link

As a user of Synthetics that is implemented using Fleet
I want to be able to easily find a way to edit my monitor from Uptime
So that I don’t need to remember how to find how to do this in Fleet

ACs

  • When a monitor has been configured via Fleet/Integrations, there is a one click method of getting to the configuration page that resides in Fleet, from the Uptime UI, for that monitor
  • When finished modifying the configuration in Fleet, I can get back to Uptime easily
@dominiqueclarke
Copy link

There are two ways I see editing Uptime monitors in fleet operating

  1. Edit button directs users to the fleet edit page
    • Edit url is straightforward, can be easily constructed with the integration policy id and the integration policy id
    • Open in a new tab to keep Uptime context
  2. Edit button opens up an Uptime workflow for editing the monitor
    • The Fleet PackagePolicyService exposes underlying fleet apis, enabling us to programmatically updated the policy from uptime

Detecting fleet monitor

  • Fleet monitors can be detected via the monitor.fleet_managed field. When set to true, monitors originated from fleet configuration.

Detecting integration policy

  • The monitor id matches the underlying policy id. Therefore the policy id can be found at monitor.id.

Detecting agent policy

  • Each integration policy belongs to a parent agent policy. The agent policy is currently not available in the indexed documents. The agent policy can be obtained one of two ways
    • Added to document when indexed by heartbeat (unclear if heartbeat has full access to the entire policy, which contains the agent policy id at the top level, or if it's just passed a subset of the policy that matches the input type for heartbeat)
    • Fetched from the fleet api via PackagePolicyService

Detecting if the policy is active
The integration policy or parent agent policy may have been deleted, preventing editing. To avoid this, we should ping the fleet api via PackagePolicyService to see if the policy is still active.

  • If active show the edit button.
  • If inactive, disable the edit button and add a popover explaining that the policy has been deleted

Questions to explore

  • What are the limitations for editing?
    • No editing monitor type
    • Current Fleet UI edit workflow prevents being able to reassign an integration policy to a different agent policy. This may be possible through the PackagePolicyService, but we'll want to sync with the fleet team to see if that is discouraged.

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

No branches or pull requests

2 participants