diff --git a/TODO.md b/TODO.md index b54e1187..19f8d019 100644 --- a/TODO.md +++ b/TODO.md @@ -17,6 +17,7 @@ - [ ] Info updates contain other implicit route servers - [ ] Multi-tenant accounts with isolation of subject space - [ ] Support sort options for /connz via nats-top +- [ ] Add to varz, time for slow consumers, peek connections, memory, etc. - [X] Dropped message statistics (slow consumers) - [X] Add current time to each monitoring endpoint - [X] varz uptime do days and only integer secs diff --git a/server/monitor.go b/server/monitor.go index 46b3b68c..58447860 100644 --- a/server/monitor.go +++ b/server/monitor.go @@ -233,8 +233,8 @@ func (s *Server) HandleSubsz(w http.ResponseWriter, r *http.Request) { // Varz will output server information on the monitoring port at /varz. type Varz struct { - Information *Info `json:"info"` - Options *Options `json:"options"` + *Info + *Options Start time.Time `json:"start"` Now time.Time `json:"now"` Uptime string `json:"uptime"` @@ -282,7 +282,7 @@ func myUptime(d time.Duration) string { // HandleVarz will process HTTP requests for server information. func (s *Server) HandleVarz(w http.ResponseWriter, r *http.Request) { - v := &Varz{Information: &s.info, Options: s.opts, Start: s.start} + v := &Varz{Info: &s.info, Options: s.opts, Start: s.start} v.Now = time.Now() v.Uptime = myUptime(time.Since(s.start))