Skip to content

[Uptime] Add Custom Fleet Integration UI#91584

Merged
dominiqueclarke merged 127 commits intoelastic:masterfrom
dominiqueclarke:feature/91062-fleet-integration
Apr 20, 2021
Merged

[Uptime] Add Custom Fleet Integration UI#91584
dominiqueclarke merged 127 commits intoelastic:masterfrom
dominiqueclarke:feature/91062-fleet-integration

Conversation

@dominiqueclarke
Copy link
Copy Markdown
Contributor

@dominiqueclarke dominiqueclarke commented Feb 16, 2021

Summary

Fixes #91062

Running this PR

This PR can be run through "Run my Kibana PR" in the edge environment, or locally.

As of 4/12, the edge environment is down preventing running through Run my Kibana PR

Step 1: Run Kibana Locally

  • Clone this repo and pull down this PR
  • Update kibana.dev.yaml to include the following fields:
xpack.fleet.enabled: true
xpack.fleet.registryUrl: "https://epr-staging.elastic.co"
xpack.fleet.agents.enabled: true
xpack.fleet.agents.fleet_server.hosts: []
xpack.fleet.agents.tlsCheckDisabled: true
xpack.fleet.agents.fleetServerEnabled: true
xpack.encryptedSavedObjects.encryptionKey: "12345678901234567890123456789012"
  • run es with command yarn es snapshot -E xpack.security.authc.api_key.enabled=true --license trial
  • run kibana with command yarn kbn bootstrap && yarn start --no-base-path
  • Log into Kibana UI
  • Navigate to fleet
  • Click on the agents tab
  • You should see the Fleet Server UI. Click add agent where it should complain about not having a fleet server url.
  • Click fleet settings and add the fleet server url as localhost:8220

Step 2: add an agent locally

  • Navigate to the artifacts url to find the agent download for your system (may need to change version if you need 8.0.0, for example). https://artifacts-api.elastic.co/v1/search/7.13-SNAPSHOT/elastic-agent
  • Follow the instructions for in Kibana on the agents for setting up fleet server. You'll need to generate a service token in the UI, which will then give you a command to run in your agent.

Step 3: Create integration

  • Click the integrations tab
  • Search for Synthetics
  • Click add integration on the synthetics page
  • Make sure to change the policy from Default Agent Policy to Default Fleet Server Policy

Testing criteria

  • Add basic HTTP monitor, add an agent, ensure you can see monitor status in Uptime after
  • Add basic TCP monitor, add an agent, ensure you can see monitor status in Uptime
  • Add basic ICMP monitor, add an agent, ensure you can see monitor status in Uptime
  • Edit basic HTTP monitor, ensure Uptime is updated
  • Edit basic TCP monitor, ensure Uptime is updated
  • Edit basic IMCP monitor, ensure Uptime is updated
  • Add advanced HTTP monitor, experimenting with request configuration and response configuration, including headers, response body, username, password, etc.
  • Add advanced TCP monitor, experimenting with request configuration and response configuration

Video: https://drive.google.com/file/d/1FTExU0AFyHeiTFuKsS6Q8txK3rJ26I0J/view?usp=drivesdk

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@dominiqueclarke dominiqueclarke added release_note:enhancement v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.13.0 labels Feb 16, 2021
@dominiqueclarke dominiqueclarke requested a review from a team as a code owner February 16, 2021 22:51
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke dominiqueclarke marked this pull request as draft February 16, 2021 22:51
@@ -0,0 +1,70 @@
/*
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

PR is in draft state, all text will need translating.

@@ -0,0 +1,20 @@
/*
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Create and Edit Lazy Components may need to be wrapped in some type of permissions logic.

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

validate: Validation;
}

export const CustomFields = memo<Props>(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a huge component, would have made sense to separate it into multiple for better maintenance and readability

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

it allows saving http option, if you have empty headers or if there is only value and no key for header, is that expected? i guess we aren't doing validations on headers atm.

We are validating that the header does not contain a space, but we are not doing extra validation beyond that. If the user enters a header without a key, it will omit the header in the policy. If they add a header with a value, it'll add it.

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

We should specify min value 1 for EuiNumberField

image

Updated, but it'll still allow the user to enter 0, which will trigger our own validation.

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

While editing it doesn't allows you to edit URL, it reset after you type something

Screen.Recording.2021-04-13.at.09.37.50.mov

This is resolved.

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

When you land on the page, it shows URL and name already invalid, i guess it makes sense for name, but not probably for url to show as invalid without touching? though i submission might get tricky. This is just a thought, i don't expect an action necessarily on this.

image

I agree that typically the Elastic pattern is to only show validation after the field is dirty. Unfortunately, with the programatic change of the name field, the fleet field is now considered "dirty". For this reason, I wanted to match the styling with the other fields for consistency. I brought this up with Paul and Drew and I believe they were both okay with this.

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

Something weird going on with Tags component when you land on the page
image

Can you provide more details on recreating this? I'm not seeing anything weird pop up.

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

While Editing, if you have some advanced settings configured, does it make sense to expand it by default?

This is one of the feedback items I received, but was running out of time to address. It's certainly doable, but a bit tricky and would take just bit of time. You can find the explanation here under the Andrew section #91062

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@shahzad31
Copy link
Copy Markdown
Contributor

@dominiqueclarke will you be able to check why sudden increase in async bundle size? almost 400kb, some very expensive dependency got added

image

Copy link
Copy Markdown
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

LGTM, Great work again, i see nothing as blocker !!

Copy link
Copy Markdown
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

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

Fleet changes 👍 maybe worth testing uptime package when this land #96063

@dominiqueclarke
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@dominiqueclarke dominiqueclarke merged commit a4d3560 into elastic:master Apr 20, 2021
@dominiqueclarke dominiqueclarke deleted the feature/91062-fleet-integration branch April 20, 2021 17:33
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 20, 2021
Register Synthetics integration package override to provide custom integration ui
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 20, 2021
Register Synthetics integration package override to provide custom integration ui

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
uptime 709 741 +32

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
uptime 945.0KB 1.2MB ⚠️ +286.5KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
uptime 18.4KB 19.4KB +993.0B
Unknown metric groups

async chunk count

id before after diff
uptime 10 13 +3

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed enhancement New value added to drive a business result release_note:enhancement Team:Fleet Team label for Observability Data Collection Fleet team Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.13.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Uptime] Create custom UI component for HTTP/ICMP/TCP Ping Fleet integration

7 participants