Move input state tracking to the db to avoid node wide fetch on improved inputs page#25338
Move input state tracking to the db to avoid node wide fetch on improved inputs page#25338kodjo-anipah merged 17 commits intomasterfrom
Conversation
…abase, and let the input dot use that to avoid overloading the system
Frontend Quick Review (Scoped)Focus: Frontend changes only (4 files, ~80 lines of frontend diff) SummaryReplaces the heavy The old FindingsNo Issues Found
Issue CoverageLinked issue: #25358 — "Improve fragile input state fetching"
Frontend portion addresses the nav badge consumer. Other frontend consumers ( 🤖 AI-generated review (frontend scope only) — verify findings before acting on them. |
laura-b-g
left a comment
There was a problem hiding this comment.
Frontend-wise the code looks good. I did not test it though, because my setup is messed up. Still working on that.
graylog2-server/src/main/java/org/graylog2/inputs/persistence/InputStateService.java
Outdated
Show resolved
Hide resolved
graylog2-server/src/main/java/org/graylog2/inputs/persistence/InputStateService.java
Outdated
Show resolved
Hide resolved
xd4rker
left a comment
There was a problem hiding this comment.
Backend LGTM.
Tested locally, works as expected.
Description
/nocl
part of #25358
Previously, all input state consumers relied on
GET /cluster/inputstates, which performs HTTP fan-out to every cluster node and returns fullInputStateSummaryobjects (config, creator, static fields, etc.).This approach is:
This PR is part of an incremental migration to DB-backed input state endpoints, now that input states are persisted in MongoDB (
input_runtime_statescollection).What this PR adds
Backend
GET /system/inputstates/summaryInputStatesResource{ "inputId": ["RUNNING", "FAILED"] }Remove previously made improvements to the InputRegistry and have InputRuntimeStatusProvider use new DB approach.
Frontend
useInputStateSummaryhookhasProblematicInputsbooleanInputsDotBadgeuseInputStateSummary