Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从docker容器内部使用metricbeat系统模块监控主机_Docker_<img Src="//i.stack.imgur.com/RUiNP.png" Height="16" Width="18" Alt="" Class="sponsor Tag Img">elasticsearch_Docker Compose_Metricbeat - Fatal编程技术网 elasticsearch,docker-compose,metricbeat,Docker,elasticsearch,Docker Compose,Metricbeat" /> elasticsearch,docker-compose,metricbeat,Docker,elasticsearch,Docker Compose,Metricbeat" />

从docker容器内部使用metricbeat系统模块监控主机

从docker容器内部使用metricbeat系统模块监控主机,docker,elasticsearch,docker-compose,metricbeat,Docker,elasticsearch,Docker Compose,Metricbeat,我正在使用docker compose来配置Metricbeat的系统模块,我已经创建了Metricbeat.yml和system.yml,并装载到我的docker compose文件中 例: 但是当重新启动容器时,我得到一个错误 Exiting: error initializing publisher: error initializing processors: Got permission denied while trying to connect to the Docker daem

我正在使用docker compose来配置Metricbeat的系统模块,我已经创建了
Metricbeat.yml
system.yml
,并装载到我的docker compose文件中

例:

但是当重新启动容器时,我得到一个错误

Exiting: error initializing publisher: error initializing processors: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.22/containers/json?limit=0: dial unix /var/run/docker.sock: connect: permission denied

你的
docker compose.yml
是什么样子的?默认情况下,docker套接字在容器中不可用。如果您试图监视主机系统,在docker这样的隔离层中运行监视工具可能不是您想要的:您将无法看到主机系统的实际网络接口、其他进程、日志文件、,等等。您需要在此处添加docker compose文件,docker服务是否正在运行?Heyy各位,感谢您的回复,问题是我想使用metricbeat监控主机系统我正在使用docker compose文件配置Elastic kibana和metric beat。我有一个问题,比如我是否可以使用metric beat从docker容器访问主机系统信息,并将日志加载到kibana仪表板我下面的链接----我根据LymetricBeat主机进行了更改:image:docker.elastic.co/beats/metricbeat:6.8.9卷:-/proc:/hostfs/proc:ro-/sys/fs/cgroup:/hostfs/sys/fs/cgroup:ro-/:/hostfs:ro-/var/run/docker.sock:/var/run/docker.sock:ro-/opt/prism/config/metricbeat/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro-/opt/prism/config/metricbeat/modules.d/:/usr/share/metricbeat/modules/d/environment:system.hostfs:/hostfs:/hostfs网络模式:使用此my docker服务的主机正在运行,但
Exiting: error initializing publisher: error initializing processors: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.22/containers/json?limit=0: dial unix /var/run/docker.sock: connect: permission denied