-
Notifications
You must be signed in to change notification settings - Fork 556
[oracle] Enhancement to capture system statistics metrics, pga metrics, sga metrics #3967
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3359cdb
Enhancement to capture system statistics metrics, pga metrics, sga me…
agithomas 6116731
Added dashboard images, fixed sample files
agithomas 8f25af3
Fixes based on review comments
agithomas e600817
Changes made to support the field_name changes
agithomas f731214
Merge branch 'feature-3911' of github.com:agithomas/integrations into…
agithomas f65f54e
Fixed the issue number
agithomas 42bbf49
Update packages/oracle/changelog.yml
agithomas 938baed
Correct field mapping description
agithomas bd7c267
Merge branch 'feature-3911' of github.com:agithomas/integrations into…
agithomas 846b858
Made adjustments to field names
agithomas 1ebb3b6
Modified field names
agithomas f3f7963
Static testing fixes
agithomas 4ef6f57
Field mapping changes made
agithomas f45a2b4
Fixed README file issues
agithomas 6a2c2c6
Changed datastream name from pga_stat to memory
agithomas 68c2d20
Renamed pga-sga to memory. Added screenshot
agithomas d273d13
Modified dashboard to support field name changes
agithomas 54b4357
Added new dashboard screenshot
agithomas 9bb4a3a
Fixed dashboard compatibility issue, typo issues
agithomas c9f4116
Removed empty line
agithomas d17cee2
Added additional documentation
agithomas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/oracle/data_stream/memory/agent/stream/stream.yml.hbs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| metricsets: ["query"] | ||
| period: {{period}} | ||
| hosts: | ||
| {{#each hosts}} | ||
| - {{this}} | ||
| {{/each}} | ||
| raw_data.enabled: true | ||
| merge_results: true | ||
| driver: "oracle" | ||
| sql_queries: | ||
| - query: select name, value from V$PGASTAT where name in ('aggregate PGA auto target','global memory bound', 'total PGA allocated', 'total PGA used for auto workareas', 'total PGA inuse', 'maximum PGA allocated', 'total freeable PGA memory', 'cache hit percentage', 'aggregate PGA target parameter') | ||
| response_format: variables | ||
| - query: select 'sga free memory' as NAME, sum(decode(name,'free memory',bytes)) as VALUE from v$sgastat where pool = 'shared pool' union select 'sga total memory' as NAME, sum(bytes) as VALUE from v$sgastat where pool = 'shared pool' | ||
| response_format: variables |
88 changes: 88 additions & 0 deletions
88
packages/oracle/data_stream/memory/elasticsearch/ingest_pipeline/default.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| --- | ||
| description: Pipeline for processing Oracle Program Global Area and System Global Area metrics | ||
| processors: | ||
| - remove: | ||
| field: sql.driver | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - remove: | ||
| field: sql.query | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: sql | ||
| target_field: oracle | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.metrics | ||
| target_field: oracle.memory | ||
| ignore_missing: true | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| - foreach: | ||
| field: oracle.memory | ||
| ignore_missing: true | ||
| processor: | ||
| gsub: | ||
| field: "_ingest._key" | ||
| pattern: " " | ||
| replacement: "_" | ||
| - rename: | ||
| field: oracle.memory.cache_hit_percentage | ||
| target_field: oracle.memory.pga.cache_hit_pct | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.aggregate_pga_auto_target | ||
| target_field: oracle.memory.pga.aggregate_auto_target | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.aggregate_pga_target_parameter | ||
| target_field: oracle.memory.pga.aggregate_target_parameter | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.total_pga_allocated | ||
| target_field: oracle.memory.pga.total_allocated | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.total_pga_used_for_auto_workareas | ||
| target_field: oracle.memory.pga.total_used_for_auto_workareas | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.global_memory_bound | ||
| target_field: oracle.memory.pga.global_memory_bound | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.total_pga_inuse | ||
| target_field: oracle.memory.pga.total_inuse | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.total_freeable_pga_memory | ||
| target_field: oracle.memory.pga.total_freeable_memory | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.maximum_pga_allocated | ||
| target_field: oracle.memory.pga.maximum_allocated | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.sga_total_memory | ||
| target_field: oracle.memory.sga.total_memory | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
| - rename: | ||
| field: oracle.memory.sga_free_memory | ||
| target_field: oracle.memory.sga.free_memory | ||
| ignore_missing: true | ||
| ignore_failure: true | ||
|
|
||
| on_failure: | ||
| - set: | ||
| field: error.message | ||
| value: "{{ _ingest.on_failure_message }}" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| - 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. | ||
| - name: event.module | ||
| type: constant_keyword | ||
| description: Event module | ||
| value: sql | ||
| - name: event.dataset | ||
| type: constant_keyword | ||
| description: Event module | ||
| value: oracle.memory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| - external: ecs | ||
| name: host.ip | ||
| - external: ecs | ||
| name: ecs.version | ||
| - external: ecs | ||
| name: service.address | ||
| - external: ecs | ||
| name: service.type |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| - name: oracle.memory | ||
| type: group | ||
| release: beta | ||
| fields: | ||
| - name: pga | ||
| type: group | ||
| fields: | ||
| - name: total_freeable_memory | ||
| type: double | ||
| description: Number of bytes of PGA memory in all processes that could be freed back to the operating system. | ||
| unit: byte | ||
| metric_type: gauge | ||
| - name: cache_hit_pct | ||
| type: double | ||
| description: A metric computed by the Oracle Database to reflect the performance of the PGA memory component, cumulative since instance startup. | ||
| unit: percent | ||
| metric_type: gauge | ||
| - name: maximum_allocated | ||
| type: double | ||
| description: Maximum number of bytes of PGA memory allocated at one time since instance startup. | ||
| unit: byte | ||
| metric_type: gauge | ||
| - name: total_inuse | ||
| type: double | ||
| unit: byte | ||
| description: Indicates how much PGA memory is currently consumed by work areas. This number can be used to determine how much memory is consumed by other consumers of the PGA memory (for example, PL/SQL or Java). | ||
| metric_type: gauge | ||
| - name: global_memory_bound | ||
| type: double | ||
| unit: byte | ||
| description: Maximum size of a work area executed in automatic mode. | ||
| metric_type: gauge | ||
| - name: aggregate_auto_target | ||
| type: double | ||
| unit: byte | ||
| description: Amount of PGA memory the Oracle Database can use for work areas running in automatic mode. | ||
| metric_type: gauge | ||
| - name: total_allocated | ||
| type: double | ||
| unit: byte | ||
| description: Current amount of PGA memory allocated by the instance. | ||
| metric_type: gauge | ||
| - name: total_used_for_auto_workareas | ||
| type: double | ||
| unit: byte | ||
| description: Indicates how much PGA memory is currently consumed by work areas running under the automatic memory management mode. This number can be used to determine how much memory is consumed by other consumers of the PGA memory (for example, PL/SQL or Java). | ||
| metric_type: gauge | ||
| - name: aggregate_target_parameter | ||
| type: double | ||
| unit: byte | ||
| metric_type: gauge | ||
| description: Current value of the PGA_AGGREGATE_TARGET initialization parameter. If this parameter is not set, then its value is 0 and automatic management of PGA memory is disabled. | ||
| - name: sga | ||
| type: group | ||
| fields: | ||
| - name: free_memory | ||
| type: double | ||
| unit: byte | ||
| description: Amount of free memory in the Shared pool. | ||
| metric_type: gauge | ||
| - name: total_memory | ||
| type: double | ||
| unit: byte | ||
| description: Amount of total memory in the Shared pool. | ||
| metric_type: gauge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| title: "Memory metrics" | ||
| type: metrics | ||
| release: beta | ||
| streams: | ||
| - input: sql/metrics | ||
| enabled: false | ||
| title: Oracle memory metrics | ||
| description: Collect memory metrics | ||
| vars: | ||
| - name: period | ||
| type: text | ||
| title: Period | ||
| default: 60s | ||
| multi: false | ||
| show_user: true | ||
| - name: tags | ||
| type: text | ||
| title: Tags | ||
| multi: true | ||
| required: true | ||
| show_user: false | ||
| default: | ||
| - oracle_memory_metrics |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| { | ||
| "@timestamp": "2022-08-07T04:32:07.853Z", | ||
| "oracle": { | ||
| "memory": { | ||
| "pga": { | ||
| "total_inuse": 171153408, | ||
| "aggregate_auto_target": 579262464, | ||
| "total_allocated": 212888576, | ||
| "maximum_allocated": 694778880, | ||
| "total_freeable_memory": 14876672, | ||
| "global_memory_bound": 104857600, | ||
| "aggregate_target_parameter": 805306368, | ||
| "total_used_for_auto_workareas": 738304, | ||
| "cache_hit_pct": 100 | ||
| } | ||
| } | ||
| }, | ||
| "service": { | ||
| "address": "0.0.0.0:1521", | ||
| "type": "sql" | ||
| }, | ||
| "data_stream": { | ||
| "namespace": "default", | ||
| "type": "metrics", | ||
| "dataset": "oracle.memory" | ||
| }, | ||
| "metricset": { | ||
| "period": 60000, | ||
| "name": "query" | ||
| }, | ||
| "event": { | ||
| "duration": 53225246, | ||
| "agent_id_status": "verified", | ||
| "ingested": "2022-08-07T04:32:07Z", | ||
| "module": "sql", | ||
| "dataset": "oracle.memory" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.