1. 安装
a. rust cargo cargo install vigil-serverb. dockerdocker pull valeriansaliou/vigil:v1.3.0
2. 配置说明
使用起来需要的就是配置文件config.cfg,配置还是比较简单的,从字面意思可以看明白了一般内容参考如下:# Vigil# Microservices Status Page# Configuration file# Example: https://github.com/valeriansaliou/vigil/blob/master/config.cfg[server]log_level = "warn"inet = "0.0.0.0:8080"workers = 4reporter_token = "appkey"[assets]path = "./res/assets/"[branding]page_title = "营销平台状态"page_url = "http://101.200.137.80/"company_name = "dalongrong"icon_color = "#3C82E7"icon_url = "https://avatars0.githubusercontent.com/u/2312287"logo_color = "#3C82E7"logo_url = "https://avatars0.githubusercontent.com/u/2312287"website_url = "http://101.200.137.80"support_url = "mailto:1141591465@qq.com"custom_html = ""[metrics]poll_interval = 120poll_retry = 2poll_http_status_healthy_above = 200poll_http_status_healthy_below = 400poll_delay_dead = 30poll_delay_sick = 10push_delay_dead = 20push_system_cpu_sick_above = 0.90push_system_ram_sick_above = 0.90[plugins][plugins.rabbitmq]api_url = "http://127.0.0.1:15672"auth_username = "rabbitmq-administrator"auth_password = "RABBITMQ_ADMIN_PASSWORD"virtualhost = "crisp"queue_ready_healthy_below = 500queue_nack_healthy_below = 100[notify][notify.email]from = "1141591465@qq.com"to = "1141591465@qq.com"smtp_host = "mail.qq.com"smtp_port = 465smtp_username = "1141591465@qq.com"smtp_password = "youpassword"smtp_encrypt = false[probe][[probe.service]]id = "api"label = "营销平台api"[[probe.service.node]]id = "api"label = "营销平台api"mode = "poll"replicas = [ "tcp://101.200.137.80:80", "tcp://101.200.137.80:80"][[probe.service.node]]id = "help"label = "核心帮助负载均衡"mode = "poll"replicas = ["tcp://101.200.137.80:81"][[probe.service.node]]id = "api"label = "访问api 地址"mode = "poll"replicas = ["http://101.200.137.80"][[probe.service.node]]id = "status"label = "爬虫状态"mode = "poll"replicas = ["http://101.200.137.80"]http_body_healthy_match = "User-agent:.*"[[probe.service]]id = "relay"label = "响应节点"[[probe.service.node]]id = "socket-client"label = "实时im接口"mode = "push"rabbitmq_queue = "client"
3. 参考运行
├── Dockerfile└── config.cfg使用的是docker 进行的构建DockerfileFROM valeriansaliou/vigil:v1.3.0COPY config.cfg /etc/vigil.cfgconfig.cfg 参考上面的配置,或者github 的源码
4. 参考界面
5. 参考资料
https://github.com/valeriansaliou/vigilhttps://github.com/rongfengliang/vigildemo