Graylog API Question (pipeline)


(David) #1

Hello Graylog Community,

I am currently attempting to create a pipeline using the graylog API, using the following api call:

curl -X POST -H’Content-Type: application/json’ -u admin:pass http://{{ graylog_server }}:9000/api/plugins/org.graylog.plugins.pipelineprocessor/system/pipelines/pipeline

with the following payload:

{“title”: “{{ agent_name }}”, “description”: “{{ client_name }} rules.”, “source”: “pipeline “{{ client_name }} rules”\nstage 0 match either\nend”, “stages”: [{“match_all”:false,“rules”:["{{ client_name }}"],“stage”: 0}]}

Where there is a rule named with the value of {{ client_name }} variable.

However, the stages segment is ignored and I am confident that the pipeline rule has been created and should be able to be manipulated.

Is there a specific API format meant to be used for creating a pipeline with stages? The documentation doesn’t provide adequate examples in the section and I am mirroring the output of the GET request of a pipeline which has been created manually.

Any help here would be greatly appreciated!

David


(system) #2

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.