collector-sidecar icon indicating copy to clipboard operation
collector-sidecar copied to clipboard

Generate unique working directory for each collector backend

Open mpfz0r opened this issue 6 years ago • 0 comments

Each collector relies on a place to write its own logs, spool files, etc. We want to ensure that multiple collectors don't step on each others toes.

Possible solution:

  • Redefine collector_configuration_directory: to collector_data_root_directory: with a default of /var/lib/graylog-sidecar/collector-data/

  • For each configuration assignment, auto-generate the following subdirectories: $collector_data_root_directory/<backend-name>/<config-name>/ or maybe $collector_data_root_directory/<backend-id>/<config-id>/

  • Report the value of collector_data_root_directory back to Graylog, so we can generate a variable ${sidecar.dataRoot} and maybe ${sidecar.collectorDataDir}. This can be used in collector configurations like:

path.data: ${sidecar.collectorDataDir}/data path.log: ${sidecar.collectorDataDir}/log

Open questions:

  • Which permissions should we give this directory?
  • Do we need clean up on de configuration of a collector
  • Do we need a UI

mpfz0r avatar Jan 11 '19 15:01 mpfz0r