The bucket must be mounted on the server on which the KUMA collector will be installed.
To mount the bucket:
sudo mkdir /home/kuma
sudo bash -c 'echo <access_key_ID>:<secret_access_key> > /home/kuma/.passwd-s3fs'
sudo chmod 600 /home/kuma/.passwd-s3fs
sudo chown -R kuma:kuma /home/kuma
sudo apt install s3fs
sudo mkdir /var/log/yandex-cloud/
sudo chown kuma:kuma /var/log/yandex-cloud/
sudo s3fs kumabucket /var/log/yandex-cloud -o passwd_file=/home/kuma/.passwd-s3fs -o url=https://storage.yandexcloud.net -o use_path_request_style -o uid=$(id -u kuma) -o gid=$(id -g kuma)
You can configure the bucket to be mounted at operating system startup by adding a line to /etc/fstab, for example:
s3fs#kumabucket /var/log/yandex-cloud fuse _netdev,uid=<kuma_uid>,gid=<kuma_gid>,use_path_request_style,url=https://storage.yandexcloud.net,passwd_file=/home/kuma/.passwd-s3fs 0 0
Where:
<kuma_uid> is the ID of the 'kuma' operating system user.
<kuma_gid> is the ID of the 'kuma' group of operating system users.
To find out the kuma_uid and kuma_gid, run the following command in the console:
id kuma
sudo ls /var/log/yandex-cloud/
If everything is configured correctly, the command returns <audit_trail_id>, where <audit_trail_id> is the audit trail ID.
Export of Yandex Cloud events is configured. Events will be located in directories in .json files:
/var/log/yandex-cloud/{audit_trail_id}/{year}/{month}/{day}/*.json
Page top