docker pull prom/node-exporter:latest docker run -d -p 9100:9100 --name node-exporter prom/node-exporter:latest 1. 2. 3. 之后修改prometheus.yml,重启所有容器: docker-compose restart 1. 测试告警 docker stop prom_node-exporter_1 docker-compose ps Name Command State Ports --- prom_alertmanage...
volumes:- /:/rootfs:ro- /var/run:/var/run:rw- /sys:/sys:ro- /var/lib/docker/:/var/lib/docker:ro ports:-'18080:8080'networks:- monitor alertmanager.yml global: resolve_timeout: 5m smtp_from:'邮箱'smtp_smarthost:'smtp.exmail.qq.com:25'smtp_auth_username:'邮箱'smtp_auth_password:...
启动Docker 1sudo systemctl start docker # 2(sudo systemctl enable docker) #开机启动 3sudo docker --version #查看Docker版本 1. 2. 3. 安装Compose,运行compose.yml pip3 install docker-compose docker-compose.yml如下: 1version: '3.1' 2 3services: 4 influxdb: 5 image: influxdb:latest 6 cont...
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # 安装Docker CE yum install docker-ce -y # 启动 systemctl start docker # 开机启动 systemctl enable docker # 查看Docker信息 docker info 2.2 安装docker-compose curl -L https://github.com/docker/compose/re...
cat >> ./docker-compose_grafana.yml <<EOF version: '2' services: grafana: image: grafana/grafana restart: always container_name: "grafana" ports: - 3000:3000 volumes: - $GRAFANA_DIR/data:/var/lib/grafana:rw - $GRAFANA_DIR$GRAFANA_plugins:/var/lib/grafana/plugins:rw ...
username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Login to GitHub Package Registry env: username: ${{ github.repository_owner }} password: ${{ secrets.GHCR_TOKEN }} run: echo ${{ env.password }} | docker login ghcr.io -u ${{ env.usernam...
docker-compose.yml 内容: 代码语言:php 复制 version: "3" services: prometheus: image: prom/prometheus container_name: prometheus user: root # restart: always ports: - "9090:9090" volumes: - ./conf/prometheus:/etc/prometheus - ./data/prometheus/prometheus_db:/prometheus command: - '--config...
login(MAIL['username'], MAIL['password']) smtp.sendmail(MAIL['sender'], TOEMAIL, msgRoot.as_string()) smtp.quit() 计划任务 部署计划任务,每天9:00自动发送报告到邮箱(宿主机配置) 代码语言:javascript 复制 0 9 * * * docker exec -i pyreport_pyreport_1 /bin/bash -c 'cd /myapp/ && ...
docker-compose -f node-exporter.yml up -d docker-compose -f prometheus.yml up -d 配置界面 启动后访问你的grafana,地址是ip:3000,第一次需要修改默认密码(admin/admin) 登录进来后,第一步需要先加prometheus数据源 image.png 第二步就是找一个官方模板,模板ID:1860,当然你也可以自己设计dashboard ...
https://github.com/FX-Max/docker-install-everything/tree/master/prometheus 该项目是笔者弄的一个使用 docker-compose 搭建软件开发常见服务的项目,大家觉得有帮助,可以帮忙点个 star,感谢。 根据实际情况,修改 prometheus.yml 文件中的内容,将ip修改为上面安装了 node-exporter 的服务器ip即可。