metrics added for vector reload being stuck#105
Open
akshayakumar-t wants to merge 4 commits into
Open
Conversation
…of custom helper Co-Authored-By: Akshaya's Agent <akshaya.kumar+agent@sentinelone.com>
Co-Authored-By: Akshaya's Agent <akshaya.kumar+agent@sentinelone.com>
Co-Authored-By: Akshaya's Agent <akshaya.kumar+agent@sentinelone.com>
janmejay
approved these changes
May 27, 2026
janmejay-s1
approved these changes
May 27, 2026
Contributor
janmejay-s1
left a comment
There was a problem hiding this comment.
Already reviewed, rubber-stamping.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds three internal gauge metrics to detect when a Vector pod has not reloaded its configuration — either because the reload is stuck (deadlock scenario) or because it loaded an invalid config.
Context: In our multi-pod deployment, the config file is updated by a sidecar and Vector watches it for changes. We observed that some pods occasionally fail to complete a reload after a config change. Investigation traced this to a known upstream deadlock (vectordotdev/vector#24125): when a sink has queued undeliverable events at reload time, a
Pausesent to the upstream fanout creates a circular dependency that prevents the reload from ever completing. These metrics make that condition alertable without requiring a fix to the reload logic itself.Changes
src/internal_events/process.rsVectorReloadStartedinternal event, emitted at the start of every reload attemptVectorStarted,VectorReloaded,VectorReloadError,VectorConfigLoadError)src/topology/controller.rsVectorReloadStartedat the top ofTopologyController::reload()Metrics Reference
All three metrics are exposed via the
internal_metricssource and scraped asvector_<name>in Prometheus.vector_config_load_succeeded(gauge: 0 or 1)Tracks whether the currently running configuration is valid.
10Set to
1onVectorStartedandVectorReloaded. Set to0onVectorReloadErrorandVectorConfigLoadError.Alert — pod is running a bad config:
vector_reload_in_progress(gauge: 0 or 1)Tracks whether a reload is currently in flight. Set to
1when a reload begins and back to0when it completes (success or failure). If it stays at1, the reload is stuck.10Alert — reload is stuck (tune threshold to exceed your normal healthy reload time):
vector_last_reload_started_timestamp_seconds(gauge: Unix timestamp)Records the Unix timestamp (seconds) of the most recent reload attempt. Used alongside
vector_reload_in_progressto compute how long a reload has been in progress.Alert — pods diverged (some reloaded, some did not):
This fires when pods within the same job have reload timestamps more than 60 seconds apart, indicating some pods received the config change signal and others did not.