# Metric beat oracle module configuration

**URL:** <https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673>\
**Category:** Metrics\
**Created:** [May 21, 2021, 2:31pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673 "2021-05-21T14:31:38Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrunalini](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mrunalini](https://discuss.elastic.co/u/mrunalini)\
**Post date:** [May 21, 2021, 2:31pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/1 "2021-05-21T14:31:39Z")

</div>

Hi Everyone,

I have configure my Orcacle.yml file in module.d folder with all required details ,also started the metricbeat.

Still i am not able to see anything in my my oracle dashboard .

is there any more setting i need to do .  
please suggest.

Thanks in advance,  
Mrunalini

---

<div class="post-metadata">

**Author:** ![estermv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/estermv/32/89160_2.png) [@estermv](https://discuss.elastic.co/u/estermv)\
**Post date:** [May 24, 2021, 4:30pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/2 "2021-05-24T16:30:27Z")

</div>

Hi @mrunalini ,

You can run a couple of tests to verify that everything is configured properly:

- `metricbeat test output` this will verify that Metricbeat can connect to the output

- `metricbeat test modules` to test your modules settings. You can also run `metricbeat test modules oracle` to test only the oracle module.

After that, you can also run `metricbeat setup` that sets up the initial environment.

Let me know if this helps or you've already done this and you still don't see any data.

---

<div class="post-metadata">

**Author:** ![mrunalini](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mrunalini](https://discuss.elastic.co/u/mrunalini)\
**Post date:** [May 25, 2021, 2:11pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/3 "2021-05-25T14:11:04Z")

</div>

Hi @estermv

Thanks for response.

I am not sure about exact error:

I am getting 2 different error by running two different command as below

1. journalctl -xe | grep 'metricbeat'

Error fetching data for metricset oracle.tablespace: error creating connection to Oracle: error doing ping to database: ORA-00000: DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory".

1. metricbeat test modules oracle

tablespace...  
error... ERROR error getting or interpreting data from Oracle: error extracting data: error getting data\_files: error executing query: dpiStmt\_execute: ORA-00942: table or view does not exist  
performance...  
error... ERROR error extracting data: error getting buffer cache hit ratio: error executing query: dpiStmt\_execute: ORA-00942: table or view does not exist

can you please explain why there is difference.

Thanks and regards,  
Mrunalini

---

<div class="post-metadata">

**Author:** ![mrunalini](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mrunalini](https://discuss.elastic.co/u/mrunalini)\
**Post date:** [May 26, 2021, 1:43pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/4 "2021-05-26T13:43:50Z")

</div>

HI @estermv ,

can you please respond.

---

<div class="post-metadata">

**Author:** ![estermv](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/estermv/32/89160_2.png) [@estermv](https://discuss.elastic.co/u/estermv)\
**Post date:** [May 26, 2021, 3:08pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/5 "2021-05-26T15:08:57Z")

</div>

I asked some colleagues to look into this since I'm not familiar with the Oracle module

---

<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:** [May 26, 2021, 3:09pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/6 "2021-05-26T15:09:21Z")

</div>

Thanks for the heads up Ester 🙂

Hi @mrunalini 🙂

What's your Oracle version and how your configuration looks like? Can you paste it here in markdown format, please?

---

<div class="post-metadata">

**Author:** ![mrunalini](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mrunalini](https://discuss.elastic.co/u/mrunalini)\
**Post date:** [May 26, 2021, 5:36pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/7 "2021-05-26T17:36:04Z")

</div>

Hi @Mario_Castro ,

My oracle version is 12c.  
I have installed oracle instant client - instantclient-basic-linux.x64-21.1  
My Os where metric-beat installed is RHEL Linux 7.3

we have below oracle module configured:

- module: oracle  
metricsets: ["tablespace", "performance"]  
enabled: true  
period: 10s  
hosts: ["oracle://host:IP/Servicename"]  
username: "User"  
password: "pass"

Please let me know what else is missing ?

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:** [May 27, 2021, 11:08am UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/8 "2021-05-27T11:08:49Z")

</div>

Ok so your Oracle version seems to be supported, good 😄 You instant client might be too updated and I'd try with v18.5 which is the tested version. I think I have manualled tested v19 too but check, just in case.

This looks like some error setting up the environment `Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory` Follow closely the instructions [here](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-oracle.html) (including setting up the `LD_LIBRARY_PATH` envar) and check the permissions for each metricset [here](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-oracle-performance.html) and [here](https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-metricset-oracle-tablespace.html).

---

<div class="post-metadata">

**Author:** ![mrunalini](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mrunalini](https://discuss.elastic.co/u/mrunalini)\
**Post date:** [May 27, 2021, 11:44am UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/9 "2021-05-27T11:44:13Z")

</div>

Hi @Mario_Castro ,

Thanks for reply !!

Sure i will try changic oracle client.

But , As mentioned on Elastic official page ,does my user need to have access to below tables connect metrics:

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

SYS.DBA_TEMP_FILES
DBA_TEMP_FREE_SPACE
dba_data_files
dba_free_space

```

As this are system table my user does not have this access

so is this can be problem?

Thanks and regards ,  
mrunalini

---

<div class="post-metadata">

**Author:** ![mrunalini](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mrunalini](https://discuss.elastic.co/u/mrunalini)\
**Post date:** [May 28, 2021, 5:39pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/10 "2021-05-28T17:39:25Z")

</div>

Hi @Mario_Castro ,

I installed OCI 18.5 version on my system,still getting same error ,below is my Environment variable value:  
$LD\_LIBRARY\_PATH - /usr/lib/instantclient\_18\_5

Can you please help me find the issue here.

Thanks and regards,  
Mrunalini Sinnarkar

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [May 28, 2021, 7:51pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/11 "2021-05-28T19:51:07Z")

</div>

Hi @mrunalini  
Assuming you are using `systemctl` it will not pick up that environment variable.

See [here](https://www.elastic.co/guide/en/beats/metricbeat/current/running-with-systemd.html#_customize_systemd_unit_for_metricbeat)

You need to add a drop in conf like described in the documents above or add it using the method below using `systemctl` edit

```
systemctl edit metricbeat.service

```

```auto
 [Service]
 # Client Env Vars
 Environment=ORACLE_HOME=/path/to/oracle

```

You might need to add ORACLE\_HOME and / or LD\_LIBRARY\_PATH

These processes are not uncommon for system services

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [May 28, 2021, 9:20pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/12 "2021-05-28T21:20:34Z")

</div>

or you can do following

vi /etc/ld.so.conf.d/\*  
add following line in end. ( I have 1.2 client and proper path, this is my example, you do your path)

/usr/lib/oracle/12.2/client64/lib/

Then run ldconfig

---

<div class="post-metadata">

**Author:** ![mrunalini](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@mrunalini](https://discuss.elastic.co/u/mrunalini)\
**Post date:** [June 2, 2021, 11:06am UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/13 "2021-06-02T11:06:32Z")

</div>

Hi @stephenb ,

I think the solution u suggested has worked .  
But our User seems to not having access to system table that's we are facing :"Table or view does not exist."

I wanted to ask Does oracle metricset configured for "Username/Password " expiry alert.

We need to set alerts for password expiry of users from Oracle DB ,is it possible?

Please help with above requirement.

---

<div class="post-metadata">

**Author:** ![elasticforme](https://avatars.discourse-cdn.com/v4/letter/e/f05b48/32.png) [@elasticforme](https://discuss.elastic.co/u/elasticforme)\
**Post date:** [June 2, 2021, 12:55pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/14 "2021-06-02T12:55:52Z")

</div>

that username/password is on oracle side. ELK has nothing to do with it. and no there is no alert for that. you can tackle this two way.

from oracle side write bash script to find out if username is locked or expire  
from ELK side check the count of document in last X minute and if they are zero then alert because that means your logstash which is ingesting data is not working.

---

<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:** [June 30, 2021, 12:56pm UTC](https://discuss.elastic.co/t/metric-beat-oracle-module-configuration/273673/15 "2021-06-30T12:56:32Z")

</div>

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