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

[Azure][compute_vm] Add dimensions, metric_type to the compute_vm datastream; remove dupl… #7293

Merged
merged 9 commits into from Aug 28, 2023

Conversation

tetianakravchenko
Copy link
Contributor

@tetianakravchenko tetianakravchenko commented Aug 7, 2023

…icated fields; extend azure.dimensions.* field with exact fields

What does this PR do?

  • Add dimensions fields:
    agent.id
    azure.dimensions.*
    azure.namespace - there might be multiple sources of metrics - for example for the same windows instance there can be available Microsoft.Compute/virtualMachines and Azure.VM.Windows.GuestMetrics metrics, both does not have dimensions
    cloud.region
    cloud.instance.id - this is mainly added to follow the same rules as for aws/gcp, azure.resource.id should be unique enough
    azure.resource.id
    azure.timegrain
  • remove duplicated fields
  • add agent.id field
  • add metric_type to the azure.compute_vm.*.* metric
- name: azure.compute_vm.*.*
  type: object
  metric_type: gauge
  object_type: float
  object_type_mapping_type: "*"
  description: >-
    Returned compute_vm metrics

there is planned a release with changes in spec, that fix the elastic-package build error

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

…icated fields; extend azure.dimensions.* field with exact fields

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko tetianakravchenko requested a review from a team as a code owner August 7, 2023 14:58
@elasticmachine
Copy link

elasticmachine commented Aug 7, 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-08-28T08:21:59.055+0000

  • Duration: 14 min 20 sec

Test stats 🧪

Test Results
Failed 0
Passed 33
Skipped 0
Total 33

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

@@ -1,6 +1,7 @@
- name: azure.compute_vm.*.*
type: object
metric_type: gauge
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: for float it is not possible to use format:

- name: azure.compute_vm.*.*
  type: float
  metric_type: gauge

it causes this error:

Failed to parse mapping: No field type matched on [duck], possible values are [object, string, long, double, boolean, date, binary]

@elasticmachine
Copy link

elasticmachine commented Aug 11, 2023

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (3/3) 💚
Files 100.0% (3/3) 💚
Classes 100.0% (3/3) 💚
Methods 73.333% (22/30) 👍
Lines 100.0% (21/21) 💚
Conditionals 100.0% (0/0) 💚

@tetianakravchenko
Copy link
Contributor Author

/test

…tion] Reason: Mapping definition for [*] has unsupported parameters: [meta : {metric_type=gauge}]

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@@ -20,7 +20,7 @@ categories:
- observability
- azure
conditions:
kibana.version: "^8.3.0"
kibana.version: "^8.9.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

FYI: It was intriduced due to this error:

[2023-08-17T08:30:18.282Z] Error: error running package asset tests: could not complete test run: can't install the package: can't install the package: could not install package; API status code = 500; response body = {"statusCode":500,"error":"Internal Server Error","message":"mapper_parsing_exception: [mapper_parsing_exception] Reason: Mapping definition for [*] has unsupported parameters:  [meta : {metric_type=gauge}]"}

in CI was used stack version defined as a restriction: ../../build/elastic-package stack up -d -v --version 8.3.0

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
@tetianakravchenko tetianakravchenko merged commit 7527a76 into elastic:main Aug 28, 2023
4 checks passed
@tetianakravchenko tetianakravchenko deleted the compute_vm-tsdb branch August 28, 2023 08:58
@elasticmachine
Copy link

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

gizas pushed a commit that referenced this pull request Sep 5, 2023
…astream; remove dupl… (#7293)

* add dimensions, metric_type to the compute_vm datastream; remove duplicated fields; extend azure.dimensions.* field with exact fields

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* Update changelog.yml

* set stack restriction to ^8.9.0 to fix CI error: mapper_parsing_exception] Reason: Mapping definition for [*] has unsupported parameters:  [meta : {metric_type=gauge}]

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>

* Update manifest.yml

---------

Signed-off-by: Tetiana Kravchenko <tetiana.kravchenko@elastic.co>
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

Successfully merging this pull request may close these issues.

None yet

4 participants