Skip to content

Commit feb9dc8

Browse files
Revert "Issue-358 | Replace --enable.COLLECTOR with --collector.COLLECTOR (#365)"
This reverts commit 537c995. Reverted enable.COLLECTOR because it is a breaking change that needs exahustive testing. By reverting it, we can make the release v0.20.9 without affecting the current behavior for PMM.
1 parent 6dd4086 commit feb9dc8

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ linters:
3030
- testpackage
3131
- wsl
3232
- exhaustivestruct
33+
- forbidigo
3334
issues:
3435
exclude-use-default: false
3536
exclude:

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,10 @@ Currently, these metric sources are implemented:
3838
|\-\-web.listen-address|Address to listen on for web interface and telemetry|\-\-web.listen-address=":9216"|
3939
|\-\-web.telemetry-path|Metrics expose path|\-\-web.telemetry-path="/metrics"|
4040
|\-\-log.level|Only log messages with the given severity or above. Valid levels: [debug, info, warn, error]|\-\-log.level=error|
41-
|\-\-no-collector.diagnosticdata|Disable collecting metrics from getDiagnosticData||
42-
|\-\-no-collector.replicasetstatus|Disable collecting metrics from replSetGetStatus||
43-
|\-\-collector.dbstats|Enable collecting metrics from dbStats||
4441
|\-\-enable.top|Enable collecting metrics from top admin command||
45-
|--version|Show version and exit|
42+
|\-\-version|Show version and exit|
4643

47-
### Build the exporter
44+
### Build the exporter
4845
The build process uses the dockerized version of goreleaser so you don't need to install Go.
4946
Just run `make release` and the new binaries will be generated under the build directory.
5047
```

main.go

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,23 @@ var (
3535

3636
// GlobalFlags has command line flags to configure the exporter.
3737
type GlobalFlags struct {
38-
CollStatsCollections string `name:"mongodb.collstats-colls" help:"List of comma separared databases.collections to get $collStats" placeholder:"db1.col1,db2.col2"`
39-
IndexStatsCollections string `name:"mongodb.indexstats-colls" help:"List of comma separared databases.collections to get $indexStats" placeholder:"db1.col1,db2.col2"`
40-
URI string `name:"mongodb.uri" help:"MongoDB connection URI" env:"MONGODB_URI" placeholder:"mongodb://user:[email protected]:27017/admin?ssl=true"`
41-
GlobalConnPool bool `name:"mongodb.global-conn-pool" help:"Use global connection pool instead of creating new pool for each http request."`
42-
DirectConnect bool `name:"mongodb.direct-connect" help:"Whether or not a direct connect should be made. Direct connections are not valid if multiple hosts are specified or an SRV URI is used." default:"true"`
43-
WebListenAddress string `name:"web.listen-address" help:"Address to listen on for web interface and telemetry" default:":9216"`
44-
WebTelemetryPath string `name:"web.telemetry-path" help:"Metrics expose path" default:"/metrics"`
45-
LogLevel string `name:"log.level" help:"Only log messages with the given severuty or above. Valid levels: [debug, info, warn, error, fatal]" enum:"debug,info,warn,error,fatal" default:"error"`
46-
DisableDiagnosticData bool `name:"no-collector.diagnosticdata" help:"Disable collecting metrics from getDiagnosticData"`
47-
DisableReplicasetStatus bool `name:"no-collector.replicasetstatus" help:"Disable collecting metrics from replSetGetStatus"`
48-
EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"`
49-
EnableTop bool `name:"enable.top" help:"Enable collecting metrics from top admin command"`
50-
DiscoveringMode bool `name:"discovering-mode" help:"Enable autodiscover collections"`
51-
CompatibleMode bool `name:"compatible-mode" help:"Enable old mongodb-exporter compatible metrics"`
52-
Version bool `name:"version" help:"Show version and exit"`
38+
CollStatsCollections string `name:"mongodb.collstats-colls" help:"List of comma separared databases.collections to get $collStats" placeholder:"db1.col1,db2.col2"`
39+
IndexStatsCollections string `name:"mongodb.indexstats-colls" help:"List of comma separared databases.collections to get $indexStats" placeholder:"db1.col1,db2.col2"`
40+
URI string `name:"mongodb.uri" help:"MongoDB connection URI" env:"MONGODB_URI" placeholder:"mongodb://user:[email protected]:27017/admin?ssl=true"`
41+
GlobalConnPool bool `name:"mongodb.global-conn-pool" help:"Use global connection pool instead of creating new pool for each http request."`
42+
DirectConnect bool `name:"mongodb.direct-connect" help:"Whether or not a direct connect should be made. Direct connections are not valid if multiple hosts are specified or an SRV URI is used." default:"true"`
43+
WebListenAddress string `name:"web.listen-address" help:"Address to listen on for web interface and telemetry" default:":9216"`
44+
WebTelemetryPath string `name:"web.telemetry-path" help:"Metrics expose path" default:"/metrics"`
45+
LogLevel string `name:"log.level" help:"Only log messages with the given severuty or above. Valid levels: [debug, info, warn, error, fatal]" enum:"debug,info,warn,error,fatal" default:"error"`
46+
47+
DisableDiagnosticData bool `name:"disable.diagnosticdata" help:"Disable collecting metrics from getDiagnosticData"`
48+
DisableReplicasetStatus bool `name:"disable.replicasetstatus" help:"Disable collecting metrics from replSetGetStatus"`
49+
EnableDBStats bool `name:"enable.dbstats" help:"Enable collecting metrics from dbStats"`
50+
EnableTop bool `name:"enable.top" help:"Enable collecting metrics from top admin command"`
51+
52+
DiscoveringMode bool `name:"discovering-mode" help:"Enable autodiscover collections"`
53+
CompatibleMode bool `name:"compatible-mode" help:"Enable old mongodb-exporter compatible metrics"`
54+
Version bool `name:"version" help:"Show version and exit"`
5355
}
5456

5557
func main() {

0 commit comments

Comments
 (0)