iamseth / oracledb_exporter

Prometheus Oracle database exporter.
MIT License
489 stars 236 forks source link

Oracledb_exporter is not started -Failed to start Service for oracle telemetry client. #258

Open prashantnitt07 opened 1 year ago

prashantnitt07 commented 1 year ago

Dear All, I have run oracledb_exporter as systemctl services , getting error.

service detail : [Unit] Description=Service for oracle telemetry client After=network.target [Service] Type=oneshot Environment="DATA_SOURCE_NAME=user/pwd@//ip:1527/GBSNPRD?connect_timeout=5&transport_connect_timeout=3&retry_count=3" Environment="LD_LIBRARY_PATH=/rdbms/app/oracle/19c/db/lib"" Environment="ORACLE_HOME=/rdbms/app/oracle/19c/db" Environment="CUSTOM_METRICS=/etc/oracledb_exporter/custom-metrics.toml" ExecStart=/usr/local/bin/oracledb_exporter \ --default.metrics "/etc/oracledb_exporter/default-metrics.toml" \ --log.level error --web.listen-address 0.0.0.0:9161 [Install] WantedBy=multi-user.target

---error -------------- sudo systemctl status oracledb_exporter ● oracledb_exporter.service - Service for oracle telemetry client Loaded: loaded (/etc/systemd/system/oracledb_exporter.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2022-11-29 02:25:13 EST; 12s ago Process: 3118158 ExecStart=/usr/local/bin/oracledb_exporter --default.metrics /etc/oracledb_exporter/default-metrics.toml --log.level error --web.listen-address 0.0.> Main PID: 3118158 (code=exited, status=2)

systemd[1]: Starting Service for oracle telemetry client... oracledb_exporter[3118158]: panic: OCIEnvCreate error oracledb_exporter[3118158]: goroutine 1 [running]: oracledb_exporter[3118158]: github.com/mattn/go-oci8.init.0() oracledb_exporter[3118158]: /home/travis/gopath/pkg/mod/github.com/mattn/go-oci8@v0.0.8/globals.go:177 +0x511 systemd[1]: oracledb_exporter.service: Main process exited, code=exited, status=2/INVALIDARGUMENT systemd[1]: oracledb_exporter.service: Failed with result 'exit-code'. systemd[1]: Failed to start Service for oracle telemetry client.

markthebro commented 1 year ago

Same here - I already tried to compile it using Oracle 19.17 on a dev-machine -> NOK. I also tried to compile it in a static way since I do'nt want to install go on every machine - I'd like to have only one binary....

prashantnitt07 commented 1 year ago

please update , any options for monitor oracle qurey by promehteus

manotoshroy commented 1 year ago

It seems you are trying to run the exporter on the same host where your DB is installed. I installed the exporter on a separate Linux system and I could scrape the data from the Oracle DB. I have set the LD_LIBRARY_PATH to the oracle_instant_client binary folder. Try with oracle instant client