Conversation
- Decouple collector ingest input lifecycle from collectors config - Remove enabled toggle and inputId linkage from IngestEndpointConfig - Expose transport config fields via allowlist in CollectorIngestHttpTransport - Extract CollectorIngestInputService from CollectorsConfigResource - Add separate GET /collectors/config/inputs endpoint for input IDs - Add create_input flag to PUT /collectors/config for onboarding bootstrap - Reject input creation in cloud environments - Simplify OpAmpService supplier to non-Optional backed by getOrDefault() - DEV migration: clean http sub-object and backfill input config defaults - Rewrite CollectorsSettings UI with Formik, extract IngestEndpointStatus - Add useCollectorInputIds hook for separate input ID fetching Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Gate create-input checkbox on inputs:create + input_types:create permissions - Map backend validation error keys to Formik field names so threshold errors surface inline on the correct TimeUnitInput fields - Remove unused Section styled component - Fix stale test: heading 'HTTP' → 'Ingest Endpoint', create_input expectation true → false for configured state, mock useInputMutations - Drop transport config overrides from createInput() and migration — only bind_address and port need explicit values, rest uses generic defaults Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace handcrafted Subject mock and SecurityTestUtils setup with the declarative @WithAuthorization annotation and extension, matching the pattern from EnrollmentTokenResourceTest. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Deleted inputs are filtered out silently via isSuccess check instead of showing a toast notification via defaultOnError. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@kroepke, @bernd, I'd like to get your opinion on the following matter. This PR contains code to handle a scenario where a collector input exists but a user can't see it because they don't have the required permissions. However, with the Reader role granting I'm inclined to remove that code, even though it may eventually become relevant, should we ever implement entity sharing for inputs. But even if that moment ever comes, the code would need re-testing because it never triggered. What do you think? |
graylog2-web-interface/src/components/collectors/settings/CollectorsSettings.test.tsx
Outdated
Show resolved
Hide resolved
There are a few places in the code that still have generic |
OK, thanks for the feedback. I added some comments and left the code in. |
…ingest-input-management # Conflicts: # graylog2-web-interface/src/components/collectors/settings/CollectorsSettings.test.tsx # graylog2-web-interface/src/components/collectors/settings/CollectorsSettings.tsx
graylog2-server/src/main/java/org/graylog/collectors/opamp/OpAmpService.java
Show resolved
Hide resolved
graylog2-server/src/main/java/org/graylog/collectors/opamp/OpAmpService.java
Show resolved
Hide resolved
| .collectorExpirationThreshold(effectiveExpiration) | ||
| .build(); | ||
|
|
||
| if (Boolean.TRUE.equals(request.createInput())) { |
There was a problem hiding this comment.
can createInput just be a boolean instead of the boxed version?
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Show error toast on input detail fetch failure instead of silently treating errors as absent inputs. Extract PortMismatchAlert into its own component file. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ingest-input-management # Conflicts: # graylog2-server/src/main/java/org/graylog/collectors/CollectorsConfigService.java # graylog2-server/src/main/java/org/graylog/collectors/input/transport/CollectorIngestHttpTransport.java # graylog2-server/src/test/java/org/graylog/collectors/CollectorCaServiceTest.java # graylog2-server/src/test/java/org/graylog/collectors/opamp/auth/AgentTokenServiceTest.java
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I've added some stuff to help the user avoid the pitfall of inadvertently configuring a different port on the input than on the collector settings page. The generic config dialog for the collectors input now shows a description explaining the purpose of the input and the relationship to the collectors settings. The help text for the The collector settings page makes it more explicit that users are configuring the Also fixed some stale state when navigating between tabs or between input table and settings page. |
kroepke
left a comment
There was a problem hiding this comment.
looks good to me, much nicer to use.
i've flagged some minor fully qualified imports in tests, but nothing serious.
| final var input1 = mock(org.graylog2.inputs.Input.class); | ||
| final var input2 = mock(org.graylog2.inputs.Input.class); |
| when(messageInput.asMap()).thenReturn(Map.of()); | ||
| when(messageInputFactory.create(any(InputCreateRequest.class), anyString(), isNull(), anyBoolean())) | ||
| .thenReturn(messageInput); | ||
| final var input = mock(org.graylog2.inputs.Input.class); |
| @Test | ||
| void portDescriptionIncludesConfiguredPort() { | ||
| final var config = CollectorsConfig.builder() | ||
| .http(new org.graylog.collectors.IngestEndpointConfig("host", 14401)) |
Decouples the collector ingest input from the collectors config lifecycle. Previously, the input was fully managed by the config — created, started, stopped, and deleted as part of config saves. Now the input is a regular, user-manageable input that can be independently configured, started, stopped, and deleted without affecting the collectors config or collector behavior.
The collectors config page becomes the external endpoint configuration (hostname + port pushed to collectors) plus lifecycle thresholds. Input management moves to the standard inputs page, with a convenience bootstrap on first setup and status visibility on the settings page.
Collectors always receive their endpoint configuration regardless of input state. If no input is running, collectors fail to connect and retry — their persistent queues are preserved and drain when an input comes back up. This avoids data loss from transient input restarts or accidental deletions.
/nocl