Skip to content

Commit

Permalink
docs:更新polaris-go可观测性文档 (#370)
Browse files Browse the repository at this point in the history
* docs:新增进程相关监听端口信息描述

* docs:更新polaris-go可观测性文档
  • Loading branch information
chuntaojun authored Nov 10, 2023
1 parent e6f6f98 commit afeac91
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "服务注册发现"
linkTitle: "服务注册发现"
title: "注册发现"
linkTitle: "注册发现"
weight: 3
---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ global:
#范围:已经注册的统计上报插件的名字
chain:
- prometheus
#描述:统计上报插件配置
plugin:
prometheus:
type: pull
#描述: 设置 prometheus http-server 的监听IP
#类型:string
#默认使用SDK的绑定IP
Expand All @@ -44,6 +44,36 @@ global:
metricPort: 28080
```
##### 通过 pushgateway push 模式上报监控数据
```yaml
#描述:全局配置项
global:
#统计上报设置
statReporter:
#描述:是否将统计信息上报至monitor
#类型:bool
enable: true
#描述:启用的统计上报插件类型
#类型:list
#范围:已经注册的统计上报插件的名字
chain:
- prometheus
plugin:
prometheus:
type: push
#描述: 设置 pushgateway 的地址, 仅 type == push 时生效
#类型:string
#默认 ${global.serverConnector.addresses[0]}:9091
address: 127.0.0.1:9091
#描述:设置metric数据推送到pushgateway的执行周期, 仅 type == push 时生效
#类型:string
#格式:^\d+(ms|s|m|h)$
#范围:[1m:...]
#默认值:10m
pushInterval: 10s
```
## 通过代码开启监控上报
##### 通过 prometheus pull 模式上报监控数据
Expand All @@ -53,7 +83,22 @@ cfg := config.NewDefaultConfiguration([]string{"127.0.0.1:8091"})
cfg.GetGlobal().GetStatReporter().SetEnable(true)
cfg.GetGlobal().GetStatReporter().SetChain([]string{"prometheus"})
cfg.GetGlobal().GetStatReporter().SetPluginConfig("prometheus", &prometheus.Config{
Type: "pull",
PortStr: "28080",
IP: "",
})
```

##### 通过 pushgateway push 模式上报监控数据

```go
cfg := config.NewDefaultConfiguration([]string{"127.0.0.1:8091"})
cfg.GetGlobal().GetStatReporter().SetEnable(true)
cfg.GetGlobal().GetStatReporter().SetChain([]string{"prometheus"})
cfg.GetGlobal().GetStatReporter().SetPluginConfig("prometheus", &prometheus.Config{
Type: "push",
Interval: 10 * time.Second,
Address: "",
})
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "服务注册发现"
linkTitle: "服务注册发现"
title: "注册发现"
linkTitle: "注册发现"
weight: 2
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "服务注册发现"
linkTitle: "服务注册发现"
title: "注册发现"
linkTitle: "注册发现"
weight: 2
---

Expand Down
13 changes: 13 additions & 0 deletions content/zh-cn/docs/使用指南/服务端安装/集群版安装.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ weight: 2

![](../图片/安装集群版/基础架构.png)

## 服务端监听端口信息

| 进程名 | 端口号 | 协议类型 | 用途 |
|:----------------|:-------|:---------|:----------------------------------------|
| polaris-console | 8080 | http | 北极星控制台页面端口 |
| polaris-limiter | 8100 | http | 限流可用配额下发客户端数据通信 |
| polaris-limiter | 8101 | grpc | 限流可用配额下发客户端数据通信 |
| polaris-server | 8090 | http | OpenAPI |
| polaris-server | 8761 | http | eureka 协议通信 |
| polaris-server | 8091 | grpc | 注册发现/服务治理规则下发客户端数据通信 |
| polaris-server | 8093 | grpc | 配置中心客户端数据通信 |
| polaris-server | 15010 | grpc | xds 数据通信端口 |

## 下载软件包

可以从以下2个地址下载北极星软件包,请选择最新的release版本:
Expand Down

0 comments on commit afeac91

Please sign in to comment.