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
+33-33Lines changed: 33 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -616,28 +616,27 @@ The following command line arguments (flags) can be passed to the exporter:
616
616
617
617
```bash
618
618
Usage of oracledb_exporter:
619
-
--log.format value
620
-
If set use a syslog logger or JSON logging. Example: logger:syslog?appname=bob&local=7 or logger:stdout?json=true. Defaults to stderr.
621
-
--log.level value
622
-
Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal].
623
-
--custom.metrics string
624
-
Comma separated list of file(s) that contain various custom metrics in a TOML format.
625
-
--default.metrics string
626
-
Default TOML file metrics.
627
-
--web.systemd-socket
628
-
Use systemd socket activation listeners instead of port listeners (Linux only).
629
-
--web.listen-address string
630
-
Address to listen on for web interface and telemetry. (default ":9161")
631
-
--web.telemetry-path string
632
-
Path under which to expose metrics. (default "/metrics")
633
-
--database.maxIdleConns string
634
-
Number of maximum idle connections in the connection pool. (default "0")
635
-
--database.maxOpenConns string
636
-
Number of maximum open connections in the connection pool. (default "10")
637
-
--query.timeout int
638
-
Query timeout (in seconds).
639
-
--web.config.file
640
-
Path to configuration file that can enable TLS or authentication.
619
+
--web.telemetry-path="/metrics"
620
+
Path under which to expose metrics. (env: TELEMETRY_PATH)
621
+
--default.metrics="default-metrics.toml"
622
+
File with default metrics in a TOML file. (env: DEFAULT_METRICS)
623
+
--custom.metrics="" Comma separated list of file(s) that contain various custom metrics in a TOML format. (env: CUSTOM_METRICS)
624
+
--query.timeout=5 Query timeout (in seconds). (env: QUERY_TIMEOUT)
625
+
--database.maxIdleConns=0 Number of maximum idle connections in the connection pool. (env: DATABASE_MAXIDLECONNS)
626
+
--database.maxOpenConns=10
627
+
Number of maximum open connections in the connection pool. (env: DATABASE_MAXOPENCONNS)
628
+
--scrape.interval=0s Interval between each scrape. Default is to scrape on collect requests.
629
+
--log.disable=0 Set to 1 to disable alert logs
630
+
--log.interval=15s Interval between log updates (e.g. 5s).
631
+
--log.destination="/log/alert.log"
632
+
File to output the alert log to. (env: LOG_DESTINATION)
633
+
--web.listen-address=:9161 ...
634
+
Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.
635
+
--web.config.file="" Path to configuration file that can enable TLS or authentication. See: https://github.com/prometheus/exporter-toolkit/blob/master/docs/web-configuration.md
636
+
--log.level=info Only log messages with the given severity or above. One of: [debug, info, warn, error]
637
+
--log.format=logfmt Output format of log messages. One of: [logfmt, json]
638
+
--[no-]version Show application version.
639
+
641
640
```
642
641
643
642
### Using OCI Vault
@@ -658,17 +657,18 @@ exporter, you can:
658
657
659
658
Custom metrics file must contain a series of `[[metric]]` definitions, in TOML. Each metric definition must follow the custom metric schema:
660
659
661
-
| Field Name | Description | Type | Required | Default |
| context | Metric context, used to build metric FQN | String | Yes ||
664
-
| labels | Metric labels, which must match column names in the query. Any column that is not a label will be parsed as a metric | Array of Strings | No ||
665
-
| metricsdesc | Mapping between field(s) in the request and comment(s) | Dictionary of Strings | Yes ||
666
-
| metricstype | Mapping between field(s) in the request and [Prometheus metric types](https://prometheus.io/docs/concepts/metric_types/) | Dictionary of Strings | No ||
667
-
| metricsbuckets | Split [histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) metric types into buckets based on value ([example](./custom-metrics-example/metric-histogram-example.toml)) | Dictionary of String dictionaries | No | |
668
-
| fieldtoappend | Field from the request to append to the metric FQN | String | No ||
669
-
| request | Oracle database query to run for metrics scraping | String | Yes ||
670
-
| ignorezeroresult | Whether or not an error will be printed if the request does not return any results | Boolean | No |false|
671
-
| querytimeout | Oracle Database query timeout, in seconds | Integer | No | 5, or value of query.timeout |
660
+
| Field Name | Description | Type | Required | Default |
| context | Metric context, used to build metric FQN | String | Yes ||
663
+
| labels | Metric labels, which must match column names in the query. Any column that is not a label will be parsed as a metric | Array of Strings | No ||
664
+
| metricsdesc | Mapping between field(s) in the request and comment(s) | Dictionary of Strings | Yes ||
665
+
| metricstype | Mapping between field(s) in the request and [Prometheus metric types](https://prometheus.io/docs/concepts/metric_types/) | Dictionary of Strings | No ||
666
+
| metricsbuckets | Split [histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) metric types into buckets based on value ([example](./custom-metrics-example/metric-histogram-example.toml)) | Dictionary of String dictionaries | No | |
667
+
| fieldtoappend | Field from the request to append to the metric FQN | String | No ||
668
+
| request | Oracle database query to run for metrics scraping | String | Yes ||
669
+
| ignorezeroresult | Whether or not an error will be printed if the request does not return any results | Boolean | No |false|
670
+
| querytimeout | Oracle Database query timeout duration, e.g., 300ms, 0.5h | String duration | No | Value of query.timeout in seconds |
671
+
| scrapeinterval | Custom metric scrape interval, used if scrape.interval is provided, otherwise metrics are always scraped on request. | String duration | No ||
Copy file name to clipboardExpand all lines: main.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ var (
41
41
queryTimeout=kingpin.Flag("query.timeout", "Query timeout (in seconds). (env: QUERY_TIMEOUT)").Default(getEnv("QUERY_TIMEOUT", "5")).Int()
42
42
maxIdleConns=kingpin.Flag("database.maxIdleConns", "Number of maximum idle connections in the connection pool. (env: DATABASE_MAXIDLECONNS)").Default(getEnv("DATABASE_MAXIDLECONNS", "0")).Int()
43
43
maxOpenConns=kingpin.Flag("database.maxOpenConns", "Number of maximum open connections in the connection pool. (env: DATABASE_MAXOPENCONNS)").Default(getEnv("DATABASE_MAXOPENCONNS", "10")).Int()
44
-
scrapeInterval=kingpin.Flag("scrape.interval", "Interval between each scrape. Default is to scrape on collect requests").Default("0s").Duration()
44
+
scrapeInterval=kingpin.Flag("scrape.interval", "Interval between each scrape. Default is to scrape on collect requests.").Default("0s").Duration()
45
45
logDisable=kingpin.Flag("log.disable", "Set to 1 to disable alert logs").Default("0").Int()
46
46
logInterval=kingpin.Flag("log.interval", "Interval between log updates (e.g. 5s).").Default("15s").Duration()
47
47
logDestination=kingpin.Flag("log.destination", "File to output the alert log to. (env: LOG_DESTINATION)").Default(getEnv("LOG_DESTINATION", "/log/alert.log")).String()
0 commit comments