Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add option --collector.dbstatsfreestorage to receive freeStorage stats from dbstats #666

Merged
merged 4 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions exporter/dbstats_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ type dbstatsCollector struct {
topologyInfo labelsGetter

databaseFilter []string

freeStorage bool
}

// newDBStatsCollector creates a collector for statistics on database storage.
func newDBStatsCollector(ctx context.Context, client *mongo.Client, logger *logrus.Logger, compatible bool, topology labelsGetter, databaseRegex []string) *dbstatsCollector {
func newDBStatsCollector(ctx context.Context, client *mongo.Client, logger *logrus.Logger, compatible bool, topology labelsGetter, databaseRegex []string, freeStorage bool) *dbstatsCollector {
return &dbstatsCollector{
ctx: ctx,
base: newBaseCollector(client, logger),
Expand All @@ -44,6 +46,8 @@ func newDBStatsCollector(ctx context.Context, client *mongo.Client, logger *logr
topologyInfo: topology,

databaseFilter: databaseRegex,

freeStorage: freeStorage,
}
}

Expand Down Expand Up @@ -71,7 +75,12 @@ func (d *dbstatsCollector) collect(ch chan<- prometheus.Metric) {
logger.Debugf("getting stats for databases: %v", dbNames)
for _, db := range dbNames {
var dbStats bson.M
cmd := bson.D{{Key: "dbStats", Value: 1}, {Key: "scale", Value: 1}}
var cmd bson.D
if d.freeStorage {
cmd = bson.D{{Key: "dbStats", Value: 1}, {Key: "scale", Value: 1}, {Key: "freeStorage", Value: 1}}
} else {
cmd = bson.D{{Key: "dbStats", Value: 1}, {Key: "scale", Value: 1}}
}
r := client.Database(db).RunCommand(d.ctx, cmd)
err := r.Decode(&dbStats)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion exporter/dbstats_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestDBStatsCollector(t *testing.T) {

ti := labelsGetterMock{}

c := newDBStatsCollector(ctx, client, logrus.New(), false, ti, []string{dbName})
c := newDBStatsCollector(ctx, client, logrus.New(), false, ti, []string{dbName}, false)
expected := strings.NewReader(`
# HELP mongodb_dbstats_collections dbstats.
# TYPE mongodb_dbstats_collections untyped
Expand Down
19 changes: 11 additions & 8 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ type Opts struct {
DiscoveringMode bool
GlobalConnPool bool

CollectAll bool
EnableDBStats bool
EnableDiagnosticData bool
EnableReplicasetStatus bool
EnableTopMetrics bool
EnableIndexStats bool
EnableCollStats bool
CollectAll bool
EnableDBStats bool
EnableDBStatsFreeStorage bool
EnableDiagnosticData bool
EnableReplicasetStatus bool
EnableTopMetrics bool
EnableIndexStats bool
EnableCollStats bool

EnableOverrideDescendingIndex bool

Expand Down Expand Up @@ -164,6 +165,7 @@ func (e *Exporter) makeRegistry(ctx context.Context, client *mongo.Client, topol
}
e.opts.EnableDiagnosticData = true
e.opts.EnableDBStats = true
e.opts.EnableDBStatsFreeStorage = true
e.opts.EnableCollStats = true
e.opts.EnableTopMetrics = true
e.opts.EnableReplicasetStatus = true
Expand All @@ -173,6 +175,7 @@ func (e *Exporter) makeRegistry(ctx context.Context, client *mongo.Client, topol
// arbiter only have isMaster privileges
if isArbiter {
e.opts.EnableDBStats = false
e.opts.EnableDBStatsFreeStorage = false
e.opts.EnableCollStats = false
e.opts.EnableTopMetrics = false
e.opts.EnableReplicasetStatus = false
Expand Down Expand Up @@ -203,7 +206,7 @@ func (e *Exporter) makeRegistry(ctx context.Context, client *mongo.Client, topol

if e.opts.EnableDBStats && limitsOk && requestOpts.EnableDBStats {
cc := newDBStatsCollector(ctx, client, e.opts.Logger,
e.opts.CompatibleMode, topologyInfo, nil)
e.opts.CompatibleMode, topologyInfo, nil, e.opts.EnableDBStatsFreeStorage)
registry.MustRegister(cc)
}

Expand Down
26 changes: 14 additions & 12 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@
TLSConfigPath string `name:"web.config" help:"Path to the file having Prometheus TLS config for basic auth"`
LogLevel string `name:"log.level" help:"Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]" enum:"debug,info,warn,error,fatal" default:"error"`

EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"`
EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"`
EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"`
EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"`
EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"`
EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"`
EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"`

Check failure on line 47 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) Raw Output: main.go:47:32: tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"` ^

Check failure on line 47 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) Raw Output: main.go:47:32: tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"` ^

Check failure on line 47 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) Raw Output: main.go:47:32: tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"` ^

Check failure on line 47 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) Raw Output: main.go:47:32: tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"` ^

Check failure on line 47 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) Raw Output: main.go:47:32: tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"` ^

Check failure on line 47 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) Raw Output: main.go:47:32: tag is not aligned, should be: help:"Enable collecting metrics from getDiagnosticData" name:"collector.diagnosticdata" (tagalign) EnableDiagnosticData bool `name:"collector.diagnosticdata" help:"Enable collecting metrics from getDiagnosticData"` ^
EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"`

