{"id":19865936,"url":"https://github.com/iamseth/oracledb_exporter","last_synced_at":"2025-11-07T07:30:34.137Z","repository":{"id":37622735,"uuid":"66402547","full_name":"iamseth/oracledb_exporter","owner":"iamseth","description":"Prometheus Oracle database exporter.","archived":false,"fork":false,"pushed_at":"2025-01-17T22:46:48.000Z","size":887,"stargazers_count":503,"open_issues_count":115,"forks_count":237,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-02-11T17:50:59.678Z","etag":null,"topics":["monitoring","oracle","oracle-database","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamseth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-23T20:54:49.000Z","updated_at":"2025-01-28T09:49:56.000Z","dependencies_parsed_at":"2023-11-22T07:29:33.488Z","dependency_job_id":"5b562bd4-c968-4dcf-9a8b-47b339a91bdf","html_url":"https://github.com/iamseth/oracledb_exporter","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamseth%2Foracledb_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamseth%2Foracledb_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamseth%2Foracledb_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamseth%2Foracledb_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamseth","download_url":"https://codeload.github.com/iamseth/oracledb_exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239523508,"owners_count":19652948,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["monitoring","oracle","oracle-database","prometheus","prometheus-exporter"],"created_at":"2024-11-12T15:24:35.624Z","updated_at":"2025-11-07T07:30:34.072Z","avatar_url":"https://github.com/iamseth.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Oracle DB Exporter\n\n[![Build Status](https://travis-ci.org/iamseth/oracledb_exporter.svg)](https://travis-ci.org/iamseth/oracledb_exporter)\n[![GoDoc](https://godoc.org/github.com/iamseth/oracledb_exporter?status.svg)](http://godoc.org/github.com/iamseth/oracledb_exporter)\n[![Report card](https://goreportcard.com/badge/github.com/iamseth/oracledb_exporter)](https://goreportcard.com/badge/github.com/iamseth/oracledb_exporter)\n\n\u003e [!WARNING]\n\u003e Oracle now has an official project [oracle-db-appdev-monitoring](https://github.com/oracle/oracle-db-appdev-monitoring). Please checkout that project as this one is no longer maintained.\n\n##### Table of Contents\n\n[Description](#description)\n[Installation](#installation)\n[Running](#running)\n[Usage](#usage)\n[Grafana](#integration-with-grafana)\n[Build](#build)\n[Troubleshooting](#faqtroubleshooting)\n[Operating principles](operating-principles.md)\n\n## Description\n\nA [Prometheus](https://prometheus.io/) exporter for Oracle modeled after the MySQL exporter. I'm not a DBA or seasoned Go developer so PRs definitely welcomed.\n\nThe following metrics are exposed currently.\n\n- oracledb_exporter_last_scrape_duration_seconds\n- oracledb_exporter_last_scrape_error\n- oracledb_exporter_scrapes_total\n- oracledb_up\n- oracledb_activity_execute_count\n- oracledb_activity_parse_count_total\n- oracledb_activity_user_commits\n- oracledb_activity_user_rollbacks\n- oracledb_sessions_activity\n- oracledb_wait_time_application\n- oracledb_wait_time_commit\n- oracledb_wait_time_concurrency\n- oracledb_wait_time_configuration\n- oracledb_wait_time_network\n- oracledb_wait_time_other\n- oracledb_wait_time_scheduler\n- oracledb_wait_time_system_io\n- oracledb_wait_time_user_io\n- oracledb_tablespace_bytes\n- oracledb_tablespace_max_bytes\n- oracledb_tablespace_free_bytes\n- oracledb_tablespace_used_percent\n- oracledb_process_count\n- oracledb_resource_current_utilization\n- oracledb_resource_limit_value\n\n## Installation\n\n### Docker / Podman\n\nYou can run via Docker/Podman using an existing image. Since version 0.4, the images are available on the github registry.\n\nHere an example to retrieve the version 0.5.0:\n\n```bash\ndocker pull ghcr.io/iamseth/oracledb_exporter:0.5.0\n```\n\nAnd here a command to run it and forward the port:\n\n```bash\ndocker run -it --rm -p 9161:9161 ghcr.io/iamseth/oracledb_exporter:0.5.0\n```\n\nIf you don't already have an Oracle server, you can run one locally in a container and then link the exporter to it.\n\n```bash\ndocker run -d --name oracle -p 1521:1521 wnameless/oracle-xe-11g-r2:18.04-apex\ndocker run -d --name oracledb_exporter --link=oracle -p 9161:9161 -e DATA_SOURCE_NAME=oracle://system:oracle@oracle:1521/xe ghcr.io/iamseth/oracledb_exporter:0.5.0\n```\n\nSince 0.2.1, the exporter image exist with Alpine flavor. Watch out for their use. It is for the moment a test.\n\n```bash\ndocker run -d --name oracledb_exporter --link=oracle -p 9161:9161 -e DATA_SOURCE_NAME=oracle://system:oracle@oracle/xe iamseth/oracledb_exporter:alpine\n```\n\n### Different Docker Images\n\nDifferent Linux Distros:\n\n- `x.y.z` - Ubuntu Linux image\n- `x.y.z-oraclelinux` - Oracle Enterprise Linux image\n- `x.y.z-Alpine` - Alpine Linux image\n- `x.y.z-scratch` - Scratch image\n\nForked Version:\nAll the above docker images have a duplicate image tag ending in\n`_legacy-tablespace`. These versions use the older/deprecated tablespace\nutilization calculation based on the aggregate sum of file sizes in a given\ntablespace. The newer mechanism takes into account block sizes, extents, and\nfragmentation aligning with the same metrics reported from the Oracle Enterprise\nManager. See https://github.com/iamseth/oracledb_exporter/issues/153 for\ndetails. The versions above should have a more useful tablespace utilization\ncalculation going forward.\n\n### Binary Release\n\nPre-compiled versions for Linux 64 bit and Mac OSX 64 bit can be found under [releases](https://github.com/iamseth/oracledb_exporter/releases).\n\nIn order to run, you'll need the [Oracle Instant Client Basic](http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html)\nfor your operating system. Only the basic version is required for execution.\n\n## Running\nEnsure that the environment variable DATA_SOURCE_NAME is set correctly before starting.\nDATA_SOURCE_NAME should be in Oracle Database connection string format:\n\n```conn\n    oracle://user:pass@server/service_name[?OPTION1=VALUE1[\u0026OPTIONn=VALUEn]...]\n```\n\nFor Example:\n\n```bash\n# export Oracle location:\nexport DATA_SOURCE_NAME=oracle://system:password@oracle-sid\n# or using a complete url:\nexport DATA_SOURCE_NAME=oracle://user:password@myhost:1521/service\n# 19c client for primary/standby configuration\nexport DATA_SOURCE_NAME=oracle://user:password@primaryhost:1521,standbyhost:1521/service\n# 19c client for primary/standby configuration with options\nexport DATA_SOURCE_NAME=oracle://user:password@primaryhost:1521,standbyhost:1521/service?connect_timeout=5\u0026transport_connect_timeout=3\u0026retry_count=3\n# 19c client for ASM instance connection (requires SYSDBA)\nexport DATA_SOURCE_NAME=oracle://user:password@primaryhost:1521,standbyhost:1521/+ASM?as=sysdba\n# Then run the exporter\n/path/to/binary/oracledb_exporter --log.level error --web.listen-address 0.0.0.0:9161\n```\n\nVersion 0.5+ of the exporter is using a go lang driver that don't need the binaries from Oracle. As a side effect, you must transform your string version in order to be compatible with this driver.\n\nBasicaly, it consist to follow this convention:\n- Add a string `oracle://` in front of the string\n- Replace the slash (`/`) between user and password by a colon (`:`)\n- special characters should be url-escaped, like in this jinja example template: `{{ password|urlencode()|regex_replace('/','%2F') }}`\n\nHere is some example:\n\n| Old string format                   | New string format                            |\n|-------------------------------------|----------------------------------------------|\n| `system/password@oracle-sid`        | `oracle://system:password@oracle-sid`        |\n| `user/password@myhost:1521/service` | `oracle://user:password@myhost:1521/service` |\n\n### Default-metrics requirement\nMake sure to grant `SYS` privilege on `SELECT` statement for the monitoring user, on the following tables.\n```\ndba_tablespace_usage_metrics\ndba_tablespaces\nv$system_wait_class\nv$asm_diskgroup_stat\nv$datafile\nv$sysstat\nv$process\nv$waitclassmetric\nv$session\nv$resource_limit\n```\n\n### Integration with System D\n\nCreate `oracledb_exporter` user with disabled login and `oracledb_exporter` group then run the following commands:\n\n```bash\nmkdir /etc/oracledb_exporter\nchown root:oracledb_exporter /etc/oracledb_exporter\nchmod 775 /etc/oracledb_exporter\nPut config files to **/etc/oracledb_exporter**\nPut binary to **/usr/local/bin**\n```\n\nCreate file **/etc/systemd/system/oracledb_exporter.service** with the following content:\n\n```\n[Unit]\nDescription=Service for oracle telemetry client\nAfter=network.target\n[Service]\nType=oneshot\n#!!! Set your values and uncomment\n#User=oracledb_exporter\n#Environment=\"CUSTOM_METRICS=/etc/oracledb_exporter/custom-metrics.toml\"\nExecStart=/usr/local/bin/oracledb_exporter  \\\n  --default.metrics \"/etc/oracledb_exporter/default-metrics.toml\"  \\\n  --log.level error --web.listen-address 0.0.0.0:9161\n[Install]\nWantedBy=multi-user.target\n```\n\nTell System D to refresh:\n\n    systemctl daemon-reload\n\nStart this new service:\n\n    systemctl start oracledb_exporter\n\nCheck service status:\n\n    systemctl status oracledb_exporter\n\n## Usage\n\n```bash\nUsage of oracledb_exporter:\n  --log.format value\n       \tIf set use a syslog logger or JSON logging. Example: logger:syslog?appname=bob\u0026local=7 or logger:stdout?json=true. Defaults to stderr.\n  --log.level value\n       \tOnly log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal].\n  --custom.metrics string\n        File that may contain various custom metrics in a toml or yaml format.\n  --default.metrics string\n        Default metrics file in a toml or yaml format.\n  --web.systemd-socket\n        Use systemd socket activation listeners instead of port listeners (Linux only).\n  --web.listen-address string\n       \tAddress to listen on for web interface and telemetry. (default \":9161\")\n  --web.telemetry-path string\n       \tPath under which to expose metrics. (default \"/metrics\")\n  --database.maxIdleConns string\n        Number of maximum idle connections in the connection pool. (default \"0\")\n  --database.maxOpenConns string\n        Number of maximum open connections in the connection pool. (default \"10\")\n  --database.dsn string\n        Connection string to a data source. (default \"env: DATA_SOURCE_NAME\")\n  --database.dsnFile string\n        File to read a string to a data source from. (default \"env: DATA_SOURCE_NAME_FILE\")        \n  --web.config.file\n        Path to configuration file that can enable TLS or authentication.\n  --query.timeout\n        Query timeout (in seconds). (default \"5\")\n  --scrape.interval\n        Interval between each scrape. Default \"0s\" is to scrape on collect requests\n```\n\n### Default metrics config file\n\nThis exporter comes with a set of default metrics: [**default-metrics.toml**](./default-metrics.toml)/[**default-metrics.yaml**](./default-metrics.yaml).\\\nYou can modify this file or provide a different one using `default.metrics` option.\n\n### Custom metrics config file\n\n\u003e NOTE: Do not put a `;` at the end of your SQL queries as this will **NOT** work.\n\nThis exporter does not have the metrics you want? You can provide new one using custom metrics config file in a toml or yaml format. To specify this file to the\nexporter, you can:\n\n- Use `--custom.metrics` flag followed by your custom config file\n- Export CUSTOM_METRICS variable environment (`export CUSTOM_METRICS=\u003cpath-to-custom-configfile\u003e`)\n\n### Config file TOML syntax\n\nThe file must contain the following elements:\n\n- One or several metric section (`[[metric]]`)\n- For each section a context, a request and a map between a field of your request and a comment.\n\nHere's a simple example:\n\n```\n[[metric]]\ncontext = \"test\"\nrequest = \"SELECT 1 as value_1, 2 as value_2 FROM DUAL\"\nmetricsdesc = { value_1 = \"Simple example returning always 1.\", value_2 = \"Same but returning always 2.\" }\n```\n\nThis file produce the following entries in the exporter:\n\n```\n# HELP oracledb_test_value_1 Simple example returning always 1.\n# TYPE oracledb_test_value_1 gauge\noracledb_test_value_1 1\n# HELP oracledb_test_value_2 Same but returning always 2.\n# TYPE oracledb_test_value_2 gauge\noracledb_test_value_2 2\n```\n\nYou can also provide labels using labels field. Here's an example providing two metrics, with and without labels:\n\n```\n[[metric]]\ncontext = \"context_no_label\"\nrequest = \"SELECT 1 as value_1, 2 as value_2 FROM DUAL\"\nmetricsdesc = { value_1 = \"Simple example returning always 1.\", value_2 = \"Same but returning always 2.\" }\n\n[[metric]]\ncontext = \"context_with_labels\"\nlabels = [ \"label_1\", \"label_2\" ]\nrequest = \"SELECT 1 as value_1, 2 as value_2, 'First label' as label_1, 'Second label' as label_2 FROM DUAL\"\nmetricsdesc = { value_1 = \"Simple example returning always 1.\", value_2 = \"Same but returning always 2.\" }\n```\n\nThis TOML file produce the following result:\n\n```\n# HELP oracledb_context_no_label_value_1 Simple example returning always 1.\n# TYPE oracledb_context_no_label_value_1 gauge\noracledb_context_no_label_value_1 1\n# HELP oracledb_context_no_label_value_2 Same but returning always 2.\n# TYPE oracledb_context_no_label_value_2 gauge\noracledb_context_no_label_value_2 2\n# HELP oracledb_context_with_labels_value_1 Simple example returning always 1.\n# TYPE oracledb_context_with_labels_value_1 gauge\noracledb_context_with_labels_value_1{label_1=\"First label\",label_2=\"Second label\"} 1\n# HELP oracledb_context_with_labels_value_2 Same but returning always 2.\n# TYPE oracledb_context_with_labels_value_2 gauge\noracledb_context_with_labels_value_2{label_1=\"First label\",label_2=\"Second label\"} 2\n```\n\nLast, you can set metric type using **metricstype** field.\n\n```\n[[metric]]\ncontext = \"context_with_labels\"\nlabels = [ \"label_1\", \"label_2\" ]\nrequest = \"SELECT 1 as value_1, 2 as value_2, 'First label' as label_1, 'Second label' as label_2 FROM DUAL\"\nmetricsdesc = { value_1 = \"Simple example returning always 1 as counter.\", value_2 = \"Same but returning always 2 as gauge.\" }\n# Can be counter or gauge (default)\nmetricstype = { value_1 = \"counter\" }\n```\n\nThis TOML file will produce the following result:\n\n```\n# HELP oracledb_context_with_labels_value_1 Simple example returning always 1 as counter.\n# TYPE oracledb_context_with_labels_value_1 counter\noracledb_context_with_labels_value_1{label_1=\"First label\",label_2=\"Second label\"} 1\n# HELP oracledb_context_with_labels_value_2 Same but returning always 2 as gauge.\n# TYPE oracledb_context_with_labels_value_2 gauge\noracledb_context_with_labels_value_2{label_1=\"First label\",label_2=\"Second label\"} 2\n\n```\n\nYou can find [here](./custom-metrics-example/custom-metrics.toml) a working example of custom metrics for slow queries, big queries and top 100 tables.\n\n### Config file YAML syntax\n\nyaml format has the same as the above requirements regarding optional and mandatory fields and their meaning, but needs a root element `metric`:\n```yaml\nmetrics:\n- context: \"context_with_labels\"\n  labels: [label_1,label_2]\n  metricsdesc:\n    value_1: \"Simple example returning always 1 as counter.\"\n    value_2: \"Same but returning always 2 as gauge.\"\n  request: \"SELECT 'First label' as label_1, 'Second label' as label_2,\n    1 as value_1, 2 as value_2\n    FROM DUAL\"\n  metricstype:\n    value_1: \"counter\"\n```\n\nFor more practical examples, see [custom-metrics.yaml](./custom-metrics-example/custom-metrics.yaml)\n### Customize metrics in a docker image\n\nIf you run the exporter as a docker image and want to customize the metrics, you can use the following example:\n\n```Dockerfile\nFROM iamseth/oracledb_exporter:latest\n\nCOPY custom-metrics.toml /\n\nENTRYPOINT [\"/oracledb_exporter\", \"--custom.metrics\", \"/custom-metrics.toml\"]\n```\n\n### Using a multiple host data source name\n\n\u003e NOTE: This has been tested with v0.2.6a and will most probably work on versions above.\n\n\u003e NOTE: While `user/password@//database1.example.com:1521,database3.example.com:1521/DBPRIM` works with SQLPlus, it doesn't seem to work with oracledb-exporter v0.2.6a.\n\nIn some cases, one might want to scrape metrics from the currently available database when having a active-passive replication setup.\n\nThis will try to connect to any available database to scrape for the metrics. With some replication options, the secondary database is not available when replicating. This allows the scraper to automatically fall back in case of the primary one failing.\n\nThis example allows to achieve this:\n\n### Files \u0026 Folder:\n\n- tns_admin folder: `/path/to/tns_admin`\n- tnsnames.ora file: `/path/to/tns_admin/tnsnames.ora`\n\nExample of a tnsnames.ora file:\n\n```\ndatabase =\n(DESCRIPTION =\n  (ADDRESS_LIST =\n    (ADDRESS = (PROTOCOL = TCP)(HOST = database1.example.com)(PORT = 1521))\n    (ADDRESS = (PROTOCOL = TCP)(HOST = database2.example.com)(PORT = 1521))\n  )\n  (CONNECT_DATA =\n    (SERVICE_NAME = DBPRIM)\n  )\n)\n```\n\n### Environment Variables\n\n- `TNS_ENTRY`: Name of the entry to use (`database` in the example file above)\n- `TNS_ADMIN`: Path you choose for the tns admin folder (`/path/to/tns_admin` in the example file above)\n- `DATA_SOURCE_NAME`: Datasource pointing to the `TNS_ENTRY` (`user:password@database` in the example file above)\n\n### TLS connection to database\n\nFirst, set the following variables:\n\n    export WALLET_PATH=/wallet/path/to/use\n    export TNS_ENTRY=tns_entry\n    export DB_USERNAME=db_username\n    export TNS_ADMIN=/tns/admin/path/to/use\n\nCreate the wallet and set the credential:\n\n    mkstore -wrl $WALLET_PATH -create\n    mkstore -wrl $WALLET_PATH -createCredential $TNS_ENTRY $DB_USERNAME\n\nThen, update sqlnet.ora:\n\n    echo \"\n    WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = $WALLET_PATH )))\n    SQLNET.WALLET_OVERRIDE = TRUE\n    SSL_CLIENT_AUTHENTICATION = FALSE\n    \" \u003e\u003e $TNS_ADMIN/sqlnet.ora\n\nTo use the wallet, use the wallet_location parameter. You may need to disable ssl verification with the\nssl_server_dn_match parameter.\n\nHere a complete example of string connection:\n\n    DATA_SOURCE_NAME=oracle://username:password@server:port/service?ssl_server_dn_match=false\u0026wallet_location=wallet_path\n\nFor more details, have a look at the following location: https://github.com/iamseth/oracledb_exporter/issues/84\n\n## Integration with Grafana\n\nAn example Grafana dashboard is available [here](https://grafana.com/grafana/dashboards/3333-oracledb/).\n\n## Build\n\n### Docker/Podman build\n\nTo build Ubuntu and Alpine image, run the following command:\n\n    make docker\n\nYou can also build only Ubuntu image:\n\n    make ubuntu-image\n\nOr Alpine:\n\n    make alpine-image\n\nOr Scratch:\n\n    make scratch-image\n\n### Building Binaries\n\nRun build:\n\n```sh\n    make go-build\n```\n\nwill output binaries and archive inside the `dist` folder for the building operating system.\n\n## Import into your Golang Application\n\nThe `oracledb_exporter` can also be imported into your Go based applications. The [Grafana Agent](https://github.com/grafana/agent/) uses this pattern to implement the [OracleDB integration](https://grafana.com/docs/grafana-cloud/data-configuration/integrations/integration-reference/integration-oracledb/). Feel free to modify the code to fit your application's use case.\n\nHere is a small snippet of an example usage of the exporter in code:\n\n```go\n promLogConfig := \u0026promlog.Config{}\n // create your own config\n logger := promlog.New(promLogConfig)\n\n // replace with your connection string\n connectionString := \"oracle://username:password@localhost:1521/orcl.localnet\"\n oeExporter, err := oe.NewExporter(logger, \u0026oe.Config{\n  DSN:          connectionString,\n  MaxIdleConns: 0,\n  MaxOpenConns: 10,\n  QueryTimeout: 5,\n })\n\n if err != nil {\n  panic(err)\n }\n\n metricChan := make(chan prometheus.Metric, len(oeExporter.DefaultMetrics().Metric))\n oeExporter.Collect(metricChan)\n\n // alternatively its possible to run scrapes on an interval\n // and Collect() calls will only return updated data once\n // that intervaled scrape is run\n // please note this is a blocking call so feel free to run\n // in a separate goroutine\n // oeExporter.RunScheduledScrapes(context.Background(), time.Minute)\n\n for r := range metricChan {\n  // Write to the client of your choice\n  // or spin up a promhttp.Server to serve these metrics\n  r.Write(\u0026dto.Metric{})\n }\n\n```\n\n## FAQ/Troubleshooting\n\n### Unable to convert current value to float (metric=par,metri...in.go:285\n\nOracle is trying to send a value that we cannot convert to float. This could be anything like 'UNLIMITED' or 'UNDEFINED' or 'WHATEVER'.\n\nIn this case, you must handle this problem by testing it in the SQL request. Here an example available in default metrics:\n\n```toml\n[[metric]]\ncontext = \"resource\"\nlabels = [ \"resource_name\" ]\nmetricsdesc = { current_utilization= \"Generic counter metric from v$resource_limit view in Oracle (current value).\", limit_value=\"Generic counter metric from v$resource_limit view in Oracle (UNLIMITED: -1).\" }\nrequest=\"SELECT resource_name,current_utilization,CASE WHEN TRIM(limit_value) LIKE 'UNLIMITED' THEN '-1' ELSE TRIM(limit_value) END as limit_value FROM v$resource_limit\"\n```\n\nIf the value of limit_value is 'UNLIMITED', the request send back the value -1.\n\nYou can increase the log level (`--log.level debug`) in order to get the statement generating this error.\n\n### error while loading shared libraries: libclntsh.so.xx.x: cannot open shared object file: No such file or directory\n\nVersion before 0.5 use libs from Oracle in order to connect to Oracle Database. After 0.5 release, the oracle exporter use an pure Go DB driver and don't need binaries from Oracle anymore.\n\n**Please switch to version 0.5.**\n\nFor older version, you must install the Oracle binaries somewhere on your machine and **you must install the good version number**. If the\nerror talk about the version 18.3, you **must** install 18.3 binary version. If it's 12.2, you **must** install 12.2.\n\nAn alternative is to run this exporter using a Docker container. This way, you don't have to worry about Oracle binaries\nversion as they are embedded in the container.\n\nHere an example to run this exporter (to scrap metrics from system/oracle@//host:1521/service-or-sid) and bind the exporter port (9161) to the global machine:\n\n`docker run -it --rm -p 9161:9161 -e DATA_SOURCE_NAME=oracle://system/oracle@//host:1521/service-or-sid iamseth/oracledb_exporter:0.2.6a`\n\n### Error scraping for wait_time\n\nIf you experience an error `Error scraping for wait_time: sql: Scan error on column index 1: converting driver.Value type string (\",01\") to a float64: invalid syntax source=\"main.go:144\"` you may need to set the NLS_LANG variable.\n\n```bash\n\nexport NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1\nexport DATA_SOURCE_NAME=system/oracle@myhost\n/path/to/binary --log.level error --web.listen-address :9161\n```\n\nIf using Docker, set the same variable using the -e flag.\n\n### An Oracle instance generates a lot of trace files being monitored by exporter\n\nAs being said, Oracle instance may (and probably does) generate a lot of trace files alongside its alert log file, one trace file per scraping event. The trace file contains the following lines\n\n```\n...\n*** MODULE NAME:(prometheus_oracle_exporter-amd64@hostname)\n...\nkgxgncin: clsssinit: CLSS init failed with status 3\nkgxgncin: clsssinit: return status 3 (0 SKGXN not av) from CLSS\n```\n\nThe root cause is Oracle's reaction of quering ASM-related views without ASM used. The current workaround proposed is to setup a regular task to cleanup these trace files from the filesystem, as example\n\n```\n$ find $ORACLE_BASE/diag/rdbms -name '*.tr[cm]' -mtime +14 -delete\n```\n\n### TLS and basic authentication\n\nApache Exporter supports TLS and basic authentication. This enables better\ncontrol of the various HTTP endpoints.\n\nTo use TLS and/or basic authentication, you need to pass a configuration file\nusing the `--web.config` parameter. The format of the file is described\n[in the exporter-toolkit repository](https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md).\n\nNote that the TLS and basic authentication settings affect all HTTP endpoints:\n/metrics for scraping, /probe for probing, and the web UI.\n\n\n### Multi-target support\n\nThis exporter supports the multi-target pattern. This allows running a single instance of this exporter for multiple Oracle targets.\n\nTo use the multi-target functionality, send a http request to the endpoint `/scrape?target=foo:1521` where target is set to the DSN of the Oracle instance to scrape metrics from.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamseth%2Foracledb_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamseth%2Foracledb_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamseth%2Foracledb_exporter/lists"}