Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grok extractor doesn't reload pattern after it has been changed #5833

Closed
bernd opened this issue Apr 3, 2019 · 0 comments · Fixed by #5982

Comments

@bernd
Copy link
Member

commented Apr 3, 2019

Expected Behavior

When updating a grok pattern, the grok extractor should use the updated pattern.

Current Behavior

After updating a grok pattern, the grok extractor doesn't update and is still using the old pattern value. I had to restart the server to make it use the updated pattern.

Possible Solution

We send a GrokPatternsUpdatedEvent when a grok pattern gets updated. The grok extractor needs to listen for these and reload the patterns.

Steps to Reproduce (for bugs)

  1. Create Grok pattern
  2. Use Grok pattern in extractor
  3. Update Grok pattern
  4. Check logs that extractor is still using the old pattern

Your Environment

  • Graylog Version: 3.0.1

@bernd bernd added the bug label Apr 3, 2019

@florianvolle florianvolle added the triaged label Apr 8, 2019

@kmerz kmerz self-assigned this May 31, 2019

kmerz added a commit that referenced this issue May 31, 2019
Use GrokPatternRegistry to reload saved grok patterns
Prior to this change, a edit on a grok pattern did not
reflect on the used pattern in GrokExtractors

This change uses the GrokPatternRegistry which is
contains all grok patterns and is connected to the
cluster event bus and reloads when a grok pattern is
edit.

One test needed to be moved since it was testing the
grok pattern service which is not used anymore in the
GrokExtractor directly. There for the test was moved
to the MongoDbGrokPatternServiceTest where it belongs.

Fixes #5833
kmerz added a commit that referenced this issue Jul 5, 2019
Use GrokPatternRegistry to reload saved grok patterns
Prior to this change, a edit on a grok pattern did not
reflect on the used pattern in GrokExtractors

This change uses the GrokPatternRegistry which is
contains all grok patterns and is connected to the
cluster event bus and reloads when a grok pattern is
edit.

One test needed to be moved since it was testing the
grok pattern service which is not used anymore in the
GrokExtractor directly. There for the test was moved
to the MongoDbGrokPatternServiceTest where it belongs.

Fixes #5833

@bernd bernd closed this in #5982 Jul 8, 2019

bernd added a commit that referenced this issue Jul 8, 2019
Use GrokPatternRegistry to reload saved grok patterns (#5982)
* Use GrokPatternRegistry to reload saved grok patterns

Prior to this change, a edit on a grok pattern did not
reflect on the used pattern in GrokExtractors

This change uses the GrokPatternRegistry which is
contains all grok patterns and is connected to the
cluster event bus and reloads when a grok pattern is
edit.

One test needed to be moved since it was testing the
grok pattern service which is not used anymore in the
GrokExtractor directly. There for the test was moved
to the MongoDbGrokPatternServiceTest where it belongs.

Fixes #5833
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.