Check failure on line 48 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) Raw Output: main.go:48:32: tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"` ^

Check failure on line 48 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) Raw Output: main.go:48:32: tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"` ^

Check failure on line 48 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) Raw Output: main.go:48:32: tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"` ^

Check failure on line 48 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) Raw Output: main.go:48:32: tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"` ^

Check failure on line 48 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) Raw Output: main.go:48:32: tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"` ^

Check failure on line 48 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) Raw Output: main.go:48:32: tag is not aligned, should be: help:"Enable collecting metrics from replSetGetStatus" name:"collector.replicasetstatus" (tagalign) EnableReplicasetStatus bool `name:"collector.replicasetstatus" help:"Enable collecting metrics from replSetGetStatus"` ^
EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"`

Check failure on line 49 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) Raw Output: main.go:49:32: tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"` ^

Check failure on line 49 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) Raw Output: main.go:49:32: tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"` ^

Check failure on line 49 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) Raw Output: main.go:49:32: tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"` ^

Check failure on line 49 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) Raw Output: main.go:49:32: tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"` ^

Check failure on line 49 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) Raw Output: main.go:49:32: tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"` ^

Check failure on line 49 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) Raw Output: main.go:49:32: tag is not aligned, should be: help:"Enable collecting metrics from dbStats" name:"collector.dbstats" (tagalign) EnableDBStats bool `name:"collector.dbstats" help:"Enable collecting metrics from dbStats"` ^
EnableDBStatsFreeStorage bool `name:"collector.dbstatsfreestorage" help:"Enable collecting free space metrics from dbStats"`

Check failure on line 50 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) Raw Output: main.go:50:32: tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) EnableDBStatsFreeStorage bool `name:"collector.dbstatsfreestorage" help:"Enable collecting free space metrics from dbStats"` ^

Check failure on line 50 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) Raw Output: main.go:50:32: tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) EnableDBStatsFreeStorage bool `name:"collector.dbstatsfreestorage" help:"Enable collecting free space metrics from dbStats"` ^

Check failure on line 50 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) Raw Output: main.go:50:32: tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) EnableDBStatsFreeStorage bool `name:"collector.dbstatsfreestorage" help:"Enable collecting free space metrics from dbStats"` ^

Check failure on line 50 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) Raw Output: main.go:50:32: tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) EnableDBStatsFreeStorage bool `name:"collector.dbstatsfreestorage" help:"Enable collecting free space metrics from dbStats"` ^

Check failure on line 50 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) Raw Output: main.go:50:32: tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) EnableDBStatsFreeStorage bool `name:"collector.dbstatsfreestorage" help:"Enable collecting free space metrics from dbStats"` ^

