You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Fedora 39中Podman无法使用GELF日志驱动的解决咨询

在Fedora 39的Podman中启用GELF日志驱动的方法

Podman默认未包含GELF日志驱动,需安装官方提供的额外日志插件包来启用,具体步骤如下:

  • 安装containers-logging-plugin包
    该包提供了GELF、Splunk等扩展日志驱动,执行命令安装:

    sudo dnf install -y containers-logging-plugin
    
  • 重启Podman服务
    安装完成后需重启Podman以加载新插件:

    sudo systemctl restart podman
    
  • 验证驱动加载状态
    执行podman info命令,检查日志插件列表,确认gelf已存在:

    plugins:
      authorization: null
      log:
      - k8s-file
      - none
      - passthrough
      - journald
      - gelf
    
  • 重新运行容器
    此时执行你原来的容器启动命令,GELF日志驱动即可正常工作:

    podman run \
    --rm \
    --detach \
    --publish 9080:80 \
    --network pasta \
    --name nginx1 \
    --hostname nginx1 \
    --log-driver=gelf \
    --log-opt=gelf-address=udp://192.168.1.26:12201 \
    --log-opt=tag=nginx docker.io/nginx
    

内容的提问来源于stack exchange,提问作者Maverick

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.27 22:07:05