Agent device cache #273
Labels
No labels
1week
2weeks
Failed compliance check
IP cameras
NATS
Possible security concern
Review effort 1/5
Review effort 2/5
Review effort 3/5
Review effort 4/5
Review effort 5/5
UI
aardvark
accessibility
amd64
api
arm64
auth
back-end
bgp
blog
bug
build
checkers
ci-cd
cleanup
cnpg
codex
core
dependencies
device-management
documentation
duplicate
dusk
ebpf
enhancement
eta 1d
eta 1hr
eta 3d
eta 3hr
feature
fieldsurvey
github_actions
go
good first issue
help wanted
invalid
javascript
k8s
log-collector
mapper
mtr
needs-triage
netflow
network-sweep
observability
oracle
otel
plug-in
proton
python
question
reddit
redhat
research
rperf
rperf-checker
rust
sdk
security
serviceradar-agent
serviceradar-agent-gateway
serviceradar-web
serviceradar-web-ng
siem
snmp
sysmon
topology
ubiquiti
wasm
wontfix
zen-engine
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
carverauto/serviceradar#273
Loading…
Add table
Add a link
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?
Imported from GitHub.
Original GitHub issue: #769
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/issues/769
Original created: 2025-05-12T17:22:45Z
Enhancement: Implement Device Information Collection in ServiceRadar Agent
Overview
This issue tracks the implementation of device information collection in the
serviceradar-agentas outlined in the [[ServiceRadar Agent Device Caching & Reporting PRD](https://github.com/carverauto/serviceradar/tree/main/sr-architecture-and-design/prd)](https://github.com/carverauto/serviceradar/tree/main/sr-architecture-and-design/prd). The agent will continue collecting rawDeviceInfofrom edge services (sweep, ICMP, port, SNMP) without local caching, includeAgentIDin responses, and rely on the core service to derive the devices stream using a Proton materialized view. Pollers will attachPollerIDto status messages, ensuring traceability.Description
The current agent collects raw data but lacks
agent_idandpoller_idtracking, and a previous plan for a localDeviceCacheraised memory footprint concerns. This implementation will:agent_idtoStatusResponse.AgentIDandPollerIDinstead of context propagation.PollerIDto service status messages.OpenPortsreference issue in the sweep service.The core service will derive the devices stream using a materialized view, aggregating and deduplicating raw data from
sweep_results,icmp_results, andsnmp_resultsstreams.Implementation Tasks
Phase 1: Core Infrastructure (Est: 3 days)
pkg/agent/types.goDeviceCache,DeviceState, andDeviceCacheConfig.ServerConfigincludesAgentID.proto/serviceradar.protoagent_idfield toStatusResponse.agent_idandpoller_idfields toServiceStatus.DeviceStatusRequest,DeviceStatusResponse, anddevicesfromPollerStatusRequest.Phase 2: Agent and Poller Updates (Est: 4 days)
pkg/agent/devices.go(entire file).GetStatus()inpkg/agent/server.goto addAgentIDfrom config toStatusResponse.ServiceCheck.execute()inpkg/poller/poller.goto preserveAgentIDfrom agent responses.reportToCore()to addPollerIDto eachServiceStatusbefore reporting.Phase 3: Testing (Est: 4 days)
GetStatusforAgentIDinclusion inStatusResponse.ServiceCheck.execute()for preservingAgentID.reportToCore()for addingPollerID.agent_idandpoller_id.agent_idandpoller_id.Notes
AgentIDandPollerIDrather than context propagation.Acceptance Criteria
agent_idin allStatusResponsemessages.agent_idfrom agent responses and addspoller_idtoServiceStatusmessages.OpenPortsis consistently populated in sweep data.Dependencies
Labels