Check failure on line 50 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) Raw Output: main.go:50:32: tag is not aligned, should be: help:"Enable collecting free space metrics from dbStats" name:"collector.dbstatsfreestorage" (tagalign) EnableDBStatsFreeStorage bool `name:"collector.dbstatsfreestorage" help:"Enable collecting free space metrics from dbStats"` ^
EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"`

Check failure on line 51 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) Raw Output: main.go:51:32: tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"` ^

Check failure on line 51 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) Raw Output: main.go:51:32: tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"` ^

Check failure on line 51 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) Raw Output: main.go:51:32: tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"` ^

Check failure on line 51 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) Raw Output: main.go:51:32: tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"` ^

Check failure on line 51 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) Raw Output: main.go:51:32: tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"` ^

Check failure on line 51 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) Raw Output: main.go:51:32: tag is not aligned, should be: help:"Enable collecting metrics from top admin command" name:"collector.topmetrics" (tagalign) EnableTopMetrics bool `name:"collector.topmetrics" help:"Enable collecting metrics from top admin command"` ^
EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"`

Check failure on line 52 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) Raw Output: main.go:52:32: tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"` ^

Check failure on line 52 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) Raw Output: main.go:52:32: tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"` ^

Check failure on line 52 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) Raw Output: main.go:52:32: tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"` ^

Check failure on line 52 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) Raw Output: main.go:52:32: tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"` ^

Check failure on line 52 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) Raw Output: main.go:52:32: tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"` ^

Check failure on line 52 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) Raw Output: main.go:52:32: tag is not aligned, should be: help:"Enable collecting metrics from $indexStats" name:"collector.indexstats" (tagalign) EnableIndexStats bool `name:"collector.indexstats" help:"Enable collecting metrics from $indexStats"` ^
EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"`

Check failure on line 53 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) Raw Output: main.go:53:32: tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"` ^

Check failure on line 53 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) Raw Output: main.go:53:32: tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"` ^

Check failure on line 53 in main.go

View workflow job for this annotation

GitHub Actions / Build (mongo:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) Raw Output: main.go:53:32: tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"` ^

Check failure on line 53 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.2)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) Raw Output: main.go:53:32: tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"` ^

Check failure on line 53 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:4.4)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) Raw Output: main.go:53:32: tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"` ^

Check failure on line 53 in main.go

View workflow job for this annotation

GitHub Actions / Build (percona/percona-server-mongodb:5.0)

[golangci-lint] reported by reviewdog 🐶 tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) Raw Output: main.go:53:32: tag is not aligned, should be: help:"Enable collecting metrics from $collStats" name:"collector.collstats" (tagalign) EnableCollStats bool `name:"collector.collstats" help:"Enable collecting metrics from $collStats"` ^

EnableOverrideDescendingIndex bool `name:"metrics.overridedescendingindex" help:"Enable descending index name override to replace -1 with _DESC"`

Expand Down Expand Up @@ -122,12 +123,13 @@
TLSConfigPath: opts.TLSConfigPath,
DirectConnect: opts.DirectConnect,

EnableDiagnosticData: opts.EnableDiagnosticData,
EnableReplicasetStatus: opts.EnableReplicasetStatus,
EnableTopMetrics: opts.EnableTopMetrics,
EnableDBStats: opts.EnableDBStats,
EnableIndexStats: opts.EnableIndexStats,
EnableCollStats: opts.EnableCollStats,
EnableDiagnosticData: opts.EnableDiagnosticData,
EnableReplicasetStatus: opts.EnableReplicasetStatus,
EnableTopMetrics: opts.EnableTopMetrics,
EnableDBStats: opts.EnableDBStats,
EnableDBStatsFreeStorage: opts.EnableDBStatsFreeStorage,
EnableIndexStats: opts.EnableIndexStats,
EnableCollStats: opts.EnableCollStats,

EnableOverrideDescendingIndex: opts.EnableOverrideDescendingIndex,

Expand Down