https://github.com/xuxiaowei-com-cn/nacos-sentinel
Nacos 监控项目
https://github.com/xuxiaowei-com-cn/nacos-sentinel
nacos sentinel
Last synced: 2 months ago
JSON representation
Nacos 监控项目
- Host: GitHub
- URL: https://github.com/xuxiaowei-com-cn/nacos-sentinel
- Owner: xuxiaowei-com-cn
- License: apache-2.0
- Created: 2024-02-21T01:50:02.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-29T09:16:40.000Z (about 1 year ago)
- Last Synced: 2025-01-04T18:33:28.790Z (4 months ago)
- Topics: nacos, sentinel
- Language: Java
- Homepage:
- Size: 228 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
为简化开发工作、提高生产率、解决常见问题而生## 发布
- Maven 仓库
- [快照版](https://s01.oss.sonatype.org/content/repositories/snapshots/cn/com/xuxiaowei/nacos/nacos-sentinel)
- 可下载最新的二进制快照(可直接运行的 jar 包)
- [发布版](https://s01.oss.sonatype.org/content/repositories/releases/cn/com/xuxiaowei/nacos/nacos-sentinel)
- 暂未发布
- [docker 镜像](https://hub.docker.com/r/xuxiaoweicomcn/nacos-sentinel)## [更新日志](CHANGELOG.md)
## 使用说明
- 项目启动时,订阅现存所有服务
- 项目启动 `3 分钟` 后,每隔 `5 秒`,检查一次 Nacos 连接状态以及是否有新服务注册,并订阅新注册的服务
- 飞书数据格式```json
{
"logId": "日志ID",
"serverAddr": "Nacos地址",
"online": "是否上线",
"namespace": "命名空间",
"serviceName": "服务名称",
"ip": "服务IP",
"port": "服务端口",
"groupName": "群组名称",
"clusterName": "集群名称"
}
```### 环境变量
| 环境变量名称 | 默认值 | 说明 |
|----------------------------------------------------|-------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| NACOS_SENTINEL_SERVER_PORT | 8080 | 端口 |
| NACOS_SENTINEL_SPRING_APPLICATION_NAME | nacos-sentinel | 项目名称,日志文件名称 |
| NACOS_SENTINEL_DISCOVERY_SERVER_ADDR | 127.0.0.1:8848 | Nacos 注册中心地址 |
| NACOS_SENTINEL_DISCOVERY_NAMESPACE | public | Nacos 注册中心命名空间 |
| NACOS_SENTINEL_LOGS_FOLDER | /logs | 日志文件夹前缀 |
| NACOS_SENTINEL_LOGS_MAX_FILE_SIZE | 20MB | 日志文件压缩阈值大小,类型:`org.springframework.util.unit.DataSize` |
| NACOS_SENTINEL_LOGS_MAX_HISTORY | 365 | 日志保留日期,单位:天 |
| NACOS_SENTINEL_JAVA_OPTS | -Xms256m -Xmx512m | 仅 docker 镜像生效。JVM堆的初始内存大小为256兆字节(MB),JVM堆的最大内存大小为512兆字节(MB) |
| NACOS_SENTINEL_WEBHOOK_WEIXN_URL | | 企业微信 Webhook 地址,为空时不启用 |
| NACOS_SENTINEL_WEBHOOK_WEIXN_MENTIONED_LIST | | 企业微信 userid的列表,提醒群中的指定成员(@某个成员),@all表示提醒所有人,如果开发者获取不到userid,可以使用 `NACOS_SENTINEL_WEBHOOK_WEIXN_MENTIONED_MOBILE_LIST`,多个值使用英文逗号隔开 |
| NACOS_SENTINEL_WEBHOOK_WEIXN_MENTIONED_MOBILE_LIST | | 企业微信 手机号列表,提醒手机号对应的群成员(@某个成员),@all表示提醒所有人,多个值使用英文逗号隔开 |
| NACOS_SENTINEL_WEBHOOK_FEISHU_URL | | 飞书 Webhook 地址,为空时不启用。飞书数据格式参见上方内容 |## [代码格式规范 spring-javaformat](https://github.com/spring-io/spring-javaformat)
- IntelliJ IDEA
-
项目添加 [io.spring.javaformat:spring-javaformat-maven-plugin](https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-maven-plugin)
依赖之后,可安装自动格式化插件(无需运行下列命令):[spring-javaformat-intellij-idea-plugin](https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin)```shell
./mvnw spring-javaformat:apply
```
或
```shell
mvn spring-javaformat:apply
```## 功能说明
## 批量添加远端仓库地址
点击展开
git remote add gitee https://gitee.com/xuxiaowei-com-cn/nacos-sentinel.git
git remote add gitlab https://gitlab.com/xuxiaowei-com-cn/nacos-sentinel.git
git remote add framagit https://framagit.org/xuxiaowei-com-cn/nacos-sentinel.git
git remote add github https://github.com/xuxiaowei-com-cn/nacos-sentinel.git
git remote add gitcode https://gitcode.net/xuxiaowei-com-cn/nacos-sentinel.git
git remote add gitlink https://gitlink.org.cn/xuxiaowei-com-cn/nacos-sentinel.git
## 参考文档
1. [Java SDK](https://nacos.io/docs/latest/guide/user/sdk/)
## 鸣谢
1. 感谢 [](https://www.jetbrains.com/)
提供开发工具 [](https://www.jetbrains.com/idea) 的免费授权## Stargazers over time
[](https://starchart.cc/xuxiaowei-com-cn/nacos-sentinel)