Change where winlogbeat logs are stored

Hello,

im trying to change where Winlogbeat stores client logs to a second drive i mounted at /mnt/logs/. im running a single Graylog Node.

since i made the changes the data node is not starting.

nano /etc/graylog/datanode/datanode.conf
opensearch_location = /usr/share/graylog-datanode/dist
opensearch_config_location = /var/lib/graylog-datanode/opensearch/config
opensearch_data_location = /mnt/logs/opensearch/data
opensearch_logs_location = /mnt/logs/opensearch/logs

nano /var/lib/graylog-datanode/opensearch/config/opensearch/opensearch.yml
cluster.initial_cluster_manager_nodes: “ad-log”
path.data: “/mnt/logs/opensearch/data”
path.logs: “/mnt/logs/opensearch/logs”

sudo systemctl status graylog-datanode
● graylog-datanode.service - Graylog data node
Loaded: loaded (/lib/systemd/system/graylog-datanode.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2024-11-28 15:39:36 CET; 1s ago
Docs: http://docs.graylog.org/
Process: 36412 ExecStart=/usr/share/graylog-datanode/bin/graylog-datanode datanode -f /etc/graylog/datanode/datanode.conf -np (code=exited, status=1/FAILURE)
Main PID: 36412 (code=exited, status=1/FAILURE)

i solved the problem. I had to change the permissions of the Path:/mnt/logs/opensearch/data to graylog-datanode:graylog-datanode.