Generate unique working directory for each collector backend
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:tocollector_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_directoryback 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