安装
mkdir -pv /data/uptimekuma && cd /data
docker run -d --restart=always -p 3001:3001 -v `pwd`/uptimekuma:/app/data --name uptime-kuma louislam/uptime-kuma:1.11.4
通过docker-compose安装
version: "3"
services:
uptime-kuma:
image: louislam/uptime-kuma:1.11.4
container_name: "uptime-kuma"
restart: "always"
volumes:
- "/etc/localtime:/etc/localtime"
- "/data/uptimekuma:/app/data"
ports:
- "3001:3001"
配置nginx(可选)
server {
server_name status.devopsman.cn;
listen 443 ssl http2;
ssl_certificate /www/server/panel/vhost/nginx/ssl/status.devopsman.cn_bundle.pem;
ssl_certificate_key /www/server/panel/vhost/nginx/ssl/status.devopsman.cn.key;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
access_log /www/wwwlogs/uptimestatus.log main;
error_log /www/wwwlogs/uptimestatus.error.log;
}
相比blackbox_exporter去监控url和证书,这个就显示很高大上了,有时候更适合给领导和客户欣赏;