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

Add AWSHealth Integration #10119

Merged
merged 9 commits into from
Jul 12, 2024
Merged

Conversation

agithomas
Copy link
Contributor

@agithomas agithomas commented Jun 11, 2024

Type of change

  • Enhancement

Proposed commit message

Create AWS Health Integration.
AWS health metrics provide insights into the health of your AWS environment by monitoring various aspects, such as open issues, scheduled maintenance events, etc.

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

  • elastic-package build
  • elastic-package stack up -v -d --services package-registry
  • Configure the AWS Health Integration.
  • Verify the dashboard data
  • Validate using Discover interface

Related issues

Screenshots

Screenshot 2024-06-10 at 8 20 53 AM

@agithomas
Copy link
Contributor Author

The PR is blocked because of the issue : #10400

@agithomas
Copy link
Contributor Author

/test

@elasticmachine
Copy link

elasticmachine commented Jul 7, 2024

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@agithomas agithomas marked this pull request as ready for review July 7, 2024 11:34
@agithomas agithomas requested review from a team as code owners July 7, 2024 11:34
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.region
Copy link
Contributor

Choose a reason for hiding this comment

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

Please follow the ecs@mappings template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed non-dimension fields from ecs.yml file

packages/aws/data_stream/awshealth/fields/fields.yml Outdated Show resolved Hide resolved
@muthu-mps
Copy link
Contributor

The metrics include the status_code which is more useful for monitoring. Can we include a visualisation which breaks down metrics by status_code.

Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

@agithomas, should we also set up the .github/CODEOWNERS file for this integration?

@agithomas
Copy link
Contributor Author

The metrics include the status_code which is more useful for monitoring. Can we include a visualisation which breaks down metrics by status_code.

This already exists. Snippet from the screenshot. The metrics are broken down into Status & Regionwise. Status + Region would be more usable and hence this approach is followed

image

@agithomas
Copy link
Contributor Author

@agithomas, should we also set up the .github/CODEOWNERS file for this integration?

Thanks for pointing it out. Added the entry.

@shmsr shmsr added the enhancement New feature or request label Jul 9, 2024
Copy link
Contributor

@muthu-mps muthu-mps left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@shmsr shmsr left a comment

Choose a reason for hiding this comment

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

Also, see this patch:

Makes small adjustments to make all descriptions consistent.

diff --git a/packages/aws/data_stream/awshealth/fields/fields.yml b/packages/aws/data_stream/awshealth/fields/fields.yml
index 14795aa42..260f40da1 100644
--- a/packages/aws/data_stream/awshealth/fields/fields.yml
+++ b/packages/aws/data_stream/awshealth/fields/fields.yml
@@ -4,7 +4,7 @@
     - name: awshealth
       type: group
       description: >
-        AWS Health metrics
+        AWS Health metrics.
       fields:
         - name: affected_entities_others
           type: float
@@ -33,12 +33,12 @@
           type: keyword
           dimension: true
           description: >
-            The unique identifier for the event. The event ARN has the format `arn:aws:health:<event-region>::event/<SERVICE>/<EVENT_TYPE_CODE>/<EVENT_TYPE_PLUS_ID>`. For example, `arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456`
+            The unique identifier for the event. The event ARN has the format `arn:aws:health:<event-region>::event/<SERVICE>/<EVENT_TYPE_CODE>/<EVENT_TYPE_PLUS_ID>`. For example, `arn:aws:health:us-east-1::event/EC2/EC2_INSTANCE_RETIREMENT_SCHEDULED/EC2_INSTANCE_RETIREMENT_SCHEDULED_ABC123-DEF456`.
 
         - name: event_scope_code
           type: keyword
           description: >
-            This parameter specifies whether the Health event is a public Amazon Web Service event or an account-specific event. Allowed values are `PUBLIC`, `ACCOUNT_SPECIFIC`, or `NONE`."
+            The parameter that specifies whether the Health event is a public Amazon Web Service event or an account-specific event. Allowed values are `PUBLIC`, `ACCOUNT_SPECIFIC`, or `NONE`.
 
         - name: event_type_category
           type: keyword
@@ -85,7 +85,7 @@
           object_type: keyword
           object_type_mapping_type: "*"
           description: >
-            Details of the affected entities related to the event.
+            The details of the affected entities related to the event.
 
         - name: affected_entities.aws_account_id
           type: keyword
@@ -105,7 +105,7 @@
         - name: affected_entities.last_updated_time
           type: date
           description: >
-            The last updated time of entity.
+            The last updated time of the entity.
 
         - name: affected_entities.status_code
           type: keyword

I have a couple of suggestions for package-fields.yml but from our earlier discussion, you want to keep it as it in data_streams for consistency; so skipping those nitpicks.

multi: true
required: false
show_user: true
- name: tags_filter
Copy link
Member

Choose a reason for hiding this comment

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

Add description for tags_filter, region, period and data_granularity.

@shmsr
Copy link
Member

shmsr commented Jul 9, 2024

Just a couple of comments. Rest looks good; ready to approve when these comments get addressed.

@agithomas
Copy link
Contributor Author

Makes small adjustments to make all descriptions consistent.

Addressed the suggestions.

Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

LGTM!

I only left a comment to remind us that we may need to revisit the definitions of the data_stream.* and @timestamp fields in the future.

Comment on lines +1 to +12
- name: data_stream.type
type: constant_keyword
description: Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: Data stream namespace.
- name: '@timestamp'
type: date
description: Event timestamp.
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC, ECS includes definitions for the data_stream.* and @timestamp fields, so we may not need to include these ones.

Base
https://www.elastic.co/guide/en/ecs/current/ecs-base.html

Data Stream
https://www.elastic.co/guide/en/ecs/current/ecs-data_stream.html

However, I just noticed that elastic-package explicitly checks for these fields, so removing them is not an option until we update elastic-package.

I'll leave this comment as a reminder we may need to remove these field definitions in the future.

Copy link
Contributor

Choose a reason for hiding this comment

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

@zmoog : Please see this

@elasticmachine
Copy link

💚 Build Succeeded

History

@agithomas agithomas merged commit d4dcb0a into elastic:main Jul 12, 2024
5 checks passed
@elasticmachine
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:aws AWS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants