Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
d01d2da
PMM-12832 Rough implementation.
JiriCtvrtka Mar 12, 2026
ca36e37
PMM-12832 Fix.
JiriCtvrtka Mar 12, 2026
eb9dc4e
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Mar 12, 2026
342e4c0
PMM-12832 More exporters, refactor.
JiriCtvrtka Mar 13, 2026
75c0854
Merge remote-tracking branch 'origin/PMM-12832-exporter-timeouts' int…
JiriCtvrtka Mar 13, 2026
e009b06
PMM-12832 Another parts.
JiriCtvrtka Mar 16, 2026
fe76cec
PMM-12832 Mongo change, list.
JiriCtvrtka Mar 17, 2026
3dd7cb4
PMM-12832 Changes, refactor.
JiriCtvrtka Mar 17, 2026
3831afd
PMM-12832 Refactor of agent model.
JiriCtvrtka Mar 17, 2026
27895b3
PMM-12832 Lint.
JiriCtvrtka Mar 17, 2026
dad3e75
PMM-12832 Inventory timeout for all.
JiriCtvrtka Mar 17, 2026
64d37ca
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Mar 17, 2026
d1c530e
PMM-12832 Add change func after merge.
JiriCtvrtka Mar 17, 2026
3c358f0
PMM-12832 Fix for now.
JiriCtvrtka Mar 17, 2026
658fc92
PMM-12832 Changes.
JiriCtvrtka Mar 17, 2026
58db609
PMM-12832 Fix tests.
JiriCtvrtka Mar 17, 2026
b3d65c7
PMM-12832 Changes.
JiriCtvrtka Mar 17, 2026
8f44fc6
PMM-12832 Changes.
JiriCtvrtka Mar 18, 2026
c329c2a
PMM-12832 Changes.
JiriCtvrtka Mar 18, 2026
1b924cd
PMM-12832 Changes.
JiriCtvrtka Mar 18, 2026
098d50e
PMM-12832 Change for RTA.
JiriCtvrtka Mar 18, 2026
5811d1b
PMM-12832 Fix.
JiriCtvrtka Mar 18, 2026
42f5b86
PMM-12832 Fix.
JiriCtvrtka Mar 18, 2026
69ed781
PMM-12832 Fix.
JiriCtvrtka Mar 18, 2026
bccea8d
PMM-12832 Refactor.
JiriCtvrtka Mar 18, 2026
80226ed
PMM-12832 Remove not related types.
JiriCtvrtka Mar 18, 2026
c6dd6e7
PMM-12832 Changes.
JiriCtvrtka Mar 18, 2026
963a998
PMM-12832 Remote, valkey, etc.
JiriCtvrtka Mar 18, 2026
4e09994
PMM-12832 Fix.
JiriCtvrtka Mar 18, 2026
04514be
PMM-12832 Lint.
JiriCtvrtka Mar 18, 2026
64a5e7a
PMM-12832 Lint.
JiriCtvrtka Mar 19, 2026
fb125cb
PMM-12832 New tests.
JiriCtvrtka Mar 19, 2026
f503841
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Mar 20, 2026
fe7a7fe
PMM-12832 Better comment.
JiriCtvrtka Mar 20, 2026
3949531
PMM-12832 Fix for missed parts.
JiriCtvrtka Mar 20, 2026
0a05b27
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Mar 20, 2026
8632984
PMM-12832 Format.
JiriCtvrtka Mar 20, 2026
a0a72b8
Merge remote-tracking branch 'origin/PMM-12832-exporter-timeouts' int…
JiriCtvrtka Mar 20, 2026
69fd130
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Mar 20, 2026
afefbea
PMM-12832 Valkey refactor.
JiriCtvrtka Mar 21, 2026
1c01e3a
Merge remote-tracking branch 'origin/PMM-12832-exporter-timeouts' int…
JiriCtvrtka Mar 21, 2026
c6246b9
PMM-12832 Requested changes.
JiriCtvrtka Mar 22, 2026
c84fc3f
PMM-12832 RDS fix.
JiriCtvrtka Mar 22, 2026
089c328
PMM-12832 Correct timeout flag for Valkey/Redis.
JiriCtvrtka Mar 22, 2026
0eb4514
PMM-12832 Lint.
JiriCtvrtka Mar 22, 2026
85c6bbd
Merge branch 'v3' into PMM-12832-exporter-timeouts
ademidoff Apr 6, 2026
9205dd8
PMM-12832 Fix for Mongo in DSN helpers.
JiriCtvrtka Apr 6, 2026
7eada45
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Apr 6, 2026
630db88
PMM-12832 EffectiveDialTimeout refactor based on Max suggestion.
JiriCtvrtka Apr 6, 2026
1f34478
PMM-12832 Increase exporters default timeout based on Alex suggestion.
JiriCtvrtka Apr 6, 2026
dd25717
PMM-12832 Adjust test for new exporters default timeouts.
JiriCtvrtka Apr 6, 2026
5660c37
PMM-12832 Fix tests for new timeouts of exporters.
JiriCtvrtka Apr 6, 2026
6d421b1
PMM-12832 Small refactor.
JiriCtvrtka Apr 6, 2026
1648cba
PMM-12832 Rename to connection timeout.
JiriCtvrtka Apr 6, 2026
150c7a8
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Apr 6, 2026
41c11c2
PMM-12832 Fix rest of timeouts in tests.
JiriCtvrtka Apr 6, 2026
8e7f5cf
PMM-12832 Lint.
JiriCtvrtka Apr 6, 2026
cfedb14
PMM-12832 Lint.
JiriCtvrtka Apr 6, 2026
4901944
PMM-12832 Better comment.
JiriCtvrtka Apr 6, 2026
dcb5913
PMM-12832 Optional connection timeout in change.
JiriCtvrtka Apr 6, 2026
427cfea
PMM-12832 Connection timeout optional in change.
JiriCtvrtka Apr 6, 2026
6217582
PMM-12832 Another changes to change and copilot suggestions.
JiriCtvrtka Apr 6, 2026
f392e4b
PMM-12832 Fully optional connection timeout.
JiriCtvrtka Apr 6, 2026
0ffbccd
PMM-12832 FIx test.
JiriCtvrtka Apr 7, 2026
f495b6d
PMM-12832 Better coverage.
JiriCtvrtka Apr 7, 2026
b4eb5be
PMM-12832 Fix prometheus scrape interval for tiny intervals.
JiriCtvrtka Apr 7, 2026
579a597
PMM-12832 Cap for connection timeout.
JiriCtvrtka Apr 7, 2026
9ffdc58
PMM-12832 Management no longer return connection interval when not set.
JiriCtvrtka Apr 7, 2026
8d6a739
PMM-12832 Validation for connection interval.
JiriCtvrtka Apr 7, 2026
2fb962a
PMM-12832 Gen fix.
JiriCtvrtka Apr 7, 2026
e5bd119
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Apr 7, 2026
e7bffb5
PMM-12832 Fix mongo test.
JiriCtvrtka Apr 7, 2026
14041b9
PMM-12832 Update comments/name from timeout to connection timeout.
JiriCtvrtka Apr 7, 2026
0b08fc1
PMM-12832 Copilot suggestion.
JiriCtvrtka Apr 7, 2026
59184b8
PMM-12832 Rounding for MySQL timeouts.
JiriCtvrtka Apr 7, 2026
7bd223b
PMM-12832 Add missed connection timeout in ChangeNodeExporter.
JiriCtvrtka Apr 7, 2026
a1f36ae
PMM-12832 Add missed connection timeout in ChangeExternalExporter.
JiriCtvrtka Apr 7, 2026
f5d9dbc
PMM-12832 RDS missed places.
JiriCtvrtka Apr 7, 2026
92445aa
PMM-12832 Fix Azure missed places.
JiriCtvrtka Apr 7, 2026
7af5d3a
PMM-12832 Format.
JiriCtvrtka Apr 7, 2026
b500a7b
PMM-12832 Test for 0 and nil timeouts.
JiriCtvrtka Apr 7, 2026
e209d54
PMM-12832 Fix concern from Copilot.
JiriCtvrtka Apr 7, 2026
05e15a0
PMM-12832 Typo.
JiriCtvrtka Apr 7, 2026
70a078f
PMM-12832 Missed places after RDS discovery.
JiriCtvrtka Apr 7, 2026
f0c4b6a
PMM-12832 Format.
JiriCtvrtka Apr 7, 2026
fdefc8c
PMM-12832 Use variable instead hardcoded value.
JiriCtvrtka Apr 7, 2026
d8bd0bc
Update admin/commands/inventory/change_agent_helpers.go
JiriCtvrtka Apr 7, 2026
0994458
PMM-12832 Update comment.
JiriCtvrtka Apr 7, 2026
9f8167f
PMM-12832 List only supported exporters type in switch case.
JiriCtvrtka Apr 7, 2026
6bd86cc
PMM-12832 More explaining comments for Copilot.
JiriCtvrtka Apr 7, 2026
d82da03
PMM-12832 Round timeout value for PG.
JiriCtvrtka Apr 7, 2026
6f87420
PMM-12832 Lint.
JiriCtvrtka Apr 7, 2026
f5a9fd7
PMM-12832 Better comment.
JiriCtvrtka Apr 8, 2026
b3dc97b
PMM-12832 Shared method for Node, External, Azure and RDS exporter.
JiriCtvrtka Apr 8, 2026
518b33c
PMM-12832 More precise description for connection timeout flag.
JiriCtvrtka Apr 8, 2026
5ec76de
Merge branch 'v3' into PMM-12832-exporter-timeouts
JiriCtvrtka Apr 8, 2026
61f05f9
PMM-12832 Flags from string to duration.
JiriCtvrtka Apr 10, 2026
5d8ea95
PMM-12832 Duration helper moved to utils.
JiriCtvrtka Apr 10, 2026
d707ce9
PMM-12832 All creates has connection timeouts passed as pointers.
JiriCtvrtka Apr 10, 2026
b34943b
PMM-12832 Use generic method for pointer.
JiriCtvrtka Apr 10, 2026
9f20473
PMM-12832 Remove unnecessary checks.
JiriCtvrtka Apr 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions admin/commands/inventory/add_agent_external_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type AddAgentExternalExporterCommand struct {
CustomLabels map[string]string `mapsep:"," help:"Custom user-assigned labels"`
PushMetrics bool `help:"Enables push metrics model flow, it will be sent to the server by an agent"`
TLSSkipVerify bool `help:"Skip TLS certificate verification"`
Timeout string `help:"Connection timeout to use for exporter (e.g. 1s, 500ms)"`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Timeout string `help:"Connection timeout to use for exporter (e.g. 1s, 500ms)"`
Timeout *time.Duration `placeholder:"DURATION" help:"Connection timeout to use for exporter (e.g. 1s, 500ms)"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here and at the rest of commands

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it makes sense to use *time.Duration? It will want string in AddAgentParams on API level anyway.

}

// RunCmd executes the AddAgentExternalExporterCommand and returns the result.
Expand All @@ -82,6 +83,7 @@ func (cmd *AddAgentExternalExporterCommand) RunCmd() (commands.Result, error) {
CustomLabels: customLabels,
PushMetrics: cmd.PushMetrics,
TLSSkipVerify: cmd.TLSSkipVerify,
Timeout: cmd.Timeout,
},
},
Context: commands.Ctx,
Expand Down
2 changes: 2 additions & 0 deletions admin/commands/inventory/add_agent_mongodb_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type AddAgentMongodbExporterCommand struct {
DisableCollectors []string `help:"Comma-separated list of collector names to exclude from exporter"`
StatsCollections []string `help:"Collections for collstats & indexstats"`
CollectionsLimit int32 `name:"max-collections-limit" placeholder:"number" help:"Disable collstats & indexstats if there are more than <n> collections"` //nolint:lll
Timeout string `help:"Connection timeout to use for exporter (e.g. 1s, 500ms)"`

flags.LogLevelFatalFlags
}
Expand Down Expand Up @@ -98,6 +99,7 @@ func (cmd *AddAgentMongodbExporterCommand) RunCmd() (commands.Result, error) {
TLSCertificateKeyFilePassword: cmd.TLSCertificateKeyFilePassword,
TLSCa: tlsCa,
AuthenticationMechanism: cmd.AuthenticationMechanism,
Timeout: cmd.Timeout,
PushMetrics: cmd.PushMetrics,
DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors),
StatsCollections: commands.ParseDisableCollectors(cmd.StatsCollections),
Expand Down
2 changes: 2 additions & 0 deletions admin/commands/inventory/add_agent_mysqld_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type AddAgentMysqldExporterCommand struct {
PushMetrics bool `help:"Enables push metrics model flow, it will be sent to the server by an agent"`
ExposeExporter bool `help:"Expose the address of the exporter publicly on 0.0.0.0"`
DisableCollectors []string `help:"Comma-separated list of collector names to exclude from exporter"`
Timeout string `help:"Connection timeout to use for exporter (e.g. 1s, 500ms)"`

flags.LogLevelNoFatalFlags
}
Expand Down Expand Up @@ -150,6 +151,7 @@ func (cmd *AddAgentMysqldExporterCommand) RunCmd() (commands.Result, error) {
PushMetrics: cmd.PushMetrics,
ExposeExporter: cmd.ExposeExporter,
DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors),
Timeout: cmd.Timeout,
LogLevel: cmd.LogLevelNoFatalFlags.LogLevel.EnumValue(),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint. Here and all other places.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While they are functionally equivalent, that must have been done for documentation purpose.

What was the lint error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error: admin/commands/inventory/add_agent_postgres_exporter.go:121:28: QF1008: could remove embedded field "LogLevelNoFatalFlags" from selector (staticcheck)
LogLevel: cmd.LogLevelNoFatalFlags.LogLevel.EnumValue(),

},
},
Expand Down
2 changes: 2 additions & 0 deletions admin/commands/inventory/add_agent_postgres_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type AddAgentPostgresExporterCommand struct {
TLSCertFile string `help:"TLS certificate file"`
TLSKeyFile string `help:"TLS certificate key file"`
AutoDiscoveryLimit int32 `default:"0" placeholder:"NUMBER" help:"Auto-discovery will be disabled if there are more than that number of databases (default: server-defined, -1: always disabled)"`
Timeout string `help:"Connection timeout to use for exporter (e.g. 1s, 500ms)"`

flags.LogLevelNoFatalFlags
}
Expand Down Expand Up @@ -109,6 +110,7 @@ func (cmd *AddAgentPostgresExporterCommand) RunCmd() (commands.Result, error) {
ExposeExporter: cmd.ExposeExporter,
DisableCollectors: commands.ParseDisableCollectors(cmd.DisableCollectors),
AutoDiscoveryLimit: cmd.AutoDiscoveryLimit,
Timeout: cmd.Timeout,

TLS: cmd.TLS,
TLSSkipVerify: cmd.TLSSkipVerify,
Expand Down
224 changes: 134 additions & 90 deletions api/inventory/v1/agents.pb.go

Large diffs are not rendered by default.

116 changes: 116 additions & 0 deletions api/inventory/v1/agents.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions api/inventory/v1/agents.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,8 @@ message AddMySQLdExporterParams {
bool expose_exporter = 17;
// Extra DSN parameters for MySQL connection.
map<string, string> extra_dsn_params = 18;
// Connection timeout for exporter (if set).
google.protobuf.Duration timeout = 19;
}

message ChangeMySQLdExporterParams {
Expand Down Expand Up @@ -1079,6 +1081,8 @@ message AddMongoDBExporterParams {
// Environment variable names to pass to the exporter.
// Values will be resolved from pmm-agent's environment when starting the exporter.
repeated string environment_variable_names = 21;
// Connection timeout for exporter (if set).
google.protobuf.Duration timeout = 22;
}

message ChangeMongoDBExporterParams {
Expand Down Expand Up @@ -1131,6 +1135,8 @@ message AddPostgresExporterParams {
bool expose_exporter = 17;
// Maximum number of connections that exporter can open to the database instance.
int32 max_exporter_connections = 18;
// Connection timeout for exporter (if set).
google.protobuf.Duration timeout = 19;
}

message ChangePostgresExporterParams {
Expand Down Expand Up @@ -1533,6 +1539,8 @@ message AddExternalExporterParams {
bool push_metrics = 11;
// Skip TLS certificate and hostname verification.
bool tls_skip_verify = 12;
// Connection timeout for exporter (if set).
google.protobuf.Duration timeout = 13;
}

message ChangeExternalExporterParams {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions api/inventory/v1/json/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -2412,6 +2412,11 @@
"type": "string"
},
"x-order": 17
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 18
}
},
"x-order": 2
Expand Down Expand Up @@ -2546,6 +2551,11 @@
"type": "string"
},
"x-order": 20
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 21
}
},
"x-order": 3
Expand Down Expand Up @@ -2660,6 +2670,11 @@
"type": "integer",
"format": "int32",
"x-order": 17
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 18
}
},
"x-order": 4
Expand Down Expand Up @@ -2807,6 +2822,11 @@
"description": "Skip TLS certificate and hostname verification.",
"type": "boolean",
"x-order": 9
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 10
}
},
"x-order": 6
Expand Down
20 changes: 20 additions & 0 deletions api/swagger/swagger-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -7685,6 +7685,11 @@
"type": "string"
},
"x-order": 17
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 18
}
},
"x-order": 2
Expand Down Expand Up @@ -7819,6 +7824,11 @@
"type": "string"
},
"x-order": 20
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 21
}
},
"x-order": 3
Expand Down Expand Up @@ -7933,6 +7943,11 @@
"type": "integer",
"format": "int32",
"x-order": 17
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 18
}
},
"x-order": 4
Expand Down Expand Up @@ -8080,6 +8095,11 @@
"description": "Skip TLS certificate and hostname verification.",
"type": "boolean",
"x-order": 9
},
"timeout": {
"description": "Connection timeout for exporter (if set).",
"type": "string",
"x-order": 10
}
},
"x-order": 6
Expand Down
Loading
Loading