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

[prometheus] Use ecs definition of the 'event.dataset' field #7667

Merged

Conversation

tetianakravchenko
Copy link
Contributor

@tetianakravchenko tetianakravchenko commented Sep 5, 2023

What does this PR do?

1, There is no need to set event.dataset explicitly - this should be done on the elastic-agent side elastic/beats#20076.

due to the existence of predefined value, there can happen this error:

{"type":"illegal_argument_exception","reason":"[constant_keyword] field [event.dataset] only accepts values that are equal to the value defined in the mappings [prometheus.collector], but got [prometheus.topolvm]"}}, dropping event!

Since the type defined for this field in ecs is keyword, I decided to switch to ecs definition.

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

  • [ ]

How to test this PR locally

Related issues

Screenshots

@elasticmachine
Copy link

elasticmachine commented Sep 5, 2023

💚 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: 2023-09-05T15:24:21.794+0000

  • Duration: 15 min 6 sec

Test stats 🧪

Test Results
Failed 0
Passed 9
Skipped 0
Total 9

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

@elasticmachine
Copy link

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚
Classes 100.0% (0/0) 💚
Methods 66.667% (8/12) 👎 -29.804
Lines 100.0% (0/0) 💚 5.825
Conditionals 100.0% (0/0) 💚

@tetianakravchenko tetianakravchenko marked this pull request as ready for review September 5, 2023 15:37
@tetianakravchenko tetianakravchenko requested a review from a team as a code owner September 5, 2023 15:37
@tetianakravchenko tetianakravchenko merged commit 2e82e7b into elastic:main Sep 6, 2023
@tetianakravchenko tetianakravchenko deleted the prometheus-dataset-name branch September 6, 2023 13:17
@elasticmachine
Copy link

Package prometheus - 1.12.0 containing this change is available at https://epr.elastic.co/search?package=prometheus

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

Successfully merging this pull request may close these issues.

[prometheus] event.dataset is not correct if data_stream.dataset is set to not a default value
5 participants