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

Update Elastic Package Registry integration to use new indexer metrics (get operations) #3863

Merged
merged 8 commits into from
Jul 28, 2022

Conversation

mrodm
Copy link
Contributor

@mrodm mrodm commented Jul 27, 2022

What does this PR do?

This PR updates the Elastic Package Registry integration to take into account the new metrics related to get operations (duration histograms) from elastic/package-registry#853.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • Updated metrics are retrieved and shown in the dashboard
  • Update docker tag to be used in tests (_dev/deploy/docker/Dockerfile)

How to test this PR locally

  1. Go to packages/elastic_package_registry and build the package (elastic-package build).
  2. Boot up the Elastic stack using elastic-package from packages/elastic_package_registry folder.
  3. Boot up the EPR service by using the command: elastic-package service up -v inside the packages/elastic_package_registry folder
  4. Get the container name to be used in configuration. It should be something similar to: elastic-package-service_elastic_package_registry_1
  5. Add EPR integration in Kibana:
    • Set as hosts: http://elastic-package-service_elastic_package_registry_1:9100
    • Go to Discover and check in metrics-*. It can be filtered by:
      • service.type: elastic_package_registry
      • data_stream.dataset: elastic_package_registry.metrics
  6. You can run queries against the EPR service:
    • Check the exposed container locally using docker ps
       $ docker ps |grep elastic-package-service_elastic_package_registry
      eacd95c89dc3   elastic-package-service_elastic_package_registry       "./package-registry"     About a minute ago   Up About a minute (healthy)   8080/tcp, 0.0.0.0:53910->8081/tcp, 0.0.0.0:53911->9110/tcp   elastic-package-service_elastic_package_registry_1
    • Run curl commands to that port, in this example the port is 53910:
      curl -s http://localhost:53910/
      curl -s http://localhost:53910/health
      curl -s http://localhost:53910/search?prerelease=true
      ... 

Related issues

Screenshots

elastic_package_registry-metrics-overview

@mrodm mrodm added enhancement New feature or request Team:Ecosystem Label for the Packages Ecosystem team [elastic/ecosystem] labels Jul 27, 2022
@mrodm mrodm self-assigned this Jul 27, 2022
@mrodm mrodm changed the title qUpdate Elastic Package Registry integration to include get index metrics Update Elastic Package Registry integration to use new indexer metrics (get operations) Jul 27, 2022
@elasticmachine
Copy link

elasticmachine commented Jul 27, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-28T17:22:35.860+0000

  • Duration: 16 min 41 sec

Test stats 🧪

Test Results
Failed 0
Passed 5
Skipped 0
Total 5

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

elasticmachine commented Jul 27, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (1/1) 💚 2.868
Classes 100.0% (1/1) 💚 2.868
Methods 100.0% (8/8) 💚 10.749
Lines 100.0% (77/77) 💚 9.399
Conditionals 100.0% (0/0) 💚

@@ -1,4 +1,4 @@
FROM docker.elastic.co/package-registry/package-registry:v1.10.0
FROM docker.elastic.co/package-registry/package-registry:a69ff8a9937bbf9e21b47be3cb94a1d254e2d145
Copy link
Contributor Author

@mrodm mrodm Jul 28, 2022

Choose a reason for hiding this comment

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

To be updated with a newer tag of a new package-registry release containing this PR elastic/package-registry#853.

Comment on lines -107 to 112
- name: package_registry.storage_indexer
- name: package_registry.indexer
type: group
Copy link
Contributor Author

@mrodm mrodm Jul 28, 2022

Choose a reason for hiding this comment

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

Currently , there will be just one metric (get_duration_seconds) in this indexer group. It seems to me that it could make sense to have that group even that.

WDYT?

These are the current groups defined:

  • package_registry.http
  • package_registry.labels
  • package_registry.indexer
  • package_registry.storage_indexer

@mrodm mrodm marked this pull request as ready for review July 28, 2022 11:22
@mrodm mrodm requested a review from a team as a code owner July 28, 2022 11:22
packages/elastic_package_registry/changelog.yml Outdated Show resolved Hide resolved
@@ -1,4 +1,4 @@
FROM docker.elastic.co/package-registry/package-registry:v1.10.0
FROM docker.elastic.co/package-registry/package-registry:a69ff8a9937bbf9e21b47be3cb94a1d254e2d145
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe drop a comment on why exactly is this SHA needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok! I'll do that, and in following PR, I'll set the the newer tag of the package registry
Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At the end, there has been a package-registry release, so no need to use the SHA. I'll update it to v1.11.0

@mrodm mrodm merged commit a1664e9 into elastic:main Jul 28, 2022
@mrodm mrodm deleted the update_epr_integration_get_index_metrics branch July 28, 2022 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Team:Ecosystem Label for the Packages Ecosystem team [elastic/ecosystem]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants