Graylog2 / graylog2-server

Free and open log management
https://www.graylog.org
Other
7.35k stars 1.06k forks source link

Pipeline connections are not / can not be deleted via API #19838

Open bdkuhman opened 2 months ago

bdkuhman commented 2 months ago

Expected Behavior

Pipeline connections are deleted/removed after deleting a pipeline or stream

Current Behavior

After deleting a stream or pipeline, Entries remain in the connections Attempting to modify a connection through the API results in "Stream <> not found!" or "No pipeline with id " responses.

Possible Solution

a DELETE endpoint /system/pipelines/connections/<connection_id> to be able to clear out an empty stream ID When a pipeline is deleted, the pipeline is cleared from all stream connections When a stream is deleted, it is removed from the connections

Steps to Reproduce (for bugs)

  1. Create a Stream
  2. Create a pipeline
  3. Connect stream to pipeline
  4. Delete Stream, or Pipeline
  5. Response data from GET /system/pipelines/connections still contains data for deleted stream/pipeline

Context

I was playing around with the API, and noticed this behavior when trying to write a script to automate some tasks, that connections stick around.

Your Environment

tellistone commented 2 months ago

Note: not reflected in the UI, specific to API