Skip to content

[oracle] Enhancement to capture system statistics metrics, pga metrics, sga metrics - #3967

Merged
agithomas merged 21 commits into
elastic:mainfrom
agithomas:feature-3911
Sep 21, 2022
Merged

[oracle] Enhancement to capture system statistics metrics, pga metrics, sga metrics#3967
agithomas merged 21 commits into
elastic:mainfrom
agithomas:feature-3911

Conversation

@agithomas

Copy link
Copy Markdown
Contributor

Enhancement to capture system statistics metrics, pga metrics, sga metrics.

Type of change

  • Enhancement

What does this PR do?

  • Enhancement to capture system statistics metrics, pga metrics, sga metrics.
  • Added dashboard to capture performance metrics, system statistics metrics, pga and sga metrics.

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

  • docker run -d --name oracle -p 1521:1521 -p 5500:5500 docker.elastic.co/observability-ci/database-enterprise:12.2.0.1
  • Install oracle client in the host / vm
  • elastic-package stack up --version 8.3.0
  • Access kibana, login, configure oracle integration. Use the default values

Related issues

Screenshots

Screenshot 2022-08-08 at 12 24 53 PM

Screenshot 2022-08-08 at 12 24 32 PM

Screenshot 2022-08-08 at 12 24 14 PM

…trics. Added dashboard to capture performance metrics, system statistics metrics, pga and sga metrics.
@elasticmachine

elasticmachine commented Aug 8, 2022

Copy link
Copy Markdown

❕ Build Aborted

Either there was a build timeout or someone aborted the build.

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Start Time: 2022-09-12T08:54:33.628+0000

  • Duration: 24 min 39 sec

Steps errors 1

Expand to view the steps failures

Google Storage Download
  • Took 0 min 0 sec . View more details here

🤖 GitHub comments

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

  • /test : Re-trigger the build.
@elasticmachine

elasticmachine commented Aug 8, 2022

Copy link
Copy Markdown

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (1/1) 💚
Files 100.0% (1/1) 💚 2.994
Classes 100.0% (1/1) 💚 2.994
Methods 82.759% (24/29) 👎 -7.024
Lines 89.13% (164/184) 👎 -2.392
Conditionals 100.0% (0/0) 💚
@andrewkroh andrewkroh changed the title Enhancement to capture system statistics metrics, pga metrics, sga metrics Aug 14, 2022
@andrewkroh andrewkroh added Integration:oracle Oracle enhancement New feature or request labels Aug 14, 2022
@agithomas
agithomas marked this pull request as ready for review August 29, 2022 04:51
@agithomas
agithomas requested a review from a team as a code owner August 29, 2022 04:51
@agithomas agithomas self-assigned this Aug 29, 2022
Comment thread packages/oracle/changelog.yml Outdated
Comment thread packages/oracle/data_stream/performance/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/system_statistics/fields/fields.yml

@ishleenk17 ishleenk17 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ECS and base fields not present in performance data stream

@ishleenk17 ishleenk17 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

IIRC, SQL has flexibility of letting the user choose which field they want to retrive from a table in DB.
Would that be inherited by oracle as well since its using sql metrics ?

@agithomas

Copy link
Copy Markdown
Contributor Author

IIRC, SQL has flexibility of letting the user choose which field they want to retrive from a table in DB. Would that be inherited by oracle as well since its using sql metrics ?

dynamic_metric_name_filter feature is present to permit the user to configure based on his / her requirements

@agithomas

Copy link
Copy Markdown
Contributor Author

ECS and base fields not present in performance data stream

It is present. But, you won't find in the Files Changed. We already have Performance data stream and this time we are extending it. base-fields.yml and ecs.yml files were added earlier.

@agithomas

Copy link
Copy Markdown
Contributor Author

@efd6 , all the issues highlighted are fixed. Kindly review

@elasticmachine

elasticmachine commented Sep 12, 2022

Copy link
Copy Markdown

💚 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-09-20T12:36:49.372+0000

  • Duration: 13 min 23 sec

Test stats 🧪

Test Results
Failed 0
Passed 21
Skipped 0
Total 21

🤖 GitHub comments

Expand to view the GitHub comments

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

  • /test : Re-trigger the build.

@efd6 efd6 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

After nit this LGTM. The oracle SQL should probably also be checked by another; it looks OK to this non-expert.

Comment thread packages/oracle/changelog.yml Outdated
Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
Comment thread packages/oracle/data_stream/performance/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/performance/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/performance/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/system_statistics/fields/fields.yml
@muthu-mps

Copy link
Copy Markdown
Contributor

Can we realign the dashboard packages/oracle/img/Oracle-system_statistics-dashboard.png and remove the extra gap after Inactive session count > 1hr.

Comment thread packages/oracle/data_stream/system_statistics/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/pga_sga/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/pga_sga/fields/fields.yml Outdated
@agithomas

Copy link
Copy Markdown
Contributor Author

Can we realign the dashboard packages/oracle/img/Oracle-system_statistics-dashboard.png and remove the extra gap after Inactive session count > 1hr.

