The statistics writer records DHCP message rates, relayed traffic and active leases per protocol and scope #116
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
#112 A statistics service aggregates every answered query in memory and writes this node's counters, answer mix, upstream latency and top-N rollups each minute
lantea-one/ninlil
#113 Shared DHCP message counters exist, and the DHCPv4 and DHCPv6 engines count every message they receive and every reply they send
lantea-one/ninlil
#114 The DHCPv4 and DHCPv6 relay agents count the requests and replies they forward and the messages they drop
lantea-one/ninlil
#115 Lease storage counts active leases per scope in the database
lantea-one/ninlil
Reference
lantea-one/ninlil#116
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
#113, #114 and #115 produce the numbers; this writes them as series next to the DNS ones, under this node's id.
What changes
src/dotnet/src/Ninlil.Dns.Server.Statistics, which gains references toNinlil.Dhcp.CommonandNinlil.Dhcp.Data.Abstractions:Drain()theIDhcpMessageCounters(resolved withGetService) and add counters, categoriesdhcp-v4anddhcp-v6, minute and hour rows like the DNS counters:received.<TYPE>,sent.<TYPE>,sent.NONE;relay.request.forwarded,relay.reply.forwarded,relay.dropped.CountActiveByScopeAsyncand set gaugesleases.active(per protocol) andleases.active.scope.<scope>(per scope). The minute row gets the sample; the hour row gets the latest sample of the hour.Off,LocalorRelay:LocalwhenDhcpv4ProtocolOptions.Enable(orDhcpv6ProtocolOptions.Enable) is set and the relay option is not,Relaywhen both are set (src/dotnet/src/Ninlil.Web/Startup/DhcpServiceRegistration.cs:48-76). Put this rule in one helper (DhcpProtocolModeResolver) that #118 reuses.Localmode (a relay node holds no leases).StatisticsOptions.Enable = falsestops them too. No new option.Acceptance
src/dotnet/tests/Ninlil.Dns.Server.Statistics.Tests: with fake counters reporting 3 DISCOVER and 2 OFFER, a flush addsdhcp-v4received.DISCOVER = 3andsent.OFFER = 2.dhcp-v6relay.request.forwarded = 4andrelay.reply.forwarded = 4.Localmode, a flush setsleases.active = 5and the scope's gauge to 5; inRelaymode no lease gauge is written.Offand no counts, nodhcp-v4rows are written.src/dotnet/tests/Ninlil.Web.Testspasses (DI wiring). No schema, API or option change.Source