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

Cherry-pick #19433 to 7.x: [MetricBeat] set tags correctly if the dimension value is ARN #19582

Merged
merged 1 commit into from
Jul 2, 2020
Merged

Cherry-pick #19433 to 7.x: [MetricBeat] set tags correctly if the dimension value is ARN #19582

merged 1 commit into from
Jul 2, 2020

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Jul 2, 2020

Cherry-pick of PR #19433 to 7.x branch. Original message:

What does this PR do?

This PR is to fix setting resource tags when dimension value is ARN format, I found this issue in AWS/DDoSProtection namespace metrics.

Why is it important?

cloudwatch module should set event tags correctly if dimension value is ARN format and tags.resource_type_filter param is configured

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

Screenshots

test with aws shield service and EIP resource , I have put some demo metrics before running test ,so the namespace is DDoSProtection. The actual value is AWS/DDoSProtection if you get metrics that created by aws.

metricbeat.modules:
  - module: aws
    period: 1h
    access_key_id: 
    secret_access_key: 
    metrics:
      - namespace: DDoSProtection
        statistic: ['Maximum']
        name:
          [
            'DDoSDetected',
            'DDoSAttackBitsPerSecond',
            'DDoSAttackPacketsPerSecond',
            'DDoSAttackRequestsPerSecond',
          ]
        tags.resource_type_filter: ec2:elastic-ip

image

* fix setting tags when dimension value is arn format in aws cloudwatch module

(cherry picked from commit f96ef57)
@kaiyan-sheng kaiyan-sheng added [zube]: In Review backport Team:Platforms Label for the Integrations - Platforms team labels Jul 2, 2020
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 2, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 2, 2020
@kaiyan-sheng kaiyan-sheng self-assigned this Jul 2, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jul 2, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Branch indexing]

  • Start Time: 2020-07-02T09:26:24.395+0000

  • Duration: 71 min 52 sec

Test stats 🧪

Test Results
Failed 0
Passed 539
Skipped 128
Total 667

@kaiyan-sheng kaiyan-sheng merged commit 47cd829 into elastic:7.x Jul 2, 2020
@kaiyan-sheng kaiyan-sheng deleted the backport_19433_7.x branch July 2, 2020 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Team:Platforms Label for the Integrations - Platforms team [zube]: Done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants