Skip to content

Pipeline processor crashing #9

@jasonkeller

Description

@jasonkeller

So I've written a pipeline rule attempting to use this plugin for conditionals on additional processing, however it seems it's crashing the pipeline processor and dropping messages. It's supposed to additionally tag a message if the same fileHash value is seen in a previous message in the last minute with a different destinationHostName value (meaning we see the same file detection on two different machines within a minute).

rule "patraps-alert-filehash-1m"
when
	$message.fileHash == slookup("5a5916e3683c3d3c4875ff17", "fileHash", "fileHash", ["fileHash"], "60", "asc")[0] AND NOT
	$message.destinationHostName == slookup("5a5916e3683c3d3c4875ff17", "fileHash", "fileHash", ["destinationHostName"], "60", "asc")[0]
then
	set_field("alert", "security");
	route_to_stream("-security-");
end

I believe these are the error messages relating to this...

2018-01-18T09:33:29.617-06:00 WARN  [ProcessBufferProcessor] Unable to process message <ef13c971-fc64-11e7-bdc6-0050568a5665>: java.lang.ClassCastException: org.graylog.plugins.pipelineprocessor.ast.expressions.MessageRefExpression cannot be cast to org.graylog.plugins.pipelineprocessor.ast.expressions.LogicalExpression
2018-01-18T09:33:36.510-06:00 WARN  [ProcessBufferProcessor] Unable to process message <f3302f81-fc64-11e7-bdc6-0050568a5665>: java.lang.ClassCastException: org.graylog.plugins.pipelineprocessor.ast.expressions.MessageRefExpression cannot be cast to org.graylog.plugins.pipelineprocessor.ast.expressions.LogicalExpression

Syntax checks out in the editor, but is there something amiss with how I'm calling the function? Is it not intended to use this for conditionals in the 'when' section? I'm using 2.0.0 in Graylog 2.4.0 on RHEL7 with OpenJDK 8u131.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions