Splunk Observability Cloud

basicauth extension while monitoring oracledb using Splunk Otel

sagar-yakkundi
Explorer

Hi,

Instead of passing the username and password in a plain text format, I was trying the basicauth extension for authentication and monitoring the oracledb and require some assistance, as after adding the below details in the agent_config.yml , The splunk otel collector is not starting up and am seeing error.

Kindy help.

In agent_config.yml

extensions:
   basicauth:
   htpasswd:
       file: /etc/otel/collector/.htpasswd

receivers:
  oracledb/demo:
  protocols:
     http:
       auth:
          authenticator: basicauth
   endpoint: <hostname:port>
   service: <DBname>

service:
   metrics:
       receivers: [oracledb/demo]

 

Error in the logs

Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: 2024/01/10 22:25:06 settings.go:441: Set config to /etc/otel/collector/agent_config.yaml
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: 2024/01/10 22:25:06 settings.go:489: Set ballast to 168 MiB
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: 2024/01/10 22:25:06 settings.go:505: Set memory limit to 460 MiB
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: 2024/01/10 22:25:06 settings.go:396: set "SPLUNK_LISTEN_INTERFACE" to "127.0.0.1"
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: Error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: * error decoding 'receivers': error reading configuration for "oracledb/demo": 1 error(s) decoding:
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: * '' has invalid keys: protocols
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: 2024/01/10 22:25:06 main.go:94: application run finished with error: failed to get config: cannot unmarshal the configuration: 1 error(s) decoding:
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: * error decoding 'receivers': error reading configuration for "oracledb/demo": 1 error(s) decoding:
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au otelcol[3680562]: * '' has invalid keys: protocols
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au systemd[1]: splunk-otel-collector.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au systemd[1]: splunk-otel-collector.service: Failed with result 'exit-code'.
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au systemd[1]: splunk-otel-collector.service: Service RestartSec=100ms expired, scheduling restart.
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au systemd[1]: splunk-otel-collector.service: Scheduled restart job, restart counter is at 3.
Jan 10 22:25:06 azlspkasd00003.wowcorp.com.au systemd[1]: Stopped Splunk OpenTelemetry Collector

Tags (1)
0 Karma
1 Solution

bishida
Splunk Employee
Splunk Employee

Hi,

Probably worth mentioning--the oracledb receiver is not something that is accessed with http, so you don't want to try to use ".htaccess". You need to use a service account within oracle that has some basic grant privileges. The receiver connects to your Oracle DB and pulls out the metrics for monitoring. The config for this will look like this:

receivers:
  oracledb:
    datasource: "oracle://USERNAME:PASSWORD@HOST:PORT/DATABASE"

https://docs.splunk.com/observability/en/gdi/opentelemetry/components/oracledb-receiver.html

View solution in original post

0 Karma

bishida
Splunk Employee
Splunk Employee

Hi,

Probably worth mentioning--the oracledb receiver is not something that is accessed with http, so you don't want to try to use ".htaccess". You need to use a service account within oracle that has some basic grant privileges. The receiver connects to your Oracle DB and pulls out the metrics for monitoring. The config for this will look like this:

receivers:
  oracledb:
    datasource: "oracle://USERNAME:PASSWORD@HOST:PORT/DATABASE"

https://docs.splunk.com/observability/en/gdi/opentelemetry/components/oracledb-receiver.html

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...