-
Notifications
You must be signed in to change notification settings - Fork 229
PMM-15362 Disable default-on node_exporter collectors explicitly. #5841
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
Open
JiriCtvrtka
wants to merge
9
commits into
main
Choose a base branch
from
PMM-15362-node-exporter-disable-default-collectors
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8b3adca
PMM-15362 Disable default-enabled node_exporter collectors explicitly.
JiriCtvrtka 9531dbe
PMM-15362 Improvements.
JiriCtvrtka ff7f7e6
PMM-15362 Lint.
JiriCtvrtka ef085ba
PMM-15362 Improvements.
JiriCtvrtka 5e317fb
PMM-15362 Move inline comments to their own lines.
JiriCtvrtka 7211f8e
Merge branch 'main' into PMM-15362-node-exporter-disable-default-coll…
JiriCtvrtka 2c752ea
PMM-15362 Force VM config update when node_exporter collectors change.
JiriCtvrtka 4cb1355
PMM-15362 Lint.
JiriCtvrtka e454565
Merge branch 'main' into PMM-15362-node-exporter-disable-default-coll…
JiriCtvrtka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heads up on a second-order effect of this, not a blocker.
ChangeNodeExporter(managed/services/inventory/agents.go:238) never callsvmdb.RequestConfigurationUpdate(). The only thing that regenerates the VM scrape config is theStateChangedcallback atmanaged/services/agents/handler.go:272, and that arrives as the exporter is restarting. So onpmm-admin inventory change agent node-exporter --disable-collectors=diskstats:toStartingemits STARTING, server queues a VM config update?collect[]=...diskstats...with400 disabled collector: diskstatsupdateBatchDelayexpires, VM config is rewritten withoutcollect[]=diskstatsSince the 400 fails the whole resolution endpoint, the node loses every HR metric for that window, not just diskstats. Default HR is 5s (
managed/models/settings.go:206), so the real cost is zero or one missed scrape on one node.This is new behaviour: before this PR, disabling a collector could never produce a 400, because the exporter kept it enabled. I checked whether it can wedge and it can't, so I don't think it should hold the merge:
toStartingemits STARTING beforeexec,stateChangedrequests a config update on every status change and not just port changes, andSendActualStatuses(agent/client/client.go:274) re-fires on every reconnect, so a dropped connection at the wrong moment still recovers.If you want it deterministic rather than merely self-healing,
ForceConfigurationUpdate(ctx)beforeRequestStateUpdateinChangeNodeExportercloses it, which is the same pattern already used for port changes inhandler.go:262-268(PMM-14267).