Skip to content

Commit

Permalink
Merge branch 'main' into jnm/fix_consumer_add_multifilter_prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
jnmoyne authored Sep 28, 2023
2 parents c80e008 + 7f0e5e4 commit 033fd69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func commonConfigure(cmd commandHost, cliOpts *Options, disable ...string) error
}

if opts.PrometheusNamespace == "" {
opts.PrometheusNamespace = ""
opts.PrometheusNamespace = "nats_server_check"
}

ctx = context.Background()
Expand Down
5 changes: 4 additions & 1 deletion cli/server_report_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type SrvReportCmd struct {

filterExpression string
account string
user string
waitFor int
sort string
topk int
Expand Down Expand Up @@ -73,6 +74,7 @@ func configureServerReportCommand(srv *fisk.CmdClause) {
conns.Flag("sort", "Sort by a specific property (in-bytes,out-bytes,in-msgs,out-msgs,uptime,cid,subs)").Default("subs").EnumVar(&c.sort, "in-bytes", "out-bytes", "in-msgs", "out-msgs", "uptime", "cid", "subs")
conns.Flag("top", "Limit results to the top results").Default("1000").IntVar(&c.topk)
conns.Flag("subject", "Limits responses only to those connections with matching subscription interest").StringVar(&c.subject)
conns.Flag("username", "Limits responses only to those connections for a specific authentication username").StringVar(&c.user)
conns.Flag("json", "Produce JSON output").Short('j').UnNegatableBoolVar(&c.json)
conns.Flag("filter", "Expression based filter for connections").StringVar(&c.filterExpression)

Expand Down Expand Up @@ -330,7 +332,7 @@ func (c *SrvReportCmd) reportJetStream(_ *fisk.ParseContext) error {
}

table := newTableWriter("RAFT Meta Group Information")
table.AddHeaders("Name", "ID", "Leader", "Current", "Online", "Active", "Lag")
table.AddHeaders("Connection Name", "ID", "Leader", "Current", "Online", "Active", "Lag")
for i, replica := range cluster.Replicas {
leader := ""
peer := replica.Peer
Expand Down Expand Up @@ -694,6 +696,7 @@ func (c *SrvReportCmd) getConnz(limit int, nc *nats.Conn) (connzList, error) {
Subscriptions: true,
SubscriptionsDetail: false,
Username: true,
User: c.user,
Account: c.account,
FilterSubject: c.subject,
},
Expand Down

0 comments on commit 033fd69

Please sign in to comment.