Server statistics, multi-view record commands, and rc.3 fixes
Added:
- Server statistics: named's memory and CPU (from /proc), cache size,
sockets and client counts against their limits (statistics channel,
rndc status), host memory and load, and free disk space. Memory and
CPU are kept over time as gauges (sum and sample count, averaged in
timelines). Statistics page Server section, jarl stats server,
GET /stats/server.
- jarl record add|set|delete|disable|enable --view a,b | all: the same
change in each view, applied as one changeset.
- Blocking can be paused until resumed (jarl block pause indefinitely,
"Until I resume", {"indefinitely": true}).
Changed:
- List options (allow-transfer, forwarders, ...) get their braces added
when given without them.
- The dashboard lists named-checkconf's warnings about the running
configuration; the CLI prints them after an apply.
- Stats page: tile and card rows fill their width, and the queries and
failed answers charts share margins so their time axes line up.
- Dashboard: options have their own tile.
- 24-hour times in the web UI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b097e10bef
commit
7be0762f48
48 files changed
+1346
-128
No files matched your search
@@ -73,6 +73,8 @@ type Engine struct {
|
||||
blKick chan struct{} // a list was added or changed
|
||||
HTTP *http.Client // for downloads; nil: a default client
|
||||
Limits BlocklistLimits
|
||||
|
||||
namedCheck namedCheck // named-checkconf on the running configuration (namedwarn.go)
|
||||
}
|
||||
|
||||
// New creates an engine.
|
||||
@@ -1175,6 +1177,14 @@ type Status struct {
|
||||
MainConfig string `json:"main_config"`
|
||||
}
|
||||
|
||||
// NamedStatus asks named for its status (rndc status).
|
||||
func (e *Engine) NamedStatus(ctx context.Context) (*bind.ServerStatus, error) {
|
||||
if e.cfg.NoReload || e.tools == nil {
|
||||
return nil, errors.New("named is not managed by this jarld (no_reload)")
|
||||
}
|
||||
return e.tools.Status(ctx)
|
||||
}
|
||||
|
||||
// Status returns the current status.
|
||||
func (e *Engine) Status(ctx context.Context) (*Status, error) {
|
||||
st, err := e.store.LoadState(ctx)
|
||||
@@ -1218,7 +1228,7 @@ func (e *Engine) Status(ctx context.Context) (*Status, error) {
|
||||
}
|
||||
}
|
||||
}
|
||||
s.Problems = nonNilProblems(e.validate(st))
|
||||
s.Problems = nonNilProblems(append(e.validate(st), e.namedProblems(ctx, st, deployed)...))
|
||||
s.Counts = map[string]int{"views": len(st.Views), "zones": len(st.Zones), "records": len(st.Records), "acls": len(st.ACLs), "tsig_keys": len(st.Keys), "options": len(st.Options)}
|
||||
return s, nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user