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

[IBM WebSphere Application Server] Add WebSphere Application Server Integration Package with JDBC data stream #2922

Merged

Conversation

kush-elastic
Copy link
Collaborator

@kush-elastic kush-elastic commented Mar 30, 2022

  • Enhancement

What does this PR do?

  • Generated the skeleton of WebSphere Application Server integration package.
  • Added 1 data stream (JDBC).
  • Added data collection logic for the data streams.
  • Added the ingest pipeline for the data streams.
  • Mapped fields according to the ECS schema and added Fields metadata in the appropriate yaml files.
  • Added dashboards and visualizations.
  • Added pipeline test cases for the data stream.
  • Added system test cases for the data stream.

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.

How to test this PR locally

  • Clone integrations repo.
  • Install elastic-package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/websphere_application_server directory.
  • Run the following command to run tests.
    elastic-package test

Related issues

Screenshots

websphere_application_server-jdbc-dashboard-screenshot

@elasticmachine
Copy link

elasticmachine commented Mar 30, 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-05-20T04:38:55.651+0000

  • Duration: 17 min 53 sec

Test stats 🧪

Test Results
Failed 0
Passed 10
Skipped 0
Total 10

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@kush-elastic kush-elastic self-assigned this Apr 6, 2022
@kush-elastic kush-elastic requested a review from mtojek April 6, 2022 13:25
@mtojek mtojek requested a review from a team April 6, 2022 14:08
@kush-elastic kush-elastic marked this pull request as ready for review April 8, 2022 05:30
@kush-elastic kush-elastic requested a review from a team as a code owner April 8, 2022 05:30
@kush-elastic kush-elastic changed the title [IBM WebSphere Application Server] Add WebSphere Application Server Integration Package [IBM WebSphere Application Server] Add WebSphere Application Server Integration Package with JDBC data stream Apr 8, 2022
@kush-elastic
Copy link
Collaborator Author

/test

@elasticmachine
Copy link

elasticmachine commented Apr 26, 2022

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (1/1) 💚 3.886
Classes 100.0% (1/1) 💚 3.886
Methods 100.0% (7/7) 💚 11.201
Lines 100.0% (137/137) 💚 9.21
Conditionals 100.0% (0/0) 💚

@kush-elastic kush-elastic added enhancement New feature or request New Integration Team:Service-Integrations Label for the Service Integrations team labels Apr 29, 2022
Copy link
Contributor

@yug-rajani yug-rajani left a comment

Choose a reason for hiding this comment

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

Requested some changes

Copy link
Contributor

@yug-rajani yug-rajani left a comment

Choose a reason for hiding this comment

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

Thanks for making the adjustments, @kush-elastic. LGTM!
Please make the changes suggested in this PR (if applicable) to the other IBM WAS PRs as well.

@kush-elastic
Copy link
Collaborator Author

/test

@kush-elastic kush-elastic linked an issue May 11, 2022 that may be closed by this pull request
8 tasks
- rename:
field: prometheus.metrics.was_connectionpool_jdbcOperation_time_seconds_total
target_field: websphere_application_server.jdbc.connection.total.operations_seconds
ignore_missing: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Any specific reason for having the target field as "websphere_application_server.jdbc.connection.total.operations_seconds" ?

If we have it as websphere_application_server.jdbc.was_connectionpool_jdbcOperation_time_seconds_total and follow the same notion for other fields as well, we can reduce the pipeline oto a simple rename processor as:

rename:
field: prometheus.metrics
target_field: websphere_application_server.jdbc

Copy link
Contributor

Choose a reason for hiding this comment

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

we can also have a looped script to do the renaming,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Please refer to the reply: #2922 (comment)

- rename:
field: prometheus.metrics.was_connectionpool_jdbcOperation_time_seconds_total
target_field: websphere_application_server.jdbc.connection.total.operations_seconds
ignore_missing: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Any specific reason for having the target field as "websphere_application_server.jdbc.connection.total.operations_seconds" ?

If we have it as websphere_application_server.jdbc.was_connectionpool_jdbcOperation_time_seconds_total and follow the same notion for other fields as well, we can reduce the pipeline oto a simple rename processor as:

rename:
field: prometheus.metrics
target_field: websphere_application_server.jdbc

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Elastic has a standard field naming convention: https://www.elastic.co/guide/en/beats/devguide/current/event-conventions.html and we've been following the same standards throughout all the integration. All the fields that we are extracting in this integration also follows the same naming standards. Please refer to the shared doc and let me know if you still think we should change it.
CC: @akshay-saraswat

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification.

ignore_missing: true
- script:
description: Drops null/empty values recursively
lang: painless
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the preexisting "Drop "Processor here ? To drop the null fields ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess you should refer this for drop processor discussion.

version: '3.4'
services:
websphere_application_server:
image: ibmcom/websphere-traditional:9.0.5.10
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a latest Websphere image 9.0.5.11
I think it would be a good idea to use that ?

Copy link
Collaborator Author

@kush-elastic kush-elastic May 19, 2022

Choose a reason for hiding this comment

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

Sure, I have updated image version. Please check it out.

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.

It is always a good practice to have the event.* fields have their values populated in base-fields.yml.
Please refer to this as example:
https://github.com/elastic/integrations/blob/main/packages/prometheus/data_stream/collector/fields/base-fields.yml

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We have followed this from integration developer guide.
if you still think we should change this please let us know.

Copy link
Contributor

Choose a reason for hiding this comment

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

This would mean that the existing fields in it will never change.
But the newer fields can be added. That's what is followed through all the integrations in Elastic.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Okay, Thanks. will update it soon.

@kush-elastic
Copy link
Collaborator Author

Hey @ishleenk17, thanks for the review! We have addressed all the review comments and made the required changes and re-requested review. Could you please take a look at the PR again and let us know if you think we should change anything else before we can have an approval from you over the PR?

@ishleenk17
Copy link
Contributor

Looks good. Approved!

@kush-elastic kush-elastic merged commit ecc2264 into elastic:main May 20, 2022
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.

Create IBM Websphere Application Server Integration
5 participants