Skip to content

Commit

Permalink
Merge pull request #1185 from ripienaar/consumer_check
Browse files Browse the repository at this point in the history
Fix server check consumer not knowing the stream or consumer to check
  • Loading branch information
ripienaar authored Nov 19, 2024
2 parents b1843c6 + 1a0c630 commit 18f677a
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 18f677a

Please sign in to comment.