You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
acct:=report.Command("accounts", "Report on account activity").Alias("acct").Action(c.reportAccount)
85
85
acct.Arg("account", "Account to produce a report for").StringVar(&c.account)
86
86
acct.Arg("limit", "Limit the responses to a certain amount of servers").IntVar(&c.waitFor)
87
-
addFilterOpts(acct)
88
87
acct.Flag("sort", "Sort by a specific property (in-bytes,out-bytes,in-msgs,out-msgs,conns,subs)").Default("subs").EnumVar(&c.sort, "in-bytes", "out-bytes", "in-msgs", "out-msgs", "conns", "subs")
89
88
acct.Flag("top", "Limit results to the top results").Default("1000").IntVar(&c.topk)
conns:=report.Command("connections", "Report on connections").Alias("conn").Alias("connz").Alias("conns").Action(c.reportConnections)
93
93
conns.Arg("limit", "Limit the responses to a certain amount of servers").IntVar(&c.waitFor)
94
94
conns.Flag("account", "Limit report to a specific account").StringVar(&c.account)
95
-
addFilterOpts(conns)
96
95
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")
97
96
conns.Flag("top", "Limit results to the top results").Default("1000").IntVar(&c.topk)
98
97
conns.Flag("subject", "Limits responses only to those connections with matching subscription interest").StringVar(&c.subject)
99
98
conns.Flag("username", "Limits responses only to those connections for a specific authentication username").StringVar(&c.user)
100
99
conns.Flag("state", "Limits responses only to those connections that are in a specific state (open, closed, all)").PlaceHolder("STATE").Default("open").EnumVar(&c.stateFilter, "open", "closed", "all")
101
100
conns.Flag("closed-reason", "Filter results based on a closed reason").PlaceHolder("REASON").StringVar(&c.filterReason)
gateways:=report.Command("gateways", "Repost on Gateway (Super Cluster) connections").Alias("super").Alias("gateway").Action(c.reportGateway)
110
110
gateways.Flag("filter-name", "Limits responses to a certain name").StringVar(&c.gatewayName)
111
111
gateways.Flag("sort", "Sorts by a specific property (server,cluster)").Default("cluster").EnumVar(&c.sort, "server", "cluster")
112
+
addFilterOpts(gateways)
112
113
113
114
health:=report.Command("health", "Report on Server health").Action(c.reportHealth)
114
115
health.Flag("js-enabled", "Checks that JetStream should be enabled on all servers").Short('J').BoolVar(&c.jsEnabled)
115
116
health.Flag("server-only", "Restricts the health check to the JetStream server only, do not check streams and consumers").Short('S').BoolVar(&c.jsServerOnly)
116
117
health.Flag("account", "Check only a specific Account").StringVar(&c.account)
117
118
health.Flag("stream", "Check only a specific Stream").StringVar(&c.stream)
118
119
health.Flag("consumer", "Check only a specific Consumer").StringVar(&c.consumer)
120
+
addFilterOpts(health)
119
121
120
122
jsz:=report.Command("jetstream", "Report on JetStream activity").Alias("jsz").Alias("js").Action(c.reportJetStream)
121
123
jsz.Arg("limit", "Limit the responses to a certain amount of servers").IntVar(&c.waitFor)
122
-
addFilterOpts(jsz)
123
124
jsz.Flag("account", "Produce the report for a specific account").StringVar(&c.account)
124
125
jsz.Flag("sort", "Sort by a specific property (name,cluster,streams,consumers,msgs,mbytes,mem,file,api,err").Default("cluster").EnumVar(&c.sort, "name", "cluster", "streams", "consumers", "msgs", "mbytes", "bytes", "mem", "file", "store", "api", "err")
125
126
jsz.Flag("compact", "Compact server names").Default("true").BoolVar(&c.compact)
127
+
addFilterOpts(jsz)
128
+
129
+
leafs:=report.Command("leafnodes", "Report on Leafnode connections").Alias("leaf").Alias("leafz").Action(c.reportLeafs)
130
+
leafs.Flag("account", "Produce the report for a specific account").StringVar(&c.account)
131
+
leafs.Flag("sort", "Sort by a specific property (server,name,account,subs,in-bytes,out-bytes,in-msgs,out-msgs)").EnumVar(&c.sort, "server", "name", "account", "subs", "in-bytes", "out-bytes", "in-msgs", "out-msgs")
132
+
addFilterOpts(leafs)
126
133
127
134
mem:=report.Command("mem", "Report on Memory usage").Action(c.reportMem)
routes:=report.Command("routes", "Report on Route (Cluster) connections").Alias("route").Action(c.reportRoute)
132
-
routes.Flag("cluster", "Limits the report to a specific cluster").StringVar(&c.cluster)
133
139
routes.Flag("sort", "Sort by a specific property (server,cluster,name,account,subs,in-bytes,out-bytes)").EnumVar(&c.sort, "server", "cluster", "name", "account", "subs", "in-bytes", "out-bytes")
0 commit comments