Corrected.

- query: select WAIT_CLASS, TOTAL_WAITS, round(100 * (TOTAL_WAITS / SUM_WAITS),2) PCT_WAITS, ROUND((TIME_WAITED / 100),2) TIME_WAITED_SECS, round(100 * (TIME_WAITED / SUM_TIME),2) PCT_TIME from (select WAIT_CLASS, TOTAL_WAITS, TIME_WAITED from V$SYSTEM_WAIT_CLASS where WAIT_CLASS != 'Idle'), (select sum(TOTAL_WAITS) SUM_WAITS, sum(TIME_WAITED) SUM_TIME from V$SYSTEM_WAIT_CLASS where WAIT_CLASS != 'Idle') order by 5 desc
response_format: table


No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How many documents are created by these queries? Should we add request_merge flag? This question applies to all the oracle data streams.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

pga_sga : 2
sysmetric : 1
system_statistics : 1

There is a scope of improvement in performance datastream (part of 8.4) which has 7 queries.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As per the discussion, a separate PR will be created for this as 8.4.0 features are needed, changing min kibana version to 8.4.0 for this integration

unit: percent
metric_type: gauge
description: Percentage of time waits that are not Idle wait class.
- name: pct_waits

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should we remove "wait" for last field names. Need to think if having these in the names better since the group name is "wait"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

- name: pct_time
          type: double
          unit: percent
          metric_type: gauge
          description: Percentage of time waits that are not Idle wait class.
        - name: pct_waits
          type: double
          unit: percent
          metric_type: gauge
          description: Percentage of number of pct time waits that are not of Idle wait class.

Cannot remove wait because, it will lead to conflicts / confusions

ignore_failure: true
- rename:
field: oracle.performance.pct_time
target_field: oracle.performance.wait.pct_time

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we make sure these oracle.performance.wait.* fields are there in the sample events? also I am not able to locate them in the README file also.

Comment thread packages/oracle/data_stream/performance/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/performance/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/performance/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/system_statistics/fields/fields.yml Outdated
Comment thread packages/oracle/data_stream/pga_sga/fields/fields.yml Outdated
Comment thread packages/oracle/_dev/build/docs/README.md Outdated
@elasticmachine

elasticmachine commented Sep 19, 2022

Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Comment thread packages/oracle/_dev/build/docs/README.md Outdated
Comment thread packages/oracle/data_stream/performance/agent/stream/stream.yml.hbs Outdated
@agithomas

Copy link
Copy Markdown
Contributor Author

@lalit-satapathy , @muthu-mps , @efd6 ,

Can you please help reviewing the recent change and approve the PR?

From your last review, below changes are made

  1. Modified datastream name from pga_sga to memory
  2. Field mapping in datastream memory modified
  3. Modified field name having percentage to pct
  4. Added screenshots of memory metrics dashboard
  5. README file wasn't displaying deep nested fields. This bug is fixed.
  6. Typos fixed.
Comment thread packages/oracle/_dev/build/docs/README.md
- name: oracle
title: Oracle Audit Logs
description: Collect Oracle Audit logs, Performance metrics, Tablespace metrics, Sysmetrics integration
description: Collect Oracle Audit logs, Performance metrics, Tablespace metrics, Sysmetrics integration, System statistics, memory metrics.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

memory metric M. Can we make this to camel case ?

- rename:
field: oracle.metrics
target_field: oracle.memory
ignore_missing: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do you consider adding ignore_failure for rest of the fields ? Because the other datastreams has ignore_failure for all the fields.

@muthu-mps
muthu-mps self-requested a review September 20, 2022 13:00

@muthu-mps muthu-mps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@agithomas
agithomas merged commit 6b46ac9 into elastic:main Sep 21, 2022
@agithomas
agithomas deleted the feature-3911 branch February 12, 2025 05:02
@andrewkroh andrewkroh added the dashboard Relates to a Kibana dashboard bug, enhancement, or modification. label Mar 13, 2025
orestisfl pushed a commit to orestisfl/integrations that referenced this pull request May 15, 2026
…s, sga metrics (elastic#3967)

* Enhancement to capture system statistics metrics, pga metrics, sga metrics. Added dashboard to capture performance metrics, system statistics metrics, pga and sga metrics.

* Added dashboard images, fixed sample files

* Fixes based on review comments

* Changes made to support the field_name changes

* Fixed the issue number

* Update packages/oracle/changelog.yml

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>

* Correct field mapping description

* Made adjustments to field names

* Modified field names

* Static testing fixes

* Field mapping changes made

* Fixed README file issues

* Changed datastream name from pga_stat to memory

* Renamed pga-sga to memory. Added screenshot

* Modified dashboard to support field name changes

* Added new dashboard screenshot

* Fixed dashboard compatibility issue, typo issues

* Removed empty line

* Added additional documentation

Co-authored-by: Dan Kortschak <90160302+efd6@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard Relates to a Kibana dashboard bug, enhancement, or modification. enhancement New feature or request Integration:oracle Oracle

7 participants