graylog-plugin-pipeline-processor
graylog-plugin-pipeline-processor copied to clipboard
Create Rule with REST API does not work correctly
Problem description
Is impossible to create a Rule using REST test on Graylog UI api-browser (POST on /plugins/org.graylog.plugins.pipelineprocessor/system/pipelines/rule)
Steps to reproduce the problem
- Go to Graylog api-browser and open Plugins/Pipelines/Rules : Rules for the pipeline message processor (POST /plugins/org.graylog.plugins.pipelineprocessor/system/pipelines/rule)
- Try to insert a Rule like this:
{
"title": "test_has_field",
"description": "",
"source": "rule \"test_has_field\"\r\n\r\nwhen \r\n true\r\n \r\nthen\r\n \r\n end\r\n",
"errors": null
}
- Result:
{
"type": "ApiError",
"message": "Can not construct instance of org.graylog.plugins.pipelineprocessor.rest.RuleSource, problem: Should never call 'set' on setterless property\n at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@18a041d3; line: 7, column: 3]"
}
Environment
Graylog Version: v2.2.3+7adc951 Pipeline Processor plugin version:2.2.3 Elasticsearch Version: docker image: 'elasticsearch:2' MongoDB Version: docker image: 'mongo:3' Operating System: Docker host: ubuntu Browser version: Chrome 59.0.3071.115
There is a news. I discovered that the problem is the errors field. In fact, removing it the ReST API works fine.
@gianluca-valentini Yes, errors
is supposed to be a read-only field and not part of the payload.
This being said, Graylog shouldn't throw an error if the errors
field is set.