You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+65Lines changed: 65 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -558,6 +558,8 @@ The following command line arguments (flags) can be passed to the exporter (the
558
558
559
559
```bash
560
560
Usage of oracledb_exporter:
561
+
--config.file="example-config.yaml"
562
+
File with metrics exporter configuration. (env: CONFIG_FILE)
561
563
--web.telemetry-path="/metrics"
562
564
Path under which to expose metrics. (env: TELEMETRY_PATH)
563
565
--default.metrics="default-metrics.toml"
@@ -597,6 +599,69 @@ You may provide the connection details using these variables:
597
599
598
600
The following example puts the logfile in the current location with the filename `alert.log` and loads the default matrics file (`default-metrics,toml`) from the current location.
599
601
602
+
If you prefer to provide configuration via a [config file](./example-config.yaml), you may do so with the `--config.file` argument. The use of a config file over command line arguments is preferred. If a config file is not provided, the default database connection is managed by command line arguments.
603
+
604
+
```yaml
605
+
# Example Oracle Database Metrics Exporter Configuration file.
606
+
# Environment variables of the form ${VAR_NAME} will be expanded.
607
+
608
+
databases:
609
+
## Path on which metrics will be served
610
+
# metricsPath: /metrics
611
+
## Database connection information for the "default" database.
612
+
default:
613
+
## Database username
614
+
username: ${DB_USERNAME}
615
+
## Database password
616
+
password: ${DB_PASSWORD}
617
+
## Database connection url
618
+
url: localhost:1521/freepdb1
619
+
## Metrics scrape interval for this database
620
+
scrapeInterval: 15s
621
+
## Metrics query timeout for this database, in seconds
622
+
queryTimeout: 5
623
+
624
+
## Rely on Oracle Database External Authentication by network or OS
625
+
# externalAuth: false
626
+
## Database role
627
+
# role: SYSDBA
628
+
## Path to Oracle Database wallet, if using wallet
629
+
# tnsAdmin: /path/to/database/wallet
630
+
631
+
### Connection settings:
632
+
### Either the go-sql or Oracle Database connection pool may be used.
633
+
### To use the Oracle Database connection pool over the go-sql connection pool,
634
+
### set maxIdleConns to zero and configure the pool* settings.
635
+
636
+
### Connection pooling settings for the go-sql connection pool
637
+
## Max open connections for this database using go-sql connection pool
638
+
maxOpenConns: 10
639
+
## Max idle connections for this database using go-sql connection pool
640
+
maxIdleConns: 10
641
+
642
+
### Connection pooling settings for the Oracle Database connection pool
0 commit comments