Skip to content

Commit

Permalink
完善文档
Browse files Browse the repository at this point in the history
  • Loading branch information
mouday committed Nov 21, 2023
1 parent 64c00cf commit 54a41c3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- v1.5.27(2023-11-21)
-
- 新增prometheus接口/metrics域名数据

- v1.5.25(2023-10-23)
- 修复 证书申请列表无法搜索的问题
Expand Down
29 changes: 21 additions & 8 deletions doc/source/manual/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ DB_CONNECT_URL=postgresql://root:123456@localhost:5432/data_domain
## 10、支持`prometheus` 的`/metrics`接口
请求地址:http://127.0.0.1:8000/metrics
示例
```
POST http://127.0.0.1:8000/metrics
Content-Type: application/json
Authorization: Bearer <token>
```
1、第一步、需要在 `系统设置/API KEY` 获取授权key
2、第二步、配置 prometheus.yml
Expand All @@ -126,14 +136,17 @@ scrape_configs:
bearer_token: 'f60c03bfff8bb42dcf6821542e5fd11e'
```
请求地址:http://127.0.0.1:8000/metrics
示例
如果是夜莺-Nightingale [参考文档](https://flashcat.cloud/docs/content/flashcat-monitor/categraf/plugin/prometheus/)
```
POST http://127.0.0.1:8000/metrics
Content-Type: application/json
Authorization: Bearer <token>
```yaml
[[instances.domain]]
urls = [
"http://127.0.0.1:8000/metrics"
]
url_label_key = "instance"
url_label_value = "{{.Host}}"
headers = ["Authorization", "Bearer f60c03bfff8bb42dcf6821542e5fd11e"]
```
返回数据示例:
Expand All @@ -160,7 +173,7 @@ domain_admin{domain="www.163.com",group_name="",root_domain="163.com"} 153.0
domain_info{domain="163.com",group_name="百度系"} 1392.0
domain_info{domain="qq.com",group_name=""} 3535.0
```
## 11、部分域名无法查询到信息
已知不支持的域名后缀:`.lc`、`.ml`、`.ai`、`.my`、`.ch`、`.edu.cn`
Expand Down

0 comments on commit 54a41c3

Please sign in to comment.