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

Problem like #24 #211

akiontke opened this issue Sep 27, 2017 · 4 comments

Problem like #24 #211

akiontke opened this issue Sep 27, 2017 · 4 comments


Copy link

@akiontke akiontke commented Sep 27, 2017

Problem description

Can't save a rule with ( in grok pattern

Steps to reproduce the problem

  1. Create Rule
rule "extract_mac"
  contains(value: to_string($message.full_message), search: "DHCPREQUEST")
    let matches = grok(pattern: "DHCPREQUEST for %{IPV4:client_ip} from %{COMMONMAC:client_mac} \\(%{NOTSPACE:client_name}\\)", value: to_string($message.full_message));
  1. Try to save


  • Graylog Version: 2.3.1
  • Pipeline Processor plugin version: 2.3.1
  • Elasticsearch Version:
  • MongoDB Version:
  • Operating System: Debian 9
  • Browser version: Google Chrome Version 61.0.3163.100 (Official Build) (64-bit)
Copy link

@joschi joschi commented Sep 27, 2017

@akiontke Please check the logs of your Graylog node(s) and attach the complete error messages which occur when trying to save the rule.

Copy link

@akiontke akiontke commented Sep 28, 2017

@joschi I get the following error message with the mentioned example.

2017-09-28T10:56:33.600+02:00 ERROR [AnyExceptionClassMapper] Unhandled exception in REST resource
java.lang.NullPointerException: null
        at org.graylog.plugins.pipelineprocessor.ast.functions.FunctionArgs.lambda$getConstantArgs$0( ~[?:?]
        at$2$1.accept( ~[?:1.8.0_102]
        at java.util.HashMap$EntrySpliterator.forEachRemaining( ~[?:1.8.0_102]
        at ~[?:1.8.0_102]
        at ~[?:1.8.0_102]
        at$ReduceOp.evaluateSequential( ~[?:1.8.0_102]
        at ~[?:1.8.0_102]
        at ~[?:1.8.0_102]
        at org.graylog.plugins.pipelineprocessor.ast.functions.FunctionArgs.getConstantArgs( ~[?:?]
        at org.graylog.plugins.pipelineprocessor.ast.functions.Function.preprocessArgs( ~[?:?]
        at org.graylog.plugins.pipelineprocessor.ast.expressions.FunctionExpression.<init>( ~[?:?]
        at org.graylog.plugins.pipelineprocessor.parser.PipelineRuleParser$RuleAstBuilder.exitFunctionCall( ~[?:?]
        at org.graylog.plugins.pipelineprocessor.parser.RuleLangParser$FunctionCallContext.exitRule( ~[?:?]
        at org.antlr.v4.runtime.tree.ParseTreeWalker.exitRule( ~[?:?]
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk( ~[?:?]
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk( ~[?:?]
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk( ~[?:?]
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk( ~[?:?]
        at org.antlr.v4.runtime.tree.ParseTreeWalker.walk( ~[?:?]
        at org.graylog.plugins.pipelineprocessor.parser.PipelineRuleParser.parseRule( ~[?:?]
        at org.graylog.plugins.pipelineprocessor.parser.PipelineRuleParser.parseRule( ~[?:?]
        at ~[?:?]
        at sun.reflect.GeneratedMethodAccessor415.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:1.8.0_102]
        at java.lang.reflect.Method.invoke( ~[?:1.8.0_102]
        at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$ ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply( ~[graylog.jar:?]
        at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply( ~[graylog.jar:?]
        at org.glassfish.jersey.server.ServerRuntime$ [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors$ [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors$ [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
        at org.glassfish.jersey.internal.Errors.process( [graylog.jar:?]
        at org.glassfish.jersey.process.internal.RequestScope.runInScope( [graylog.jar:?]
        at org.glassfish.jersey.server.ServerRuntime.process( [graylog.jar:?]
        at org.glassfish.jersey.server.ApplicationHandler.handle( [graylog.jar:?]
        at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service( [graylog.jar:?]
        at org.glassfish.grizzly.http.server.HttpHandler$ [graylog.jar:?]
        at com.codahale.metrics.InstrumentedExecutorService$ [graylog.jar:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_102]
        at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_102]
        at [?:1.8.0_102]
Copy link

@joschi joschi commented Sep 28, 2017

@akiontke I just tried to reproduce this issue on Graylog 2.3.1 (Docker image) but everything worked as expected.



Please post the contents of the System / Nodes / Details page ("Installed plugins" specifically). Maybe you're running an old/incompatible version of the Pipeline Processor Plugin?

Also check the contents of the System / Grok Patterns page and make sure that all referenced Grok patterns in your rule (IPV4, COMMONMAC, etc.) do exist.

For reference:

version: '2'
    image: mongo:3
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        soft: -1
        hard: -1
    mem_limit: 1g
    image: graylog/graylog:2.3.1-2
    mem_limit: 4g
      - GRAYLOG_PASSWORD_SECRET=somepasswordpepper
      # Password: admin
      - GRAYLOG_ROOT_PASSWORD_SHA2=8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
      - mongodb:mongo
      - elasticsearch
      - mongodb
      - elasticsearch
      - 9000:9000
Copy link

@akiontke akiontke commented Sep 28, 2017

These are the plugins in use

Name Version Author Description
Anonymous Usage Statistics 2.3.1 Graylog, Inc. A plugin for collecting anonymous usages statistics about Graylog nodes and clusters.  Website
Collector 2.3.1 Graylog, Inc. Collectors plugin  Website
Elastic Beats Input 2.3.1 Graylog, Inc. Input plugin for Elastic Beats (Beats/Lumberjack protocol).  Website
Enterprise Integration Plugin 2.3.1 Graylog, Inc Provides basic integration with Graylog Enterprise  Website
Internal Metrics InfluxDB Reporter 1.4.0 Graylog, Inc. A plugin for reporting internal Graylog metrics to InfluxDB.  Website
MapWidgetPlugin 2.3.1 Graylog, Inc. Map widget for Graylog  Website
NetFlow Plugin 2.3.0-rc.5 Graylog, Inc. Provides NetFlow inputs  Website
Pipeline Processor Plugin 2.3.1 Graylog, Inc Pluggable pipeline processing framework  Website
Slack 2.4.0 Graylog, Inc. Slack plugin to forward messages or write alarms to Slack chat rooms.  Website

All mentioned grok patterns are configured

@joschi joschi self-assigned this Sep 28, 2017
joschi pushed a commit that referenced this issue Sep 28, 2017
Jochen Schalanda
Closes #211
@joschi joschi added this to the 2.4.0 milestone Sep 28, 2017
@ghost ghost added the in progress label Sep 28, 2017
@bernd bernd closed this in dbd7981 Sep 28, 2017
@ghost ghost removed the in progress label Sep 28, 2017
bernd added a commit that referenced this issue Sep 28, 2017

Closes #211

(cherry picked from commit dbd7981)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants