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

Fix server check consumer not knowing the stream or consumer to check #1185

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions cli/server_check_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ When set these settings will be used, but can be overridden using --waiting-crit
consumer.Flag("last-delivery-critical", "Time to allow since the last delivery").Default("0s").IsSetByUser(&c.consumerLastDeliveryCriticalIsSet).DurationVar(&c.consumerLastDeliveryCritical)
consumer.Flag("last-ack-critical", "Time to allow since the last ack").Default("0s").IsSetByUser(&c.consumerLastAckCriticalIsSet).DurationVar(&c.consumerLastAckCritical)
consumer.Flag("redelivery-critical", "Maximum number of redeliveries to allow").Default("-1").IsSetByUser(&c.consumerRedeliveryCriticalIsSet).IntVar(&c.consumerRedeliveryCritical)
consumer.Flag("pinned", "Requires Pinned Client priority with all groups having a pinned client").BoolVar(&c.consumerPinned)
consumer.Flag("pinned", "Requires Pinned Client priority with all groups having a pinned client").UnNegatableBoolVar(&c.consumerPinned)

msg := check.Command("message", "Checks properties of a message stored in a stream").Action(c.checkMsg)
msg.Flag("stream", "The streams to check").Required().StringVar(&c.sourcesStream)
Expand Down Expand Up @@ -256,7 +256,9 @@ func (c *SrvCheckCmd) checkConsumer(_ *fisk.ParseContext) error {
defer check.GenericExit()

checkOpts := &monitor.ConsumerHealthCheckOptions{
Pinned: c.consumerPinned,
StreamName: c.sourcesStream,
ConsumerName: c.consumerName,
Pinned: c.consumerPinned,
}

if c.consumerAckOutstandingCriticalIsSet {
Expand Down