为Docker中运行的Graylog2服务器自动创建UDP输入?

Kim*_*ble 7 graylog2 docker

我们在开发环境中的Docker容器中运行Graylog2服务器.除了我们每次启动容器时都必须重新创建UDP输入这一事实之外,它就像一个魅力.

有没有人想出一种自动创建Graylog2输入的便捷方法?

flo*_*lob 12

我们在新创建的docker容器中使用自动加载的内容包.

仅对3.0之前的 Graylog 有效,请参阅 此拉取请求.

Dockerfile:

FROM graylog2/server:latest
COPY udp-input-graylog.json /usr/share/graylog/data/contentpacks
ENV GRAYLOG_CONTENT_PACKS_AUTO_LOAD udp-input-graylog.json
ENV GRAYLOG_CONTENT_PACKS_LOADER_ENABLED true
ENV GRAYLOG_CONTENT_PACKS_DIR data/contentpacks
Run Code Online (Sandbox Code Playgroud)

UDP-输入graylog.json:

{
  "name":"UDP GELF input on 12201",
  "description":"Adds a global UDP GELF input on port 12201",
  "category":"Inputs",
  "inputs":[
    {
      "title":"udp input",
      "configuration":{
        "override_source":null,
        "recv_buffer_size":262144,
        "bind_address":"0.0.0.0",
        "port":12201,
        "decompress_size_limit":8388608
      },
      "static_fields":{},
      "type":"org.graylog2.inputs.gelf.udp.GELFUDPInput",
      "global":true,
      "extractors":[]
    }
  ],
  "streams":[],
  "outputs":[],
  "dashboards":[],
  "grok_patterns":[]
}
Run Code Online (Sandbox Code Playgroud)