graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

Graylog REST API is inconsistent for 'id' field creating from endpoint

Open makstock opened this issue 3 years ago • 2 comments

The Graylog REST API is inconsistent with regard to "id" field (Stream and Outputs).

What?

It should be possible to give an ID value while creating all REST resources which will then be used in all following requests/responses. Rules and Pipelines are like this at the moment, but Stream and Outputs are not.

image

Why?

We would like to use external configuration management (like ansible or puppet) to fully manage our configuration in Graylog, this requires to be able to set the initial id for all resources via the external tool. This allows a homogenous environment regarding IDs over different Graylog clusters (in our env 7 Clusters). Currently, two streams (same named, and should behave the same) in two environments are currently having different ids, as we can not set them while creating the resource.

Be able to use external configuration management tools which can fully handle the Graylog configuration from initial creation over updates to deletes if the resources are not needed anymore (decommission).

Your Environment

  • Graylog Version: 4.2.7
  • Elasticsearch Version: 7.10
  • MongoDB Version: 4.4
  • Operating System:
  • Browser version:
  • Context: HS#836730717

makstock avatar Mar 31 '22 10:03 makstock

I think we should add this as a best practice for all CRUD-endpoints were offering on our REST API, existing and future ones.

dennisoelkers avatar Apr 01 '22 08:04 dennisoelkers

+1 this!

I'm in the proces of building an ansible playbook to deploy our graylog server, and not being able to set id for streams is a real bummer. I can't see any way other then creating them in the UI and commenting the ansible playbook about it.

einsibjarni avatar Aug 29 '22 13:08 einsibjarni