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!

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...