Skip to content

Commit ef006ed

Browse files
authoredSep 4, 2024
Document multiple custom metrics files (#117)
Signed-off-by: Anders Swanson <anders.swanson@oracle.com>
1 parent 180b42d commit ef006ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,11 @@ variables:
648648

649649
## Custom metrics
650650

651-
The exporter allows definition of arbitrary custom metrics in a TOML file. To specify this file to the
651+
The exporter allows definition of arbitrary custom metrics in one or more TOML files. To specify this file to the
652652
exporter, you can:
653653

654-
- Use `--custom.metrics` flag followed by the name of the TOML file, or
655-
- Export `CUSTOM_METRICS` variable environment (`export CUSTOM_METRICS=my-custom-metrics.toml`)
654+
- Use `--custom.metrics` flag followed by a comma separated list of TOML files, or
655+
- Export `CUSTOM_METRICS` variable environment (`export CUSTOM_METRICS=my-custom-metrics.toml,my-other-custom-metrics.toml`)
656656

657657
This file must contain the following elements:
658658

‎main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ var (
3737
Version = "0.0.0.dev"
3838
metricPath = kingpin.Flag("web.telemetry-path", "Path under which to expose metrics. (env: TELEMETRY_PATH)").Default(getEnv("TELEMETRY_PATH", "/metrics")).String()
3939
defaultFileMetrics = kingpin.Flag("default.metrics", "File with default metrics in a TOML file. (env: DEFAULT_METRICS)").Default(getEnv("DEFAULT_METRICS", "default-metrics.toml")).String()
40-
customMetrics = kingpin.Flag("custom.metrics", "File that may contain various custom metrics in a TOML file. (env: CUSTOM_METRICS)").Default(getEnv("CUSTOM_METRICS", "")).String()
40+
customMetrics = kingpin.Flag("custom.metrics", "Comma separated list of file(s) that contain various custom metrics in a TOML format. (env: CUSTOM_METRICS)").Default(getEnv("CUSTOM_METRICS", "")).String()
4141
queryTimeout = kingpin.Flag("query.timeout", "Query timeout (in seconds). (env: QUERY_TIMEOUT)").Default(getEnv("QUERY_TIMEOUT", "5")).Int()
4242
maxIdleConns = kingpin.Flag("database.maxIdleConns", "Number of maximum idle connections in the connection pool. (env: DATABASE_MAXIDLECONNS)").Default(getEnv("DATABASE_MAXIDLECONNS", "0")).Int()
4343
maxOpenConns = kingpin.Flag("database.maxOpenConns", "Number of maximum open connections in the connection pool. (env: DATABASE_MAXOPENCONNS)").Default(getEnv("DATABASE_MAXOPENCONNS", "10")).Int()

0 commit comments

Comments
 (0)
Failed to load comments.