An open API service indexing awesome lists of open source software.

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 监控项目

Awesome Lists containing this project

README

        


nacos-sentinel


Nacos 监控项目



License-Anti


Link-996


QQ群



企业微信群


为简化开发工作、提高生产率、解决常见问题而生


bilibili 粉丝


CSDN 码龄


CSDN 粉丝


CSDN 访问


CSDN 博客


IntelliJ IDEA


snapshots


releases


GitHub stars


GitHub forks


GitHub watchers


GitHub last commit


码云Gitee stars


码云Gitee forks


Gitlab stars


Gitlab forks


OSCS Status


total lines


JDK


code style

## 发布

- 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. 感谢 [![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)