Oracle Modules

Hi
we are testing this module for metricbeat (v7.5.0) that work with standard OCI driver.

We installed/tested the following :

  • enable the module
  • instant client (as per doc)
  • modify the systemd script to load the ENV var
  • tested manual connection with oracle tool

but we receive the same errors on data ingested :

oracle://<..user..>:<..pwd..>@<..host..>:1521/<..sid..>?sysdba=1

error creating connection to Oracle: error doing ping to database: username="xxxxxxxx" sid="xxxxxx" params={authMode:2 connectionClass:0x7f42740a9240 connectionClassLength:7 purity:0 newPassword: newPasswordLength:0 appContext: numAppContext:0 externalAuth:0 externalHandle: pool: tag: tagLength:0 matchAnyTag:0 outTag: outTagLength:0 outTagFound:0 shardingKeyColumns: numShardingKeyColumns:0 superShardingKeyColumns: numSuperShardingKeyColumns:0 outNewSession:0}: ORA-01017: invalid username/password; logon denied

Some suggestions ?

Could you please share your configuration formatted using </>? Also, please share the debug logs (./metricbeat -e -d "*")?

[root@server metricbeat]# metricbeat modules list
Enabled:
oracle
system

  • module: oracle
    metricsets: ["tablespace","performance"]
    enabled: true
    period: 30s
    hosts: ["oracle://:@:1521/sid?sysdba=1"]

    fields:
    application.name: app-db

2020-04-29T14:44:23.096Z INFO instance/beat.go:610 Home path: [/usr/share/metricbeat] Config path: [
/etc/metricbeat] Data path: [/var/lib/metricbeat] Logs path: [/var/log/metricbeat]
2020-04-29T14:44:23.096Z DEBUG [beat] instance/beat.go:662 Beat metadata path: /var/lib/metricbeat/m
eta.json
2020-04-29T14:44:23.096Z INFO instance/beat.go:618 Beat ID: 9d3da00d-7665-4db3-a423-9501a5e16afd
2020-04-29T14:44:23.099Z DEBUG [filters] add_cloud_metadata/providers.go:126 add_cloud_metadat
a: starting to fetch metadata, timeout=3s
2020-04-29T14:44:26.099Z DEBUG [filters] add_cloud_metadata/providers.go:162 add_cloud_metadat
a: received disposition for az after 3.000442219s. result=[provider:az, error=failed requesting az metadata: Get
http://169.254.169.254/metadata/instance/compute?api-version=2017-04-02: dial tcp 169.254.169.254:80: i/o timeout
, metadata={}]
2020-04-29T14:44:26.099Z DEBUG [filters] add_cloud_metadata/providers.go:169 add_cloud_metadat
a: timed-out waiting for all responses
2020-04-29T14:44:26.099Z DEBUG [filters] add_cloud_metadata/providers.go:129 add_cloud_metadat
a: fetchMetadata ran for 3.000700115s
2020-04-29T14:44:26.099Z INFO add_cloud_metadata/add_cloud_metadata.go:89 add_cloud_metadata: hosti
ng provider type not detected.
2020-04-29T14:44:26.099Z DEBUG [processors] processors/processor.go:101 Generated new processors:
add_host_metadata=[netinfo.enabled=[false], cache.ttl=[5m0s]], add_cloud_metadata=null

The log that I pushed before was inside the event.dataset in kibana dashboard.

BR

In the environment we set

Environment="ORACLE_BASE="/orabin/app/oracle"
Environment="ORA_RDBMS_HOME="/orabin/app/oracle/product/18.0.0/dbhome_1"
Environment="ORA_GRID_HOME="/orabin/app/18.0.0/grid"
Environment="ORA_AG_HOME="/orabin/app/oracle/agent/agent_13.4.0.0.0"
Environment="ORACLE_SID=name1"
Environment="ORA_DB_NAME=name"
Environment="ORACLE_HOME=/orabin/app/oracle/product/18.0.0/dbhome_1"
Environment="TNS_ADMIN=/orabin/app/oracle/product/18.0.0/dbhome_1/network/admin"
Environment="PATH=/etc/metricbeat/instantclient/instantclient_18_5:/orabin/app/oracle/product/18.0.0/dbhome_1/bin:/orabin/app/oracle/product/18.0.0/dbhome_1/OPatch:/orabin/app/18.0.0/grid/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/puppetlabs/bin:/orabin/app/oracle/product/18.0.0/dbhome_1/network/admin"
Environment="LD_LIBRARY_PATH=/etc/metricbeat/instantclient/instantclient_18_5:/orabin/app/oracle/product/18.0.0/dbhome_1/bin:/orabin/app/oracle/product/18.0.0/dbhome_1/OPatch:/orabin/app/18.0.0/grid/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/opt/puppetlabs/bin:/orabin/app/oracle/product/18.0.0/dbhome_1/network/admin"

and test also via sqlplus the auth.

BR

Seems that in the field sid on kibana side there is

sid="db_host:dp_port/service" and not only the sid.

Any idea ?

1 Like

Seems that the problem was on sysdba user.

We have removed the hard requirement to connect as sysdba in 7.8. However, you'll still need proper permissions to access the system tables.

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