说明:
镜像拉取时默认都是latest版本,为了更好地管理,对镜像进行重新标记。
一、拉取镜像
docker pull prom/prometheus docker pull grafana/grafana docker pull prom/node-exporter
二、运行服务
# 启动node_exporter服务 docker run -d -p 9100:9100 --restart=always --privileged=true prom/node-exporter # 启动grafana服务 docker run -d -p 3000:3000 --restart=always --privileged=true -e "GF_SECURITY_ADMIN_PASSWORD=admin" grafana/grafana # 启动prometheus服务 docker run -d -p 9090:9090 --restart=always --privileged=true prom/prometheus
二、查看版本号
Promethus版本号
[root@localhost images]# docker exec -it dad4f3e52c69 /bin/prometheus --version prometheus, version 2.43.0 (branch: HEAD, revision: edfc3bcd025dd6fe296c167a14a216cab1e552ee) build user: root@8a0ee342e522 build date: 20230321-12:56:07 go version: go1.19.7 platform: linux/amd64 tags: netgo,builtinassets [root@localhost images]#
node_exporter版本号
[root@localhost images]# docker exec -it 253a6f2768eb /bin/node_exporter --version node_exporter, version 1.5.0 (branch: HEAD, revision: 1b48970ffcf5630534fb00bb0687d73c66d1c959) build user: root@6e7732a7b81b build date: 20221129-18:59:09 go version: go1.19.3 platform: linux/amd64 [root@localhost images]#
grafana 版本号
[root@localhost images]# docker exec -it 237298bcce7b grafana-server -v Version 9.4.7 (commit: 4add91f03d, branch: HEAD) [root@localhost images]#
标签:node,exporter,版本号,grafana,--,docker,root From: https://www.cnblogs.com/wangzy-Zj/p/17329894.html