🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
#### Grafana简介 > Grafana 是一套开源的分析监视平台,支持 Graphite, InfluxDB, OpenTSDB, Prometheus, Elasticsearch, CloudWatch 等数据源 > #### Grafana on docker ```powershell docker run -itd --name grafana -p 3000:3000 \ -e "GF_SERVER_ROOT_URL=http://localhost" \ -e "GF_SECURITY_ADMIN_PASSWORD=password" \ -v grafana-data:/var/lib/grafana \ -v grafana-log:/var/log/grafana \ -v grafana-config:/etc/grafana grafana/grafana:4.1.2 # "GF_SERVER_ROOT_URL=http://localhost" 服务的URL # "GF_SECURITY_ADMIN_PASSWORD=password" 密码 ``` #### Grafana on swarm 1. 创建一个新的overlay网络 ```powershell $ docker network create --driver overlay monitoring ``` 2. 启动服务 ```powershell # Grafana on swarm $ docker service create --name grafana \ --network monitoring \ --publish 3000:3000 --replicas 1 \ -e "GF_SECURITY_ADMIN_PASSWORD=password" \ # 设置密码为password -e "PROMETHEUS_ENDPOINT=http://prometheus:9090" \ # 传入Prometheus服务的url grafana/grafana ``` #### 登录Grafana UI > http://ip-addr:3000 ![选区_015](https://box.kancloud.cn/c5982d97f1cbb10a8716e844a58e11bd_1539x843.png)