自学内容网 自学内容网

Linux可视化工具-netdata之docker安装

版本要求

docker cli安装

docker pull netdata/netdata

docker run -d --name=netdata \
--pid=host \
--network=host \
-v netdataconfig:/etc/netdata \
-v netdatalib:/var/lib/netdata \
-v netdatacache:/var/cache/netdata \
-v /:/host/root:ro,rslave \
-v /etc/passwd:/host/etc/passwd:ro \
-v /etc/group:/host/etc/group:ro \
-v /etc/localtime:/etc/localtime:ro \
-v /proc:/host/proc:ro \
-v /sys:/host/sys:ro \
-v /etc/os-release:/host/etc/os-release:ro \
-v /var/log:/host/var/log:ro \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--restart unless-stopped \
--cap-add SYS_PTRACE \
--cap-add SYS_ADMIN \
--security-opt apparmor=unconfined \
-e NETDATA_CLAIM_TOKEN=DqR3z_x5dwG39VEzhQJil8IHmUCf6bc3S8wvnOMUWuuk3cQqW09D9kO7zsPm08JbA0ywsleh9-jery3J6hTAm9kyL_XnPe7HFQS_X_KAiSGDguNZhTDGS_PObYs9qkgNGP98kbg \
-e NETDATA_CLAIM_URL=https://app.netdata.cloud \
-e NETDATA_CLAIM_ROOMS=a04ab163-00f0-4e7d-996e-102f3f23bf9c \
netdata/netdata:stable

docker compose安装:

version: '3'
services:
  netdata:
    image: netdata/netdata:stable
    container_name: netdata
    pid: host
    network_mode: host
    restart: unless-stopped
    cap_add:
      - SYS_PTRACE
      - SYS_ADMIN
    security_opt:
      - apparmor:unconfined
    volumes:
      - netdataconfig:/etc/netdata
      - netdatalib:/var/lib/netdata
      - netdatacache:/var/cache/netdata
      - /:/host/root:ro,rslave
      - /etc/passwd:/host/etc/passwd:ro
      - /etc/group:/host/etc/group:ro
      - /etc/localtime:/etc/localtime:ro
      - /proc:/host/proc:ro
      - /sys:/host/sys:ro
      - /etc/os-release:/host/etc/os-release:ro
      - /var/log:/host/var/log:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - NETDATA_CLAIM_TOKEN=DqR3z_x5dwG39VEzhQJil8IHmUCf6bc3S8wvnOMUWuuk3cQqW09D9kO7zsPm08JbA0ywsleh9-jery3J6hTAm9kyL_XnPe7HFQS_X_KAiSGDguNZhTDGS_PObYs9qkgNGP98kbg
      - NETDATA_CLAIM_URL=https://app.netdata.cloud
      - NETDATA_CLAIM_ROOMS=a04ab163-00f0-4e7d-996e-102f3f23bf9c
volumes:
  netdataconfig:
  netdatalib:
  netdatacache:


原文地址:https://blog.csdn.net/qq_33034733/article/details/140551590

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!