Graylog2 / graylog2-server

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

Content Pack installation does not detect existing Event Definition entities #19065

Open williamtrelawny opened 5 months ago

williamtrelawny commented 5 months ago

Given a content pack containing:

If the Stream and ED-1 already exist on the system and you install this new content pack, it will create a duplicate ED-1 but not a duplicate Stream.

This indicates there is some intelligent matching of Stream entities in Content Packs to pre-existing ones on the target system, but there is no such matching for Event Definitions.

Expected Behavior

If an Event Definition that a content pack provides already exists (by name not ID) on the target system, then content pack installation should skip the installation of its copy of the Event Definition.

Current Behavior

Content Pack installation creates a copy of the Event Definition (with a different object ID of course).

Possible Solution

Whatever intelligent matching is done for Streams in this fashion should be done as well for Event Definitions too.

Steps to Reproduce (for bugs)

  1. Install this Content Pack first
  2. Then install this one

Context

Affects my ability to install Correlation Event Definitions based on content previously built upon.

Your Environment

waab76 commented 4 months ago

Event Definitions have the same issue that Streams had where we only identify them by ID and do not enforce uniqueness on the names. This is a messy issue and we will need to consult with Architecture on how to approach this.