nacos-sentinel
Nacos 监控项目
为简化开发工作、提高生产率、解决常见问题而生
## 发布
- [快照版](https://s01.oss.sonatype.org/content/repositories/snapshots/cn/com/xuxiaowei/nacos/nacos-sentinel)
- [发布版](https://s01.oss.sonatype.org/content/repositories/releases/cn/com/xuxiaowei/nacos/nacos-sentinel)
## [更新日志](CHANGELOG.md)
## 使用说明
- [docker 镜像](https://hub.docker.com/r/xuxiaoweicomcn/nacos-sentinel)
- 飞书数据格式
```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. 感谢 [![jetbrains](./static/jetbrains.ico)](https://www.jetbrains.com/)
提供开发工具 [![IDEA](./static/idea.png)](https://www.jetbrains.com/idea) 的免费授权
## Stargazers over time
[![Stargazers over time](https://starchart.cc/xuxiaowei-com-cn/nacos-sentinel.svg)](https://starchart.cc/xuxiaowei-com-cn/nacos-sentinel)