
This is a highly configurable Logstash Docker image built using https://registry.hub.docker.com/u/monsantoco/logstash/ process and published to the public https://registry.hub.docker.com/.
It is usually paired with an Elasticsearch instance (document database) and Kibana (as a frontend) to form what is known as an ELK stack.
To start a basic container, specify --env LS_ES_CONN_STR=[hostname/IP]:[port] (separate multiple values with comma, ',') for a remote Elasticsearch instance. This will be applied to the default logstash.conf file. For example:
shdocker run -d --name --publish 5000:5000 --env LS_ES_CONN_STR=elasticsearch.local:9200 monsantoco/logstash
Note that for connecting to an Elasticsearch cluster you should be using a proxy node or load ***, but you can use
--env LS_ES_CONN_STR=esnode1:9200,esnode2:9200,esnode3:9200to connect to multiple ES nodes as well.
The included logstash.conf file is capable of processing syslog, logstash-forwarder, systemd journal, Logspout Docker logs, and Log4j (just pass-through) content. It is highly recommended that you use your own file for best processing however.
The image exposes a few ports required by the default logstash.conf file, namely:
These exposed ports should be used in your own file though the purpose can of course be different. You can use your own configuration via command line -e CONFIG_STRING, a volume mount (--volume $PWD/conf:/etc/logstash/conf.d) or download URL (--env LS_CFG_URL=[***] Local volume mounted logstash.conf example:
shdocker run -d \ --publish 5000:5000 \ --publish 5000:5000/udp \ --publish 5002:5002 \ --publish 5004:5004 \ --publish 5006:5006 \ --publish 4560:4560 \ --volume /tmp:/etc/logstash/conf.d \ monsantoco/logstash
Remote Logstash configuration file download example:
shdocker run -d \ --publish 5000:5000 \ --publish 5000:5000/udp \ --publish 5002:5002 \ --publish 5004:5004 \ --publish 5006:5006 \ --publish 4560:4560 \ --env LS_CFG_URL=http://pastebin.com/4EsKPGNF \ monsantoco/logstash
Environment variables are accepted as a means to provide further configuration by reading those starting with LS_. Any matching variables will be used as substitution variables within Logstash's configuration file, `logstash.conf' by:
LS_ prefixlogstash.conf)The environment variable substitution also works for your configuration file (host mounted or remote download) as well, for example:
CODE_TOKEN_3
Note that the container must be able to access the URL provided, otherwise it will exit with a failure code.
This image can use either existing SSL keys and certificates, or create new ones for using Logstash-Forwarder. The latter is always done whenever no files are found in the expected location, /etc/logstash/ssl. This is an exposed volume so you can do a host volume mount to use your own files. You can also download your own remote files using the LSF_CERT_URL (certificate) and LSF_KEY_URL (key) environment variables. The container must be able to access all URLs provided, otherwise it will exit with a failure code.
以下是 monsantoco/logstash 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。



探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务