Kener 是一款开源状态页面工具,旨在使服务监控和事件处理变得轻而易举。它提供了一个时尚和用户友好的界面,简化跟踪服务中断,并改善在事件发生时的沟通方式。最棒的是 Kener 与 GitHub 的无缝集成,使在协作和友好的环境中更轻松地跟踪和解决问题。
项目特征 {#项目特征}
监控跟踪:
- 实时监控;
- 为访问者处理时区;
- 将监控器分为不同部分;
- 基于计划任务的监控器调度;
- 使用 YAML 灵活配置监控器;
- 支持监控器的默认状态。
定制品牌:
- 使用 YAML 或代码定制状态页面;
- 为监控器的状态和正常运行时间生成徽章;
- 支持自定义域;
- 浅色、深色主题。
事件管理:
- 可使用 Github 创建事件;
- 或使用 API 创建事件。
用户体验:
- 易于安装、设置;
- 用户友好界面;
- 适合各种设备的响应式设计;
- 自动搜索引擎优化。
部署安装 {#部署安装}
创建配置文件目录:
|-----------|---------------------------------------|
| 1
| mkdir -p /host/path/to/config
|
将下面代码根据实际需求修改后保存为 docker-compose.yml
,然后执行 docker-compose -f docker-compose.yml up -d
即可创建和启动服务:
|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| version: '3.7' services: kener: image: rajnandan1/kener:latest # assuming this is final namespace/image container_name: kener environment: - TZ=Asia/Shanghai #- GH_TOKEN= #- API_TOKEN= #- API_IP # If running on a LINUX HOST and not podman rootless these MUST BE SET # run "id $user" from command line and replace numbers below with output from command #- PUID=1000 # gid #- PGID=1000 # uid ### Most likely DO NOT need to change anything below this ### #- PORT=3000 Port app listens on IN CONTAINER ### If any of the below are changed make sure the bound volume is correct as well ### #- CONFIG_DIR=/config #- PUBLIC_KENER_FOLDER=/config/static #- MONITOR_YAML_PATH=/config/monitors.yaml #- SITE_YAML_PATH=/config/site.yaml ports: - '3000:3000/tcp' volumes: - '/host/path/to/config:/config:rw'
|
定制监控 {#定制监控}
可使用 vim /host/path/to/config/monitors.yaml
命令编辑配置文件,参考模版如下:
|------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| - name: Google Search description: Search the world's information, including webpages, images, videos and more. tag: "google-search" image: "/google.png" api: method: GET url: https://www.google.com/webhp - name: Svelte Website description: Cybernetically enhanced web apps tag: "svelte-website" api: method: GET url: https://svelte.dev/ image: "/svelte.svg" - name: Earth description: Our blue planet tag: "earth" defaultStatus: "UP" image: "/earth.png" - name: Frogment description: A free openAPI spec editor and linter that breaks down your spec into fragments to make editing easier and more intuitive. Visit https://www.frogment.com tag: "frogment" image: "/frogment.png" api: method: GET url: https://www.frogment.com
|
修改好文件后,使用下面命令重启服务:
|-----------|------------------------------|
| 1
| docker restart kener
|