suzuki-shunsuke/go-graylog

Add ability to change cluster configuration settings in terraform provider

Opened this issue · 4 comments

API Endpoints

/api/system/cluster_config

My specific use case is for:
/api/system/cluster_config/org.graylog2.messageprocessors.MessageProcessorsConfig

This would be a normal use case because pipelines are set to process before message filter chain and many people need it to come after the filter chain.

Ideally we could manage anything that shows up in the GUI in:
/system/configurations

And would be able to set other things like relative time ranges as well.

See the reference on this page about message processing order:
https://docs.graylog.org/en/3.1/pages/pipelines/stream_connections.html

Thank you for your feedback.
I'll check in this weekend.

📝

GET /system/cluster_config

{
  "total": 11,
  "classes": [
    "org.graylog2.plugin.cluster.ClusterId",
    "org.graylog2.indexer.indexset.DefaultIndexSetCreated",
    "org.graylog2.indexer.rotation.strategies.TimeBasedRotationStrategyConfig",
    "org.graylog2.indexer.searches.SearchesClusterConfig",
    "org.graylog2.indexer.retention.strategies.DeletionRetentionStrategyConfig",
    "org.graylog2.indexer.management.IndexManagementConfig",
    "org.graylog2.indexer.retention.strategies.ClosingRetentionStrategyConfig",
    "org.graylog2.indexer.indexset.DefaultIndexSetConfig",
    "org.graylog2.indexer.rotation.strategies.SizeBasedRotationStrategyConfig",
    "org.graylog2.cluster.UserPermissionMigrationState",
    "org.graylog2.indexer.rotation.strategies.MessageCountRotationStrategyConfig"
  ]
}

GET /system/cluster_config/{configClass} Get JSON schema of configuration class

/api/system/cluster_config/org.graylog2.messageprocessors.MessageProcessorsConfig

{
  "type": "object",
  "id": "urn:jsonschema:org:graylog2:messageprocessors:MessageProcessorsConfig",
  "properties": {
    "processor_order": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "disabled_processors": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}

Could you give us examples (configClass and body) of API request?
I'm not familiar with these API.

  • PUT /system/cluster_config/{configClass} Update configuration in database
  • GET /system/cluster_config/{configClass} Get configuration settings from database

I would have to dig as I'm not familiar with them either just know that I need to change that configuration and there is not a provider feature for it.

I'll try to do some digging in the next few days.