The statistics API returns the DHCP mode, pool utilisation per scope, active leases over time, message rates and relayed traffic #118
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
lantea-one/ninlil#118
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
The console must know whether to show DHCP charts and which ones, and needs the DHCP series. Today it could only call
GET api/dhcp/scopes/{id}/statisticsonce per scope.What changes
In
StatisticsController(#117):GET dhcp/summary:{ dhcpv4Mode, dhcpv6Mode, scopes[] }. The modes areOff,LocalorRelayfor this node, by the #116 rule (DhcpProtocolModeResolver).scopes[]is filled only for a protocol inLocalmode. Each scope entry carries id, name, protocol, kind and theDhcpScopeStatisticsfields fromIDhcpScopeStatisticsService.ComputeAsync(slot counts as decimal strings, asDhcpScopesController.Statisticssends them,DhcpScopesController.cs:120-132), plus a utilisation percentage.nodeId.GET dhcp/timeseries?protocol=IPv4|IPv6&fromUtc&toUtc&bucket=Minute|Hour&nodeId: per bucket the message counts by received and sent type, the relay counts (requests forwarded, replies forwarded, dropped) and the active-lease gauge in total and per scope.dhcpscopes:read(the permission of the existing scope statistics,DhcpScopesController.cs:109) and are[ReadFromReplica].Acceptance
src/dotnet/tests/Ninlil.Web.Testsfails first: with DHCP disabled in the shared host,GET dhcp/summaryreturnsdhcpv4Mode: "Off"anddhcpv6Mode: "Off".factory.CreateSecondHost) with the DHCPv4 engine enabled on a free port and one scope returnsdhcpv4Mode: "Local"and that scope inscopes[]withtotalSlotsas a string.dhcpv4Mode: "Relay"and an emptyscopes[]; after a forced flush of fake relay counts,dhcp/timeseries?protocol=IPv4carries them.dhcpscopes:read; 400 on reversed ranges.Source