azure - 为什么 Fluentd Azure blob 插件在 kubernetes 中不起作用
问题描述
我已经使用以下命令在我的 AKS 集群中安装了 fluentd helm install fluentd bitnami-azure/fluentd --namespace mynamespace --set forwarder.configMap=fluentd-aksconfig
。
下面是我的 configmap.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: fluentd-aksconfig
namespace: mynamespace
data:
fluentd.conf: |
<match **>
@type azure-storage-append-blob
azure_storage_account mystorageaccount
azure_storage_access_key myaccesskey
azure_container aksfluentd
auto_create_container true
path logs/
azure_object_key_format %{path}%{time_slice}_%{index}.log
time_slice_format %Y%m%d-%H
# if you want to use %{tag} or %Y/%m/%d/ like syntax in path / azure_blob_name_format,
# need to specify tag for %{tag} and time for %Y/%m/%d in <buffer> argument.
<buffer tag,time>
@type file
path /var/log/fluent/azurestorageappendblob
timekey 120 # 2 minutes
timekey_wait 60
timekey_use_utc true # use utc
</buffer>
</match>
以下是从 pod 获得的错误。它显示没有名为“azure-storage-append-blob”的插件。如何解决这个问题?
日志:
[38;5;6mfluentd [38;5;5m10:03:45.15 [0m [38;5;6mfluentd [38;5;5m10:03:45.15 [0m[1m欢迎使用Bitnami fluentd容器[0m [38;5; 6mfluentd [38;5;5m10:03:45.16 [0m通过观看[1m订阅项目更新https://github.com/bitnami/bitnami-docker-fluentd[0m [38;5;6mfluentd [38;5;5m10:03 :45.16 [0m提交问题和功能请求 [1mhttps://github.com/bitnami/bitnami-docker-fluentd/issues[0m [38;5;6mfluentd [38;5;5m10:03:45.16 [0m向我们发送您的反馈在 [1mcontainers@bitnami.com[0m [38;5;6mfluentd [38;5;5m10:03:45.16 [0m [38;5;6mfluentd [38;5;5m10:03:45.16 [0m[38;5; 2mINFO [0m ==> ** 开始 Fluentd 设置 ** [38;5;6mfluentd [38;5;5m10:03:45.38 [0m[38;5;2mINFO [0m ==> ** Fluentd 设置完成!** [38;5;6mfluentd [38;5;5m10:03:45.39 [0m[38;5;2mINFO [0m ==> ** 开始 Fluentd ** 2020-02-18 10:03:/opt/bitnami/fluentd/conf/fluentd.conf" error_class=Fluent::ConfigError error="未知输出插件'azure-storage-append-blob'。运行“gem search -rd fluent-plugin”来查找插件” /opt/bitnami/fluentd/conf/fluentd.conf" error_class=Fluent::ConfigError error="未知输出插件'azure-storage-append-blob'。运行“gem search -rd fluent-plugin”来查找插件”
解决方案
默认情况下未安装azure-storage-append-blob插件。所以你需要安装它。关于如何安装 Fluentd 插件的文档在这里。
推荐阅读
- r - 如何验证不正确值的数字日期?
- asp.net - asp.net 中的安全 Cookie 和负载平衡器
- visual-studio-code - 如何在集成的 VS Code 终端中创建文件链接(不打印文件名)
- python - Discord 机器人代码不起作用(python)。我该如何解决?
- reactjs - 基于作为字符串 prop 传递的元素名称动态使用导入的元素
- node.js - 使用 Axios 将表单数据从前端发送到后端
- javascript - 如何根据同时更新的另一个对象更新一个对象的属性 - zustand?
- wordpress - 有没有办法在单击单选按钮时显示弹出窗口?
- java - 带有@ConditionalOnClass的Spring引导@Configuration不起作用
- java - 使用Java创建和访问redis数据库