# Metricbeat Oracle module

**URL:** <https://discuss.elastic.co/t/metricbeat-oracle-module/215097>\
**Category:** Beats\
**Tags:** beats-module, metricbeat\
**Created:** [January 15, 2020, 9:00am UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097 "2020-01-15T09:00:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [January 15, 2020, 9:00am UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/1 "2020-01-15T09:00:58Z")

</div>

Hi,

I am trying to use the Metricbeat oracle module, but it seems that it requires the user to connect as a sysdba. Is there anyway for the sysdba requirement to be disabled?

I executed all queries for the tablespaces metricset without sysdba access successfully.

Thanks.

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [January 20, 2020, 12:16pm UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/2 "2020-01-20T12:16:56Z")

</div>

Hi @hendry.lim 🙂

Unless I'm wrong, `sysdba` user role is mandatory for some tables in a `12c R2` fresh Oracle instance . Can you check with a fresh Oracle instance of the version supported in Metricbeat to confirm, please?

Thanks

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [January 21, 2020, 2:40am UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/3 "2020-01-21T02:40:12Z")

</div>

Hi @Mario_Castro

I just built a new docker image using [https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance](https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance) based on [Oracle Database 12c Release 2 (12.2.0.1.0) for Linux x86-64](https://www.oracle.com/database/technologies/oracle12c-linux-12201-downloads.html).

I am able to use the Metricbeat oracle module without the `sysdba` flag with the host URL: `oracle://<host>:1521/ORCLCDB`. I was using the default `system` user.

Thank you for your reply and help.

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [January 22, 2020, 12:25pm UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/4 "2020-01-22T12:25:15Z")

</div>

I guess that if you access with any other user than `system` (which has the dba role) you'll get some permissions error. ¿Can you check? We have had questions in the past regarding the exact permissions required to use the metricset, which seems fair because a database administrator will want to have a specific user for metrics and not use the `system` user, for example.

My main concern is that, as far as I remember, we implemented that check in code because the error returned wasn't descriptive enough to figure out what was going on.

We wanted something that could help developers be "ready to go" with as much feedback from the console as possible, without having to look at the docs.

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [January 22, 2020, 1:10pm UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/5 "2020-01-22T13:10:15Z")

</div>

I understand the concern and the required permission for the access. However, it is not a really usable implementation currently, since we usually do not have user access as a sysdba. I will try to check and get back to you on the permissions given to the Oracle non-sysdba user that we are using in another environment.

Thank you.

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [January 22, 2020, 1:40pm UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/6 "2020-01-22T13:40:40Z")

</div>

Just for completeness, the required tables that are being accessed now are:

From `tablespace` metricset, tables:

- `SYS.DBA_TEMP_FILES`
- `DBA_TEMP_FREE_SPACE`
- `dba_data_files`
- `dba_free_space`

From `performance` metricset:

- `V$BUFFER_POOL_STATISTICS`
- `v$sesstat`
- `v$statname`
- `v$session`
- `v$sysstat`
- `V$LIBRARYCACHE`

Another thing worth to mention is that more metricsets will be added to this module and it's unclear which tables will be required.

Feel free to open a PR to change this, we can discuss there, with more opinions of the community, what's the best approach 🙂

---

<div class="post-metadata">

**Author:** ![hendry.lim](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hendry.lim/32/71328_2.png) [@hendry.lim](https://discuss.elastic.co/u/hendry.lim)\
**Post date:** [January 22, 2020, 2:04pm UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/7 "2020-01-22T14:04:56Z")

</div>

Yup, thank you. I have seen those tables in the code and your PR to update the docs. I replicated the whole implementation (kind of) using Logstash before I moved back to use Metricbeat after I removed the `if` block in the `connection.go`.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 19, 2020, 2:19pm UTC](https://discuss.elastic.co/t/metricbeat-oracle-module/215097/8 "2020-02-19T14:19:23Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
