企业微信
参考下面的项目自己完成
构建 s3 存储
下载
wget http://dl.minio.org.cn/server/minio/release/linux-amd64/minio
运行
# --compat兼容aws s3
mkdir ./s3
MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 ./minio --compat server $PWD/s3 --address :1001 >$PWD/minio.log 2>&1 &
开机启动
chmod a+x /etc/rc.d/rc.local
# minio要用绝对路径
echo "MINIO_ROOT_USER=minio MINIO_ROOT_PASSWORD=minio123 $PWD/minio --compat server $PWD/s3 --address :8888 >$PWD/minio.log 2>&1 &" >> /etc/rc.d/rc.local
grafana + minio-s3
采用 s3 + minio 方式图片上传失败 错误 could not find bucket setting for image.uploader.s3
配置 s3 保存截图
#################################### External image storage ##########################
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
# you can choose between (s3, webdav, gcs, azure_blob, local)
provider = s3
[external_image_storage.s3]
endpoint = https://oss-cn-shanghai-internal.aliyuncs.com
;path_style_access =
bucket = appbak2019
region = oss-cn-shanghai
;path =
access_key = 密钥
secret_key = 密钥
本地存储
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
# you can choose between (s3, webdav, gcs, azure_blob, local)
provider = local
使用
采用local 模式时,imageURL 参数的值为 http://localhost:3000/public/img/attachments/YSrx5udqcS4E31e3e2cR.png
其中 localhost 由 server 段配置
图片保存在 grafana-storage/png/ 目录中