Compare commits

...

122 Commits

Author SHA1 Message Date
ning
798a4ff1ad code refactor 2024-06-05 15:09:46 +08:00
ning
6ccad5e305 code refactor 2024-06-05 14:37:23 +08:00
ning
1abe5781a3 code refactor 2024-06-05 14:33:55 +08:00
ning
0e14e322ad code refactor 2024-06-05 13:29:43 +08:00
ning
795ae39568 code refactor 2024-06-05 13:26:53 +08:00
ning
edd413a585 code refactor 2024-06-05 12:11:10 +08:00
ning
7ece8c3a41 code refactor 2024-06-05 12:02:37 +08:00
ning
b9d60014ba update integration 2024-06-05 11:40:01 +08:00
ning
554eaff9e3 code refactor 2024-06-05 10:28:07 +08:00
ning
b13a1024a0 code refactor 2024-06-04 20:55:59 +08:00
ning
1a05ab7de3 change integration init 2024-06-04 20:38:24 +08:00
ning
e3453328a7 refactor: integration init 2024-06-03 11:54:29 +08:00
ning
4424a6b89c refactor: get event list api 2024-06-03 11:12:32 +08:00
ning
9fdb2f0753 refactor: get event list api 2024-06-03 10:53:30 +08:00
ning
3d358e367f refactor: get event list api 2024-06-03 10:47:36 +08:00
Ulric Qin
5264874628 Update automq metrics 2024-06-03 10:43:24 +08:00
Ulric Qin
e0a3ff248c update Linux integration's markdown 2024-06-03 10:24:02 +08:00
Ulric Qin
1fecf78ede update Linux alerting rules 2024-06-03 09:46:33 +08:00
Ulric Qin
839b45904b Merge branch 'main' of github.com:ccfos/nightingale 2024-06-03 09:23:08 +08:00
Ulric Qin
cd0f43f808 add Automq alerts 2024-06-03 09:22:41 +08:00
ning
8047f3deee refactor: get event api 2024-05-31 19:08:28 +08:00
ning
f209ed5bee refactor: get event api 2024-05-31 17:20:27 +08:00
Ulric Qin
8c61d8c14d Update AutoMQ dashboards 2024-05-31 15:47:43 +08:00
Ulric Qin
f7372b1c3b update AutomMQ markdown 2024-05-31 14:13:35 +08:00
Ulric Qin
a39ced86aa add markdown for automq 2024-05-31 12:15:51 +08:00
Ulric Qin
f365b7db2a Merge branch 'main' of github.com:ccfos/nightingale 2024-05-31 11:41:44 +08:00
Ulric Qin
7eaec13b6c add metrics for AutoMQ 2024-05-31 11:41:30 +08:00
ulricqin
2e824a165e Update README.md 2024-05-31 10:28:34 +08:00
ulricqin
f2909b6029 Update README.md 2024-05-31 10:27:56 +08:00
Ulric Qin
a543a5ad09 update automq dashboard: cluster_overview.json 2024-05-30 21:07:22 +08:00
Ulric Qin
2ee34bf1f9 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-30 21:01:34 +08:00
Ulric Qin
4623622dd0 add Detailed metrics dashboard for Automq 2024-05-30 21:01:20 +08:00
ning
4f259137e5 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-30 20:30:10 +08:00
ning
75f1e8a80b refactor: event list api 2024-05-30 20:29:56 +08:00
Ulric Qin
3648d8dc45 add Automq dashboards 2024-05-30 20:28:34 +08:00
Ulric Qin
8c90d7ab33 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-30 19:59:03 +08:00
Ulric Qin
c6ac3fb959 add AutoMQ Dashboards 2024-05-30 19:58:48 +08:00
ning
ce854b3166 docs: change some sql 2024-05-30 17:54:37 +08:00
ning
a2be5230fa docs: change some sql 2024-05-30 17:53:45 +08:00
ning
21276a77b6 docs: change some sql 2024-05-30 17:52:11 +08:00
Yening Qin
cffd012ec6 feat: user add last_avtive_time (#1974) 2024-05-30 17:44:32 +08:00
ning
a9ebdad1cd docs: change sql 2024-05-30 17:36:33 +08:00
ning
785c577728 docs: change sql 2024-05-30 17:36:17 +08:00
ning
0e2a66570e fix: edge host miss alert 2024-05-30 16:57:04 +08:00
Ulric Qin
76583a6227 add automq icon 2024-05-30 16:15:12 +08:00
Yening Qin
48e0e1a9f8 feat: add integration tpl center (#1973) 2024-05-30 15:42:09 +08:00
Yang Zhiyan
17bb7fa468 feat: support event list view only by business group (#1969) 2024-05-30 15:33:43 +08:00
ulricqin
fc2638680a Update oracle_alert.json 2024-05-30 07:24:36 +08:00
ulricqin
e01a899ae1 Update README.md 2024-05-30 07:18:22 +08:00
ning
07c1ef6bd4 docs: add some sql 2024-05-28 15:37:04 +08:00
ning
bfa7059098 docs: add some sql 2024-05-28 15:31:23 +08:00
laiwei
096a2d3675 add nvidia gpu metrics dashboard 2024-05-24 14:02:14 +08:00
ning
2232733922 fix: delete target service api 2024-05-23 17:03:52 +08:00
ning
b15f638688 refactor: code format 2024-05-23 16:43:25 +08:00
ning
4f818e3642 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-23 11:06:50 +08:00
ning
638c62da2f refactor: automatically generate jwt signing key 2024-05-23 11:06:33 +08:00
shardingHe
e1a9c995c2 docs: merge the metric data from metric.toml into oracle.toml (#1962)
Co-authored-by: shardingHe <wangzihe@flashcat.cloud>
2024-05-23 11:01:58 +08:00
Yang Zhiyan
1898675075 optimize: Optimize targets-related interfaces (#1961) 2024-05-23 10:27:09 +08:00
Resurgence72
ce7f0272d8 对 prometheus 2.50.0 版本引入的 NewPossibleNonCounterInfo warnings 做适配 (#1939) 2024-05-21 17:29:33 +08:00
赵尚
93159f07fd refactor: change the task time limit from 1 day to 5 days. (#1959) 2024-05-21 15:32:45 +08:00
Yening Qin
7d410baa2d refactor: recovery event support inhibit (#1958) 2024-05-20 20:35:35 +08:00
Ulric Qin
20b30c3e2c update ping metrics 2024-05-20 10:26:18 +08:00
Ulric Qin
8805bf6598 fix typo of logout router 2024-05-20 10:23:08 +08:00
Ulric Qin
fe6a64dae8 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-20 10:22:39 +08:00
Ulric Qin
2c564a2c58 add cdn metrics doc 2024-05-20 10:22:16 +08:00
ulricqin
ae3c13224d Update host_generic_categraf.json 2024-05-17 10:52:22 +08:00
ulricqin
9a4015f13f Update host_generic_categraf.json 2024-05-16 17:46:48 +08:00
Yening Qin
274ca09551 Update switch branch.json 2024-05-16 13:44:08 +08:00
ulricqin
3d9b4fc14e Update categraf-procstat.json 2024-05-16 11:38:53 +08:00
ning
07436a5e0d refactor: change event order 2024-05-16 11:15:18 +08:00
ning
f7b2f1acb9 refactor: change event order 2024-05-16 11:08:35 +08:00
ning
4f4287030a docs: update snmp board tpl 2024-05-15 22:19:14 +08:00
ning
e25e712c48 refactor: change boards clone api 2024-05-15 22:16:16 +08:00
ning
66951d7e77 refactor: change boards clone api 2024-05-14 14:24:32 +08:00
ulricqin
f5ff27cd18 Create host_generic_categraf.json 2024-05-13 18:03:54 +08:00
ning
9e3f6e6285 refactor: add create user verify 2024-05-13 17:25:08 +08:00
ning
48e3df2cb4 refactor: new ldap conn 2024-05-13 17:07:18 +08:00
Yening Qin
ac5d69dba4 feat: ldap support role mapping (#1948)
* feature: LDAP implements role mapping capabilities (#1932)

* feature: Implement the team mapping function (#1934)

* refactor: ldap login add timeout

---------

Co-authored-by: Ciusyan <101268302+Yziyan@users.noreply.github.com>
Co-authored-by: ciusyan <yangzhiyan_i@didiglobal.com>
2024-05-13 16:56:19 +08:00
Ulric Qin
597351c424 code refactor 2024-05-13 10:39:27 +08:00
Ulric Qin
1f6b2e341a update README 2024-05-13 10:28:19 +08:00
ulricqin
035752ace2 Update README.md 2024-05-13 10:15:55 +08:00
ulricqin
60a1437207 Update README.md 2024-05-13 10:12:58 +08:00
ulricqin
e31414bc8c Update README.md 2024-05-13 10:12:08 +08:00
ning
785a294845 refactor: update event.TriggerValue 2024-05-11 11:17:38 +08:00
ning
98933eee34 docs: update sql 2024-05-10 16:32:05 +08:00
ulricqin
20905810d7 Delete integrations/Netstat/metrics directory 2024-05-10 15:30:08 +08:00
ulricqin
c1bde83639 Delete integrations/Kernel_Vmstat/metrics directory 2024-05-10 15:29:30 +08:00
ulricqin
782a0e9616 Delete integrations/Processes/metrics directory 2024-05-10 15:28:50 +08:00
ning
6a3720bc8b docs: update ops 2024-05-10 14:19:49 +08:00
ning
de252359d6 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-10 14:11:54 +08:00
ning
deb313ca3d refactor: change server and server clusters routes to include permission check 2024-05-10 14:11:32 +08:00
yang xiaokai
d119de56be docs: creating SNMP monitoring for Cisco like switches (#1945)
* Add files via upload

* Add files via upload

* Update and rename DCN.toml to Cisco.toml

---------

Co-authored-by: Yening Qin <710leo@gmail.com>
2024-05-10 13:27:24 +08:00
tuogege
f05417fa23 docs: fix wrong table name about 'WriteRelabels' (#1942) 2024-05-10 11:56:28 +08:00
ning
9ab2eb591f docs: update integration 2024-05-10 10:55:22 +08:00
Yening Qin
3f476d770f feat: add builtin metrics (#1944) 2024-05-10 10:41:51 +08:00
ning
ced6759686 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-09 16:48:43 +08:00
ning
eba3014c59 fix: alert engine rebuild hash 2024-05-09 16:48:29 +08:00
ulricqin
3aeb4e16e9 Update webhook.go. Refactor Host header settings 2024-05-09 15:54:37 +08:00
ning
3b62722251 refactor: change server and server clusters routes to include permission check 2024-05-09 11:42:09 +08:00
shardingHe
fb1cc4868e feat: add user variable for sso(decrypted). (#1936)
* add user variable for sso(decrypted).
---------

Co-authored-by: shardingHe <wangzihe@flashcat.cloud>
2024-05-08 14:10:25 +08:00
ning
4a0dcf0dbf refactor: add forbidden status check for empty group id list 2024-05-08 11:59:13 +08:00
ning
4f913f146e Remove table prefix from all config files for consistency 2024-05-07 21:04:12 +08:00
Ulric Qin
533560f432 Merge branch 'main' of github.com:ccfos/nightingale 2024-05-07 20:03:52 +08:00
Ulric Qin
cf7b479a1b update integration metrics 2024-05-07 20:01:41 +08:00
Yening Qin
2e4c29a0de docs: delete integrations/Ping/collect/ping2.toml 2024-05-07 12:21:43 +08:00
Ulric Qin
6f0ceb94c6 Merge branch 'main' of github.com:ccfos/nightingale 2024-04-29 16:57:08 +08:00
Ulric Qin
800d7ba04b update integrations metrics 2024-04-29 16:56:56 +08:00
Thomas Zhao
fb6a6d2b93 Resolve a problem of pushgw WriteRrelabel not working actually (#1928)
* fix: timeSeries is not updated after relabeled

* fix: GaugeSampleQueueSize defined but not registered

---------

Co-authored-by: zhaotuo <zhaotuo@mail.jj.cn>
2024-04-29 10:22:17 +08:00
ning
cf2b19ae90 Update the size of callbacks and runbook_url columns to varchar(4096) in the alert_rule table 2024-04-28 11:56:52 +08:00
Ulric Qin
fb1cc93613 Merge branch 'main' of github.com:ccfos/nightingale 2024-04-26 19:27:07 +08:00
Ulric Qin
c2bba796c2 add some integrations metrics 2024-04-26 19:26:53 +08:00
ning
a02bf83842 fix: query busigroup error by checking if t is not nil before accessing its GroupId property 2024-04-25 17:18:50 +08:00
ning
cd9f129e2d docs: remove memory metric reference from dashboard descriptions 2024-04-22 17:30:03 +08:00
dependabot[bot]
e85c80bdcf build(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 (#1921)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.17.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-22 10:52:44 +08:00
Ciusyan
7e83e0c482 Add fields to the users interface and fix email sending bugs (#1919)
* fix: SMTP configuration error may not exit the current sending email goroutine

* optimize: Add user information fields

---------

Co-authored-by: ciusyan <yangzhiyan_i@didiglobal.com>
2024-04-22 10:45:23 +08:00
ning
92ac3125f3 refactor: change ibex version 2024-04-19 00:05:20 +08:00
ning
a61feca369 Merge branch 'main' of github.com:ccfos/nightingale 2024-04-17 17:32:06 +08:00
ning
8b0b811919 Refactor redundant code for initializing Redis storage in alert/alert.go and cmd/edge/edge.go 2024-04-17 17:31:53 +08:00
Ulric Qin
8742526c7f check configDir exists 2024-04-17 17:29:49 +08:00
ning
ee757cfd92 Enable PProf for profiling and monitoring in config.toml 2024-04-17 16:54:00 +08:00
ulricqin
b12cfea379 Update edge.toml 2024-04-17 16:34:27 +08:00
kongfei605
45365e3e03 chore: update dashboards for ipmi (#1913) 2024-04-16 19:44:08 +08:00
323 changed files with 108739 additions and 82776 deletions

View File

@@ -28,35 +28,66 @@
[English](./README_en.md) | [中文](./README.md)
## 夜莺 Nightingale 是什么
夜莺 Nightingale 是中国计算机学会接受捐赠并托管的第一个开源项目,是一个 All-in-One 的云原生监控工具,集合了 Prometheus 和 Grafana 的优点,你可以在 WebUI 上管理和配置告警策略,也可以对分布在多个 Region 的指标、日志、链路追踪数据进行统一的可视化和分析。夜莺融入了一线互联网公司可观测性最佳实践,沉淀了众多社区专家经验,开箱即用。[了解更多...](https://flashcat.cloud/product/nightingale/)
夜莺监控是一款开源云原生观测分析工具,采用 All-in-One 的设计理念,集数据采集、可视化、监控告警、数据分析于一体,与云原生生态紧密集成,提供开箱即用的企业级监控分析和告警能力。夜莺于 2020 年 3 月 20 日,在 github 上发布 v1 版本,已累计迭代 100 多个版本。
夜莺最初由滴滴开发和开源,并于 2022 年 5 月 11 日捐赠予中国计算机学会开源发展委员会CCF ODC为 CCF ODC 成立后接受捐赠的第一个开源项目。夜莺的核心研发团队,也是 Open-Falcon 项目原核心研发人员,从 2014 年Open-Falcon 是 2014 年开源)算起来,也有 10 年了,只为把监控这个事情做好。
## 快速开始
- 👉[文档](https://flashcat.cloud/docs/) | [提问](https://answer.flashcat.cloud/) | [下载](https://flashcat.cloud/download/nightingale/) | [安装](https://flashcat.cloud/docs/content/flashcat-monitor/nightingale-v6/install/intro/)
- 👉[文档中心](https://flashcat.cloud/docs/) | [下载中心](https://flashcat.cloud/download/nightingale/)
- ❤️[报告 Bug](https://github.com/ccfos/nightingale/issues/new?assignees=&labels=kind%2Fbug&projects=&template=bug_report.yml)
- ℹ️为了提供更快速的访问体验,上述文档和下载站点托管于 [FlashcatCloud](https://flashcat.cloud)
## 功能特点
- 对接多种时序库:支持对接 Prometheus、VictoriaMetrics、Thanos、Mimir、M3DB、TDengine 等多种时序库,实现统一告警管理。
- 专业告警能力:内置支持多种告警规则,可以扩展支持常见通知媒介,支持告警屏蔽/抑制/聚合/自愈、告警事件管理。
- 专业告警能力:内置支持多种告警规则,可以扩展支持常见通知媒介,支持告警屏蔽/抑制/订阅/自愈、告警事件管理。
- 高性能可视化引擎:支持多种图表样式,内置众多 Dashboard 模版,也可导入 Grafana 模版,开箱即用,开源协议商业友好。
- 支持常见采集器:支持 [Categraf](https://flashcat.cloud/product/categraf)、Telegraf、Grafana-agent、Datadog-agent、各种 Exporter 作为采集器,没有什么数据是不能监控的。
- 一体化观测平台:从 V6 版本开始,支持对接 ElasticSearch、Jaeger 数据源,实现日志、链路、指标多维度的统一可观测。
- 👀无缝搭配 [Flashduty](https://flashcat.cloud/product/flashcat-duty/)实现告警聚合收敛、认领、升级、排班、IM集成确保告警处理不遗漏减少打扰高效协同。
## 功能演示
![演示](https://fcpub-1301667576.cos.ap-nanjing.myqcloud.com/n9e/n9e-demo.gif)
## 截图演示
## 部署架构
<p align=center>中心化部署</p>
即时查询,类似 Prometheus 内置的查询分析页面,做 ad-hoc 查询,夜莺做了一些 UI 优化,同时提供了一些内置 promql 指标,让不太了解 promql 的用户也可以快速查询。
![中心化部署](https://fcpub-1301667576.cos.ap-nanjing.myqcloud.com/flashcat/images/blog/n9e-opensource-china/8.png)
![即时查询](https://download.flashcat.cloud/ulric/20240513103305.png)
<p align=center>多机房部署</p>
当然,也可以直接通过指标视图查看,有了指标视图,即时查询基本可以不用了,或者只有高端玩家使用即时查询,普通用户直接通过指标视图查询即可。
![多机房部署](https://fcpub-1301667576.cos.ap-nanjing.myqcloud.com/flashcat/images/blog/n9e-opensource-china/9.png)
![指标视图](https://download.flashcat.cloud/ulric/20240513103530.png)
夜莺内置了常用仪表盘,可以直接导入使用。也可以导入 Grafana 仪表盘,不过只能兼容 Grafana 基本图表,如果已经习惯了 Grafana 建议继续使用 Grafana 看图,把夜莺作为一个告警引擎使用。
![内置仪表盘](https://download.flashcat.cloud/ulric/20240513103628.png)
除了内置的仪表盘,也内置了很多告警规则,开箱即用。
![内置告警规则](https://download.flashcat.cloud/ulric/20240513103825.png)
## 产品架构
社区使用夜莺最多的场景就是使用夜莺做告警引擎,对接多套时序库,统一告警规则管理。绘图仍然使用 Grafana 居多。作为一个告警引擎,夜莺的产品架构如下:
![产品架构](https://download.flashcat.cloud/ulric/20240221152601.png)
对于个别边缘机房,如果和中心夜莺服务端网络链路不好,希望提升告警可用性,我们也提供边缘机房告警引擎下沉部署模式,这个模式下,即便网络割裂,告警功能也不受影响。
![边缘部署模式](https://download.flashcat.cloud/ulric/20240222102119.png)
## 近期计划
- [ ] 仪表盘:支持内嵌 Grafana
- [ ] 告警规则:通知时支持配置过滤标签,避免告警事件中一堆不重要的标签
- [ ] 告警规则:支持配置恢复时的 Promql告警恢复通知也可以带上恢复时的值了
- [ ] 机器管理自定义标签拆分管理agent 自动上报的标签和用户在页面自定义的标签分开管理,对于 agent 自动上报的标签,以 agent 为准,直接覆盖服务端 DB 中的数据
- [ ] 机器管理:机器支持角色字段,即无头标签,用于描述混部场景
- [ ] 机器管理:把业务组的 busigroup 标签迁移到机器的属性里,让机器支持挂到多个业务组
- [ ] 告警规则:增加 Host Metrics 类别,支持按照业务组、角色、标签等筛选机器,规则 promql 支持变量,支持在机器颗粒度配置变量值
- [ ] 告警通知:重构整个通知逻辑,引入事件处理的 pipeline支持对告警事件做自定义处理和灵活分派
## 交流渠道
- 报告Bug优先推荐提交[夜莺GitHub Issue](https://github.com/ccfos/nightingale/issues/new?assignees=&labels=kind%2Fbug&projects=&template=bug_report.yml)
@@ -76,4 +107,4 @@
</a>
## License
- [Apache License V2.0](https://github.com/didi/nightingale/blob/main/LICENSE)
- [Apache License V2.0](https://github.com/didi/nightingale/blob/main/LICENSE)

View File

@@ -44,18 +44,16 @@ func Initialize(configDir string, cryptoKey string) (func(), error) {
ctx := ctx.NewContext(context.Background(), nil, false, config.CenterApi)
var redis storage.Redis
if config.Redis.Address != "" {
redis, err = storage.NewRedis(config.Redis)
if err != nil {
return nil, err
}
redis, err = storage.NewRedis(config.Redis)
if err != nil {
return nil, err
}
syncStats := memsto.NewSyncStats()
alertStats := astats.NewSyncStats()
configCache := memsto.NewConfigCache(ctx, syncStats, nil, "")
targetCache := memsto.NewTargetCache(ctx, syncStats, nil)
targetCache := memsto.NewTargetCache(ctx, syncStats, redis)
busiGroupCache := memsto.NewBusiGroupCache(ctx, syncStats)
alertMuteCache := memsto.NewAlertMuteCache(ctx, syncStats)
alertRuleCache := memsto.NewAlertRuleCache(ctx, syncStats)

View File

@@ -128,10 +128,37 @@ func (arw *AlertRuleWorker) Eval() {
return
}
for _, point := range recoverPoints {
str := fmt.Sprintf("%v", point.Value)
arw.processor.RecoverSingle(process.Hash(cachedRule.Id, arw.processor.DatasourceId(), point), point.Timestamp, &str)
if arw.inhibit {
pointsMap := make(map[string]common.AnomalyPoint)
for _, point := range recoverPoints {
// 对于恢复的事件,合并处理
tagHash := process.TagHash(point)
p, exists := pointsMap[tagHash]
if !exists {
pointsMap[tagHash] = point
continue
}
if p.Severity > point.Severity {
hash := process.Hash(cachedRule.Id, arw.processor.DatasourceId(), p)
arw.processor.DeleteProcessEvent(hash)
pointsMap[tagHash] = point
}
}
for _, point := range pointsMap {
str := fmt.Sprintf("%v", point.Value)
arw.processor.RecoverSingle(process.Hash(cachedRule.Id, arw.processor.DatasourceId(), point), point.Timestamp, &str)
}
} else {
for _, point := range recoverPoints {
str := fmt.Sprintf("%v", point.Value)
arw.processor.RecoverSingle(process.Hash(cachedRule.Id, arw.processor.DatasourceId(), point), point.Timestamp, &str)
}
}
arw.processor.Handle(anomalyPoints, "inner", arw.inhibit)
}
@@ -192,7 +219,6 @@ func (arw *AlertRuleWorker) GetPromAnomalyPoint(ruleConfig string) []common.Anom
logger.Errorf("rule_eval:%s promql:%s, warnings:%v", arw.Key(), promql, warnings)
arw.processor.Stats.CounterQueryDataErrorTotal.WithLabelValues(fmt.Sprintf("%d", arw.datasourceId)).Inc()
arw.processor.Stats.CounterRuleEvalErrorTotal.WithLabelValues(fmt.Sprintf("%v", arw.processor.DatasourceId()), QUERY_DATA).Inc()
continue
}
logger.Debugf("rule_eval:%s query:%+v, value:%v", arw.Key(), query, value)
@@ -319,7 +345,7 @@ func (arw *AlertRuleWorker) GetHostAnomalyPoint(ruleConfig string) []common.Anom
missTargets = append(missTargets, ident)
}
}
logger.Debugf("rule_eval:%s missTargets:%v", arw.Key(), missTargets)
targets := arw.processor.TargetCache.Gets(missTargets)
for _, target := range targets {
m := make(map[string]string)
@@ -357,7 +383,6 @@ func (arw *AlertRuleWorker) GetHostAnomalyPoint(ruleConfig string) []common.Anom
// means this target is not collect by categraf, do not check offset
continue
}
if target, exists := targetMap[ident]; exists {
if now-target.UpdateAt > 120 {
// means this target is not a active host, do not check offset
@@ -371,6 +396,7 @@ func (arw *AlertRuleWorker) GetHostAnomalyPoint(ruleConfig string) []common.Anom
}
}
logger.Debugf("rule_eval:%s offsetIdents:%v", arw.Key(), offsetIdents)
for host, offset := range offsetIdents {
m := make(map[string]string)
target, exists := arw.processor.TargetCache.Get(host)
@@ -405,7 +431,7 @@ func (arw *AlertRuleWorker) GetHostAnomalyPoint(ruleConfig string) []common.Anom
missTargets = append(missTargets, ident)
}
}
logger.Debugf("rule_eval:%s missTargets:%v", arw.Key(), missTargets)
pct := float64(len(missTargets)) / float64(len(idents)) * 100
if pct >= float64(trigger.Percent) {
lst = append(lst, common.NewAnomalyPoint(trigger.Type, nil, now, pct, trigger.Severity))

View File

@@ -67,6 +67,12 @@ func (chr *DatasourceHashRingType) Set(datasourceId string, r *consistent.Consis
chr.Rings[datasourceId] = r
}
func (chr *DatasourceHashRingType) Del(datasourceId string) {
chr.Lock()
defer chr.Unlock()
delete(chr.Rings, datasourceId)
}
func (chr *DatasourceHashRingType) Clear(engineName string) {
chr.Lock()
defer chr.Unlock()

View File

@@ -110,7 +110,9 @@ func (n *Naming) heartbeat() error {
}
}
newDatasource := make(map[int64]struct{})
for i := 0; i < len(datasourceIds); i++ {
newDatasource[datasourceIds[i]] = struct{}{}
servers, err := n.ActiveServers(datasourceIds[i])
if err != nil {
logger.Warningf("hearbeat %d get active server err:%v", datasourceIds[i], err)
@@ -130,6 +132,13 @@ func (n *Naming) heartbeat() error {
localss[datasourceIds[i]] = newss
}
for dsId := range localss {
if _, exists := newDatasource[dsId]; !exists {
delete(localss, dsId)
DatasourceHashRing.Del(fmt.Sprintf("%d", dsId))
}
}
// host 告警使用的是 hash ring
err = models.AlertingEngineHeartbeatWithCluster(n.ctx, n.heartbeatConfig.Endpoint, n.heartbeatConfig.EngineName, HostDatasource)
if err != nil {

View File

@@ -165,7 +165,7 @@ func (p *Processor) Handle(anomalyPoints []common.AnomalyPoint, from string, inh
p.handleEvent(events)
}
p.HandleRecover(alertingKeys, now)
p.HandleRecover(alertingKeys, now, inhibit)
}
func (p *Processor) BuildEvent(anomalyPoint common.AnomalyPoint, from string, now int64) *models.AlertCurEvent {
@@ -207,6 +207,11 @@ func (p *Processor) BuildEvent(anomalyPoint common.AnomalyPoint, from string, no
event.ExtraConfig = p.rule.ExtraConfigJSON
event.PromQl = anomalyPoint.Query
if event.TriggerValues != "" && strings.Count(event.TriggerValues, "$") > 1 {
// TriggerValues 有多个变量,将多个变量都放到 TriggerValue 中
event.TriggerValue = event.TriggerValues
}
if from == "inner" {
event.LastEvalTime = now
} else {
@@ -215,7 +220,7 @@ func (p *Processor) BuildEvent(anomalyPoint common.AnomalyPoint, from string, no
return event
}
func (p *Processor) HandleRecover(alertingKeys map[string]struct{}, now int64) {
func (p *Processor) HandleRecover(alertingKeys map[string]struct{}, now int64, inhibit bool) {
for _, hash := range p.pendings.Keys() {
if _, has := alertingKeys[hash]; has {
continue
@@ -223,11 +228,54 @@ func (p *Processor) HandleRecover(alertingKeys map[string]struct{}, now int64) {
p.pendings.Delete(hash)
}
hashArr := make([]string, 0, len(alertingKeys))
for hash := range p.fires.GetAll() {
if _, has := alertingKeys[hash]; has {
continue
}
p.RecoverSingle(hash, now, nil)
hashArr = append(hashArr, hash)
}
p.HandleRecoverEvent(hashArr, now, inhibit)
}
func (p *Processor) HandleRecoverEvent(hashArr []string, now int64, inhibit bool) {
cachedRule := p.rule
if cachedRule == nil {
return
}
if !inhibit {
for _, hash := range hashArr {
p.RecoverSingle(hash, now, nil)
}
return
}
eventMap := make(map[string]models.AlertCurEvent)
for _, hash := range hashArr {
event, has := p.fires.Get(hash)
if !has {
continue
}
e, exists := eventMap[event.Tags]
if !exists {
eventMap[event.Tags] = *event
continue
}
if e.Severity > event.Severity {
// hash 对应的恢复事件的被抑制了,把之前的事件删除
p.fires.Delete(e.Hash)
p.pendings.Delete(e.Hash)
eventMap[event.Tags] = *event
}
}
for _, event := range eventMap {
p.RecoverSingle(event.Hash, now, nil)
}
}
@@ -472,6 +520,11 @@ func (p *Processor) mayHandleGroup() {
}
}
func (p *Processor) DeleteProcessEvent(hash string) {
p.fires.Delete(hash)
p.pendings.Delete(hash)
}
func labelMapToArr(m map[string]string) []string {
numLabels := len(m)

View File

@@ -54,6 +54,11 @@ type TaskCreateReply struct {
func handleIbex(ctx *ctx.Context, url string, event *models.AlertCurEvent, targetCache *memsto.TargetCacheType, userCache *memsto.UserCacheType,
taskTplCache *memsto.TaskTplCache) {
if imodels.DB() == nil {
logger.Warning("event_callback_ibex: db is nil")
return
}
arr := strings.Split(url, "/")
var idstr string

View File

@@ -86,12 +86,18 @@ func (es *EmailSender) WriteEmail(subject, content string, tos []string) {
func dialSmtp(d *gomail.Dialer) gomail.SendCloser {
for {
if s, err := d.Dial(); err != nil {
logger.Errorf("email_sender: failed to dial smtp: %s", err)
select {
case <-mailQuit:
// Note that Sendcloser is not obtained below,
// and the outgoing signal (with configuration changes) exits the current dial
return nil
default:
if s, err := d.Dial(); err != nil {
logger.Errorf("email_sender: failed to dial smtp: %s", err)
} else {
return s
}
time.Sleep(time.Second)
continue
} else {
return s
}
}
}
@@ -99,8 +105,8 @@ func dialSmtp(d *gomail.Dialer) gomail.SendCloser {
var mailQuit = make(chan struct{})
func RestartEmailSender(smtp aconf.SMTPConfig) {
close(mailQuit)
mailQuit = make(chan struct{})
// Notify internal start exit
mailQuit <- struct{}{}
startEmailSender(smtp)
}
@@ -111,7 +117,6 @@ func InitEmailSender(ncc *memsto.NotifyConfigCacheType) {
go updateSmtp(ncc)
smtpConfig = ncc.GetSMTP()
startEmailSender(smtpConfig)
}
func updateSmtp(ncc *memsto.NotifyConfigCacheType) {
@@ -154,6 +159,12 @@ func startEmailSender(smtp aconf.SMTPConfig) {
if !open {
s = dialSmtp(d)
if s == nil {
// Indicates that the dialing failed and exited the current goroutine directly,
// but put the Message back in the mailch
mailch <- m
return
}
open = true
}
if err := gomail.Send(s, m); err != nil {
@@ -165,6 +176,12 @@ func startEmailSender(smtp aconf.SMTPConfig) {
}
s = dialSmtp(d)
if s == nil {
// Indicates that the dialing failed and exited the current goroutine directly,
// but put the Message back in the mailch
mailch <- m
return
}
open = true
if err := gomail.Send(s, m); err != nil {

View File

@@ -38,7 +38,7 @@ func SendWebhooks(webhooks []*models.Webhook, event *models.AlertCurEvent, stats
if len(conf.Headers) > 0 && len(conf.Headers)%2 == 0 {
for i := 0; i < len(conf.Headers); i += 2 {
if conf.Headers[i] == "host" {
if conf.Headers[i] == "host" || conf.Headers[i] == "Host" {
req.Host = conf.Headers[i+1]
continue
}

View File

@@ -12,6 +12,7 @@ type Center struct {
AnonymousAccess AnonymousAccess
UseFileAssets bool
FlashDuty FlashDuty
EventHistoryGroupView bool
}
type Plugin struct {

View File

@@ -76,7 +76,6 @@ ops:
- "/dashboards/add"
- "/dashboards/put"
- "/dashboards/del"
- "/dashboards-built-in"
- name: alert
cname: 告警规则
@@ -85,7 +84,7 @@ ops:
- "/alert-rules/add"
- "/alert-rules/put"
- "/alert-rules/del"
- "/alert-rules-built-in"
- name: alert-mutes
cname: 告警静默管理
ops:
@@ -172,6 +171,22 @@ ops:
- "/busi-groups/put"
- "/busi-groups/del"
- name: builtin-metrics
cname: 指标视图
ops:
- "/metrics-built-in"
- "/builtin-metrics/add"
- "/builtin-metrics/put"
- "/builtin-metrics/del"
- name: built-in-components
cname: 模版中心
ops:
- "/built-in-components"
- "/built-in-components/add"
- "/built-in-components/put"
- "/built-in-components/del"
- name: system
cname: 系统信息
ops:

View File

@@ -11,6 +11,7 @@ import (
"github.com/ccfos/nightingale/v6/center/cconf"
"github.com/ccfos/nightingale/v6/center/cconf/rsa"
"github.com/ccfos/nightingale/v6/center/cstats"
"github.com/ccfos/nightingale/v6/center/integration"
"github.com/ccfos/nightingale/v6/center/metas"
centerrt "github.com/ccfos/nightingale/v6/center/router"
"github.com/ccfos/nightingale/v6/center/sso"
@@ -63,11 +64,14 @@ func Initialize(configDir string, cryptoKey string) (func(), error) {
migrate.Migrate(db)
models.InitRoot(ctx)
config.HTTP.JWTAuth.SigningKey = models.InitJWTSigningKey(ctx)
err = rsa.InitRSAConfig(ctx, &config.HTTP.RSA)
if err != nil {
return nil, err
}
integration.Init(ctx, config.Center.BuiltinIntegrationsDir)
var redis storage.Redis
redis, err = storage.NewRedis(config.Redis)
if err != nil {
@@ -80,8 +84,6 @@ func Initialize(configDir string, cryptoKey string) (func(), error) {
syncStats := memsto.NewSyncStats()
alertStats := astats.NewSyncStats()
sso := sso.Init(config.Center, ctx)
configCache := memsto.NewConfigCache(ctx, syncStats, config.HTTP.RSA.RSAPrivateKey, config.HTTP.RSA.RSAPassWord)
busiGroupCache := memsto.NewBusiGroupCache(ctx, syncStats)
targetCache := memsto.NewTargetCache(ctx, syncStats, redis)
@@ -93,6 +95,7 @@ func Initialize(configDir string, cryptoKey string) (func(), error) {
userGroupCache := memsto.NewUserGroupCache(ctx, syncStats)
taskTplCache := memsto.NewTaskTplCache(ctx)
sso := sso.Init(config.Center, ctx, configCache)
promClients := prom.NewPromClient(ctx)
tdengineClients := tdengine.NewTdengineClient(ctx, config.Alert.Heartbeat)

365
center/integration/init.go Normal file
View File

@@ -0,0 +1,365 @@
package integration
import (
"encoding/json"
"path"
"strings"
"time"
"github.com/ccfos/nightingale/v6/models"
"github.com/ccfos/nightingale/v6/pkg/ctx"
"github.com/toolkits/pkg/file"
"github.com/toolkits/pkg/logger"
"github.com/toolkits/pkg/runner"
)
const SYSTEM = "system"
func Init(ctx *ctx.Context, builtinIntegrationsDir string) {
fp := builtinIntegrationsDir
if fp == "" {
fp = path.Join(runner.Cwd, "integrations")
}
// var fileList []string
dirList, err := file.DirsUnder(fp)
if err != nil {
logger.Warning("read builtin component dir fail ", err)
return
}
for _, dir := range dirList {
// components icon
componentDir := fp + "/" + dir
component := models.BuiltinComponent{
Ident: dir,
}
// get logo name
// /api/n9e/integrations/icon/AliYun/aliyun.png
files, err := file.FilesUnder(componentDir + "/icon")
if err == nil && len(files) > 0 {
component.Logo = "/api/n9e/integrations/icon/" + component.Ident + "/" + files[0]
} else if err != nil {
logger.Warningf("read builtin component icon dir fail %s %v", component.Ident, err)
}
// get description
files, err = file.FilesUnder(componentDir + "/markdown")
if err == nil && len(files) > 0 {
var readmeFile string
for _, file := range files {
if strings.HasSuffix(strings.ToLower(file), "md") {
readmeFile = componentDir + "/markdown/" + file
break
}
}
if readmeFile != "" {
component.Readme, _ = file.ReadString(readmeFile)
}
} else if err != nil {
logger.Warningf("read builtin component markdown dir fail %s %v", component.Ident, err)
}
exists, _ := models.BuiltinComponentExists(ctx, &component)
if !exists {
err = component.Add(ctx, SYSTEM)
if err != nil {
logger.Warning("add builtin component fail ", component, err)
continue
}
} else {
old, err := models.BuiltinComponentGet(ctx, "ident = ?", component.Ident)
if err != nil {
logger.Warning("get builtin component fail ", component, err)
continue
}
if old == nil {
logger.Warning("get builtin component nil ", component)
continue
}
if old.UpdatedBy == SYSTEM {
now := time.Now().Unix()
old.CreatedAt = now
old.UpdatedAt = now
old.Readme = component.Readme
old.UpdatedBy = SYSTEM
err = models.DB(ctx).Model(old).Select("*").Updates(old).Error
if err != nil {
logger.Warning("update builtin component fail ", old, err)
}
}
}
// delete uuid is emtpy
err = models.DB(ctx).Exec("delete from builtin_payloads where uuid = 0 and type != 'collect' and (updated_by = 'system' or updated_by = '')").Error
if err != nil {
logger.Warning("delete builtin payloads fail ", err)
}
// delete builtin metrics uuid is emtpy
err = models.DB(ctx).Exec("delete from builtin_metrics where uuid = 0 and (updated_by = 'system' or updated_by = '')").Error
if err != nil {
logger.Warning("delete builtin metrics fail ", err)
}
// alerts
files, err = file.FilesUnder(componentDir + "/alerts")
if err == nil && len(files) > 0 {
for _, f := range files {
fp := componentDir + "/alerts/" + f
bs, err := file.ReadBytes(fp)
if err != nil {
logger.Warning("read builtin component alerts file fail ", f, err)
continue
}
alerts := []models.AlertRule{}
err = json.Unmarshal(bs, &alerts)
if err != nil {
logger.Warning("parse builtin component alerts file fail ", f, err)
continue
}
newAlerts := []models.AlertRule{}
writeAlertFileFlag := false
for _, alert := range alerts {
if alert.UUID == 0 {
writeAlertFileFlag = true
alert.UUID = time.Now().UnixNano()
}
newAlerts = append(newAlerts, alert)
content, err := json.Marshal(alert)
if err != nil {
logger.Warning("marshal builtin alert fail ", alert, err)
continue
}
cate := strings.Replace(f, ".json", "", -1)
builtinAlert := models.BuiltinPayload{
Component: component.Ident,
Type: "alert",
Cate: cate,
Name: alert.Name,
Tags: alert.AppendTags,
Content: string(content),
UUID: alert.UUID,
}
old, err := models.BuiltinPayloadGet(ctx, "uuid = ?", alert.UUID)
if err != nil {
logger.Warning("get builtin alert fail ", builtinAlert, err)
continue
}
if old == nil {
err := builtinAlert.Add(ctx, SYSTEM)
if err != nil {
logger.Warning("add builtin alert fail ", builtinAlert, err)
}
continue
}
if old.UpdatedBy == SYSTEM {
old.Content = string(content)
old.Name = alert.Name
old.Tags = alert.AppendTags
err = models.DB(ctx).Model(old).Select("*").Updates(old).Error
if err != nil {
logger.Warningf("update builtin alert:%+v fail %v", builtinAlert, err)
}
}
}
if writeAlertFileFlag {
bs, err = json.MarshalIndent(newAlerts, "", " ")
if err != nil {
logger.Warning("marshal builtin alerts fail ", newAlerts, err)
continue
}
_, err = file.WriteBytes(fp, bs)
if err != nil {
logger.Warning("write builtin alerts file fail ", f, err)
}
}
}
}
// dashboards
files, err = file.FilesUnder(componentDir + "/dashboards")
if err == nil && len(files) > 0 {
for _, f := range files {
fp := componentDir + "/dashboards/" + f
bs, err := file.ReadBytes(fp)
if err != nil {
logger.Warning("read builtin component dashboards file fail ", f, err)
continue
}
dashboard := BuiltinBoard{}
err = json.Unmarshal(bs, &dashboard)
if err != nil {
logger.Warning("parse builtin component dashboards file fail ", f, err)
continue
}
if dashboard.UUID == 0 {
dashboard.UUID = time.Now().UnixNano()
// 补全文件中的 uuid
bs, err = json.MarshalIndent(dashboard, "", " ")
if err != nil {
logger.Warning("marshal builtin dashboard fail ", dashboard, err)
continue
}
_, err = file.WriteBytes(fp, bs)
if err != nil {
logger.Warning("write builtin dashboard file fail ", f, err)
}
}
content, err := json.Marshal(dashboard)
if err != nil {
logger.Warning("marshal builtin dashboard fail ", dashboard, err)
continue
}
builtinDashboard := models.BuiltinPayload{
Component: component.Ident,
Type: "dashboard",
Cate: "",
Name: dashboard.Name,
Tags: dashboard.Tags,
Content: string(content),
UUID: dashboard.UUID,
}
old, err := models.BuiltinPayloadGet(ctx, "uuid = ?", dashboard.UUID)
if err != nil {
logger.Warning("get builtin alert fail ", builtinDashboard, err)
continue
}
if old == nil {
err := builtinDashboard.Add(ctx, SYSTEM)
if err != nil {
logger.Warning("add builtin alert fail ", builtinDashboard, err)
}
continue
}
if old.UpdatedBy == SYSTEM {
old.Content = string(content)
old.Name = dashboard.Name
old.Tags = dashboard.Tags
err = models.DB(ctx).Model(old).Select("*").Updates(old).Error
if err != nil {
logger.Warningf("update builtin alert:%+v fail %v", builtinDashboard, err)
}
}
}
} else if err != nil {
logger.Warningf("read builtin component dash dir fail %s %v", component.Ident, err)
}
// metrics
files, err = file.FilesUnder(componentDir + "/metrics")
if err == nil && len(files) > 0 {
for _, f := range files {
fp := componentDir + "/metrics/" + f
bs, err := file.ReadBytes(fp)
if err != nil {
logger.Warning("read builtin component metrics file fail", f, err)
continue
}
metrics := []models.BuiltinMetric{}
newMetrics := []models.BuiltinMetric{}
err = json.Unmarshal(bs, &metrics)
if err != nil {
logger.Warning("parse builtin component metrics file fail", f, err)
continue
}
writeMetricFileFlag := false
for _, metric := range metrics {
if metric.UUID == 0 {
writeMetricFileFlag = true
metric.UUID = time.Now().UnixNano()
}
newMetrics = append(newMetrics, metric)
old, err := models.BuiltinMetricGet(ctx, "uuid = ?", metric.UUID)
if err != nil {
logger.Warning("get builtin metrics fail ", metric, err)
continue
}
if old == nil {
err := metric.Add(ctx, SYSTEM)
if err != nil {
logger.Warning("add builtin metrics fail ", metric, err)
}
continue
}
if old.UpdatedBy == SYSTEM {
old.Collector = metric.Collector
old.Typ = metric.Typ
old.Name = metric.Name
old.Unit = metric.Unit
old.Note = metric.Note
old.Lang = metric.Lang
old.Expression = metric.Expression
err = models.DB(ctx).Model(old).Select("*").Updates(old).Error
if err != nil {
logger.Warningf("update builtin metric:%+v fail %v", metric, err)
}
}
}
if writeMetricFileFlag {
bs, err = json.MarshalIndent(newMetrics, "", " ")
if err != nil {
logger.Warning("marshal builtin metrics fail ", newMetrics, err)
continue
}
_, err = file.WriteBytes(fp, bs)
if err != nil {
logger.Warning("write builtin metrics file fail ", f, err)
}
}
}
} else if err != nil {
logger.Warningf("read builtin component metrics dir fail %s %v", component.Ident, err)
}
}
}
type BuiltinBoard struct {
Id int64 `json:"id" gorm:"primaryKey"`
GroupId int64 `json:"group_id"`
Name string `json:"name"`
Ident string `json:"ident"`
Tags string `json:"tags"`
CreateAt int64 `json:"create_at"`
CreateBy string `json:"create_by"`
UpdateAt int64 `json:"update_at"`
UpdateBy string `json:"update_by"`
Configs interface{} `json:"configs" gorm:"-"`
Public int `json:"public"` // 0: false, 1: true
PublicCate int `json:"public_cate"` // 0: anonymous, 1: login, 2: busi
Bgids []int64 `json:"bgids" gorm:"-"`
BuiltIn int `json:"built_in"` // 0: false, 1: true
Hide int `json:"hide"` // 0: false, 1: true
UUID int64 `json:"uuid"`
}

View File

@@ -92,14 +92,14 @@ func languageDetector(i18NHeaderKey string) gin.HandlerFunc {
lang := c.GetHeader(headerKey)
if lang != "" {
if strings.HasPrefix(lang, "zh") {
c.Request.Header.Set("X-Language", "zh")
c.Request.Header.Set("X-Language", "zh_CN")
} else if strings.HasPrefix(lang, "en") {
c.Request.Header.Set("X-Language", "en")
} else {
c.Request.Header.Set("X-Language", lang)
}
} else {
c.Request.Header.Set("X-Language", "en")
c.Request.Header.Set("X-Language", "zh_CN")
}
}
c.Next()
@@ -229,6 +229,20 @@ func (rt *Router) Config(r *gin.Engine) {
pages.POST("/metric-views", rt.auth(), rt.user(), rt.metricViewAdd)
pages.PUT("/metric-views", rt.auth(), rt.user(), rt.metricViewPut)
pages.GET("/builtin-metric-filters", rt.auth(), rt.user(), rt.metricFilterGets)
pages.DELETE("/builtin-metric-filters", rt.auth(), rt.user(), rt.metricFilterDel)
pages.POST("/builtin-metric-filters", rt.auth(), rt.user(), rt.metricFilterAdd)
pages.PUT("/builtin-metric-filters", rt.auth(), rt.user(), rt.metricFilterPut)
pages.POST("/builtin-metric-promql", rt.auth(), rt.user(), rt.getMetricPromql)
pages.POST("/builtin-metrics", rt.auth(), rt.user(), rt.perm("/builtin-metrics/add"), rt.builtinMetricsAdd)
pages.PUT("/builtin-metrics", rt.auth(), rt.user(), rt.perm("/builtin-metrics/put"), rt.builtinMetricsPut)
pages.DELETE("/builtin-metrics", rt.auth(), rt.user(), rt.perm("/builtin-metrics/del"), rt.builtinMetricsDel)
pages.GET("/builtin-metrics", rt.auth(), rt.user(), rt.builtinMetricsGets)
pages.GET("/builtin-metrics/types", rt.auth(), rt.user(), rt.builtinMetricsTypes)
pages.GET("/builtin-metrics/types/default", rt.auth(), rt.user(), rt.builtinMetricsDefaultTypes)
pages.GET("/builtin-metrics/collectors", rt.auth(), rt.user(), rt.builtinMetricsCollectors)
pages.GET("/user-groups", rt.auth(), rt.user(), rt.userGroupGets)
pages.POST("/user-groups", rt.auth(), rt.user(), rt.perm("/user-groups/add"), rt.userGroupAdd)
pages.GET("/user-group/:id", rt.auth(), rt.user(), rt.userGroupGet)
@@ -260,20 +274,21 @@ func (rt *Router) Config(r *gin.Engine) {
pages.POST("/builtin-cate-favorite", rt.auth(), rt.user(), rt.builtinCateFavoriteAdd)
pages.DELETE("/builtin-cate-favorite/:name", rt.auth(), rt.user(), rt.builtinCateFavoriteDel)
pages.GET("/builtin-boards", rt.builtinBoardGets)
pages.GET("/builtin-board/:name", rt.builtinBoardGet)
pages.GET("/dashboards/builtin/list", rt.builtinBoardGets)
pages.GET("/builtin-boards-cates", rt.auth(), rt.user(), rt.builtinBoardCateGets)
pages.POST("/builtin-boards-detail", rt.auth(), rt.user(), rt.builtinBoardDetailGets)
pages.GET("/integrations/icon/:cate/:name", rt.builtinIcon)
pages.GET("/integrations/makedown/:cate", rt.builtinMarkdown)
// pages.GET("/builtin-boards", rt.builtinBoardGets)
// pages.GET("/builtin-board/:name", rt.builtinBoardGet)
// pages.GET("/dashboards/builtin/list", rt.builtinBoardGets)
// pages.GET("/builtin-boards-cates", rt.auth(), rt.user(), rt.builtinBoardCateGets)
// pages.POST("/builtin-boards-detail", rt.auth(), rt.user(), rt.builtinBoardDetailGets)
// pages.GET("/integrations/makedown/:cate", rt.builtinMarkdown)
pages.GET("/busi-groups/public-boards", rt.auth(), rt.user(), rt.perm("/dashboards"), rt.publicBoardGets)
pages.GET("/busi-groups/boards", rt.auth(), rt.user(), rt.perm("/dashboards"), rt.boardGetsByGids)
pages.GET("/busi-group/:id/boards", rt.auth(), rt.user(), rt.perm("/dashboards"), rt.bgro(), rt.boardGets)
pages.POST("/busi-group/:id/boards", rt.auth(), rt.user(), rt.perm("/dashboards/add"), rt.bgrw(), rt.boardAdd)
pages.POST("/busi-group/:id/board/:bid/clone", rt.auth(), rt.user(), rt.perm("/dashboards/add"), rt.bgrw(), rt.boardClone)
pages.POST("/busi-group/:id/boards/clones", rt.auth(), rt.user(), rt.perm("/dashboards/add"), rt.boardBatchClone)
pages.POST("/busi-groups/boards/clones", rt.auth(), rt.user(), rt.perm("/dashboards/add"), rt.boardBatchClone)
pages.GET("/board/:bid", rt.boardGet)
pages.GET("/board/:bid/pure", rt.boardPureGet)
@@ -285,8 +300,8 @@ func (rt *Router) Config(r *gin.Engine) {
pages.GET("/share-charts", rt.chartShareGets)
pages.POST("/share-charts", rt.auth(), rt.chartShareAdd)
pages.GET("/alert-rules/builtin/alerts-cates", rt.auth(), rt.user(), rt.builtinAlertCateGets)
pages.GET("/alert-rules/builtin/list", rt.auth(), rt.user(), rt.builtinAlertRules)
// pages.GET("/alert-rules/builtin/alerts-cates", rt.auth(), rt.user(), rt.builtinAlertCateGets)
// pages.GET("/alert-rules/builtin/list", rt.auth(), rt.user(), rt.builtinAlertRules)
pages.GET("/alert-rules/callbacks", rt.auth(), rt.user(), rt.alertRuleCallbacks)
pages.GET("/busi-groups/alert-rules", rt.auth(), rt.user(), rt.perm("/alert-rules"), rt.alertRuleGetsByGids)
@@ -327,15 +342,15 @@ func (rt *Router) Config(r *gin.Engine) {
pages.GET("/alert-cur-event/:eid", rt.alertCurEventGet)
pages.GET("/alert-his-event/:eid", rt.alertHisEventGet)
} else {
pages.GET("/alert-cur-event/:eid", rt.auth(), rt.alertCurEventGet)
pages.GET("/alert-his-event/:eid", rt.auth(), rt.alertHisEventGet)
pages.GET("/alert-cur-event/:eid", rt.auth(), rt.user(), rt.alertCurEventGet)
pages.GET("/alert-his-event/:eid", rt.auth(), rt.user(), rt.alertHisEventGet)
}
// card logic
pages.GET("/alert-cur-events/list", rt.auth(), rt.alertCurEventsList)
pages.GET("/alert-cur-events/card", rt.auth(), rt.alertCurEventsCard)
pages.GET("/alert-cur-events/list", rt.auth(), rt.user(), rt.alertCurEventsList)
pages.GET("/alert-cur-events/card", rt.auth(), rt.user(), rt.alertCurEventsCard)
pages.POST("/alert-cur-events/card/details", rt.auth(), rt.alertCurEventsCardDetails)
pages.GET("/alert-his-events/list", rt.auth(), rt.alertHisEventsList)
pages.GET("/alert-his-events/list", rt.auth(), rt.user(), rt.alertHisEventsList)
pages.DELETE("/alert-cur-events", rt.auth(), rt.user(), rt.perm("/alert-cur-events/del"), rt.alertCurEventDel)
pages.GET("/alert-cur-events/stats", rt.auth(), rt.alertCurEventsStatistics)
@@ -357,8 +372,8 @@ func (rt *Router) Config(r *gin.Engine) {
pages.GET("/busi-group/:id/tasks", rt.auth(), rt.user(), rt.perm("/job-tasks"), rt.bgro(), rt.taskGets)
pages.POST("/busi-group/:id/tasks", rt.auth(), rt.user(), rt.perm("/job-tasks/add"), rt.bgrw(), rt.taskAdd)
pages.GET("/servers", rt.auth(), rt.admin(), rt.serversGet)
pages.GET("/server-clusters", rt.auth(), rt.admin(), rt.serverClustersGet)
pages.GET("/servers", rt.auth(), rt.user(), rt.perm("/help/servers"), rt.serversGet)
pages.GET("/server-clusters", rt.auth(), rt.user(), rt.perm("/help/servers"), rt.serverClustersGet)
pages.POST("/datasource/list", rt.auth(), rt.user(), rt.datasourceList)
pages.POST("/datasource/plugin/list", rt.auth(), rt.pluginList)
@@ -420,6 +435,17 @@ func (rt *Router) Config(r *gin.Engine) {
// for admin api
pages.GET("/user/busi-groups", rt.auth(), rt.admin(), rt.userBusiGroupsGets)
pages.GET("/builtin-components", rt.auth(), rt.user(), rt.builtinComponentsGets)
pages.POST("/builtin-components", rt.auth(), rt.user(), rt.perm("/built-in-components/add"), rt.builtinComponentsAdd)
pages.PUT("/builtin-components", rt.auth(), rt.user(), rt.perm("/built-in-components/put"), rt.builtinComponentsPut)
pages.DELETE("/builtin-components", rt.auth(), rt.user(), rt.perm("/built-in-components/del"), rt.builtinComponentsDel)
pages.GET("/builtin-payloads", rt.auth(), rt.user(), rt.builtinPayloadsGets)
pages.GET("/builtin-payloads/cates", rt.auth(), rt.user(), rt.builtinPayloadcatesGet)
pages.POST("/builtin-payloads", rt.auth(), rt.user(), rt.perm("/built-in-components/add"), rt.builtinPayloadsAdd)
pages.GET("/builtin-payload/:id", rt.auth(), rt.user(), rt.perm("/built-in-components"), rt.builtinPayloadGet)
pages.PUT("/builtin-payloads", rt.auth(), rt.user(), rt.perm("/built-in-components/put"), rt.builtinPayloadsPut)
pages.DELETE("/builtin-payloads", rt.auth(), rt.user(), rt.perm("/built-in-components/del"), rt.builtinPayloadsDel)
}
r.GET("/api/n9e/versions", func(c *gin.Context) {
@@ -453,10 +479,14 @@ func (rt *Router) Config(r *gin.Engine) {
service.GET("/user-group-members", rt.userGroupMemberGetsByService)
service.GET("/targets", rt.targetGetsByService)
service.GET("/target/extra-meta", rt.targetExtendInfoByIdent)
service.POST("/target/list", rt.targetGetsByHostFilter)
service.DELETE("/targets", rt.targetDelByService)
service.GET("/targets/tags", rt.targetGetTags)
service.POST("/targets/tags", rt.targetBindTagsByService)
service.DELETE("/targets/tags", rt.targetUnbindTagsByService)
service.PUT("/targets/note", rt.targetUpdateNoteByService)
service.PUT("/targets/bgid", rt.targetUpdateBgidByService)
service.POST("/alert-rules", rt.alertRuleAddByService)
service.POST("/alert-rule-add", rt.alertRuleAddOneByService)

View File

@@ -43,7 +43,6 @@ func (rt *Router) alertCurEventsCard(c *gin.Context) {
stime, etime := getTimeRange(c)
severity := ginx.QueryInt(c, "severity", -1)
query := ginx.QueryStr(c, "query", "")
busiGroupId := ginx.QueryInt64(c, "bgid", 0)
dsIds := queryDatasourceIds(c)
rules := parseAggrRules(c)
@@ -62,8 +61,11 @@ func (rt *Router) alertCurEventsCard(c *gin.Context) {
cates = strings.Split(cate, ",")
}
bgids, err := GetBusinessGroupIds(c, rt.Ctx, rt.Center.EventHistoryGroupView)
ginx.Dangerous(err)
// 最多获取50000个获取太多也没啥意义
list, err := models.AlertCurEventGets(rt.Ctx, prods, busiGroupId, stime, etime, severity, dsIds, cates, query, 50000, 0)
list, err := models.AlertCurEventGets(rt.Ctx, prods, bgids, stime, etime, severity, dsIds, cates, query, 50000, 0)
ginx.Dangerous(err)
cardmap := make(map[string]*AlertCard)
@@ -142,7 +144,6 @@ func (rt *Router) alertCurEventsList(c *gin.Context) {
severity := ginx.QueryInt(c, "severity", -1)
query := ginx.QueryStr(c, "query", "")
limit := ginx.QueryInt(c, "limit", 20)
busiGroupId := ginx.QueryInt64(c, "bgid", 0)
dsIds := queryDatasourceIds(c)
prod := ginx.QueryStr(c, "prods", "")
@@ -161,10 +162,13 @@ func (rt *Router) alertCurEventsList(c *gin.Context) {
cates = strings.Split(cate, ",")
}
total, err := models.AlertCurEventTotal(rt.Ctx, prods, busiGroupId, stime, etime, severity, dsIds, cates, query)
bgids, err := GetBusinessGroupIds(c, rt.Ctx, rt.Center.EventHistoryGroupView)
ginx.Dangerous(err)
list, err := models.AlertCurEventGets(rt.Ctx, prods, busiGroupId, stime, etime, severity, dsIds, cates, query, limit, ginx.Offset(c, limit))
total, err := models.AlertCurEventTotal(rt.Ctx, prods, bgids, stime, etime, severity, dsIds, cates, query)
ginx.Dangerous(err)
list, err := models.AlertCurEventGets(rt.Ctx, prods, bgids, stime, etime, severity, dsIds, cates, query, limit, ginx.Offset(c, limit))
ginx.Dangerous(err)
cache := make(map[int64]*models.UserGroup)
@@ -214,6 +218,10 @@ func (rt *Router) alertCurEventGet(c *gin.Context) {
ginx.Bomb(404, "No such active event")
}
if !rt.Center.AnonymousAccess.AlertDetail && rt.Center.EventHistoryGroupView {
rt.bgroCheck(c, event.GroupId)
}
ginx.NewRender(c).Data(event, nil)
}

View File

@@ -1,13 +1,16 @@
package router
import (
"fmt"
"strings"
"time"
"github.com/ccfos/nightingale/v6/models"
"github.com/ccfos/nightingale/v6/pkg/ctx"
"github.com/gin-gonic/gin"
"github.com/toolkits/pkg/ginx"
"golang.org/x/exp/slices"
)
func getTimeRange(c *gin.Context) (stime, etime int64) {
@@ -33,7 +36,6 @@ func (rt *Router) alertHisEventsList(c *gin.Context) {
recovered := ginx.QueryInt(c, "is_recovered", -1)
query := ginx.QueryStr(c, "query", "")
limit := ginx.QueryInt(c, "limit", 20)
busiGroupId := ginx.QueryInt64(c, "bgid", 0)
dsIds := queryDatasourceIds(c)
prod := ginx.QueryStr(c, "prods", "")
@@ -52,10 +54,13 @@ func (rt *Router) alertHisEventsList(c *gin.Context) {
cates = strings.Split(cate, ",")
}
total, err := models.AlertHisEventTotal(rt.Ctx, prods, busiGroupId, stime, etime, severity, recovered, dsIds, cates, query)
bgids, err := GetBusinessGroupIds(c, rt.Ctx, rt.Center.EventHistoryGroupView)
ginx.Dangerous(err)
list, err := models.AlertHisEventGets(rt.Ctx, prods, busiGroupId, stime, etime, severity, recovered, dsIds, cates, query, limit, ginx.Offset(c, limit))
total, err := models.AlertHisEventTotal(rt.Ctx, prods, bgids, stime, etime, severity, recovered, dsIds, cates, query)
ginx.Dangerous(err)
list, err := models.AlertHisEventGets(rt.Ctx, prods, bgids, stime, etime, severity, recovered, dsIds, cates, query, limit, ginx.Offset(c, limit))
ginx.Dangerous(err)
cache := make(map[int64]*models.UserGroup)
@@ -78,5 +83,43 @@ func (rt *Router) alertHisEventGet(c *gin.Context) {
ginx.Bomb(404, "No such alert event")
}
if !rt.Center.AnonymousAccess.AlertDetail && rt.Center.EventHistoryGroupView {
rt.bgroCheck(c, event.GroupId)
}
ginx.NewRender(c).Data(event, err)
}
func GetBusinessGroupIds(c *gin.Context, ctx *ctx.Context, eventHistoryGroupView bool) ([]int64, error) {
bgid := ginx.QueryInt64(c, "bgid", 0)
var bgids []int64
user := c.MustGet("user").(*models.User)
if !eventHistoryGroupView || user.IsAdmin() {
if bgid > 0 {
return []int64{bgid}, nil
}
return bgids, nil
}
bussGroupIds, err := models.MyBusiGroupIds(ctx, user.Id)
if err != nil {
return nil, err
}
if len(bussGroupIds) == 0 {
// 如果没查到用户属于任何业务组需要返回一个0否则会导致查询到全部告警历史
return []int64{0}, nil
}
if bgid > 0 && !slices.Contains(bussGroupIds, bgid) {
return nil, fmt.Errorf("business group ID not allowed")
}
if bgid > 0 {
// Pass filter parameters, priority to use
return []int64{bgid}, nil
}
return bussGroupIds, nil
}

View File

@@ -40,6 +40,11 @@ func (rt *Router) alertRuleGetsByGids(c *gin.Context) {
var err error
gids, err = models.MyBusiGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if len(gids) == 0 {
ginx.Bomb(http.StatusForbidden, "forbidden")
return
}
}
}

View File

@@ -42,6 +42,11 @@ func (rt *Router) alertSubscribeGetsByGids(c *gin.Context) {
var err error
gids, err = models.MyBusiGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if len(gids) == 0 {
ginx.Bomb(http.StatusForbidden, "forbidden")
return
}
}
}

View File

@@ -1,6 +1,7 @@
package router
import (
"fmt"
"net/http"
"time"
@@ -269,6 +270,11 @@ func (rt *Router) boardGetsByGids(c *gin.Context) {
var err error
gids, err = models.MyBusiGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if len(gids) == 0 {
ginx.Bomb(http.StatusForbidden, "forbidden")
return
}
}
}
@@ -294,7 +300,7 @@ func (rt *Router) boardClone(c *gin.Context) {
me := c.MustGet("user").(*models.User)
bo := rt.Board(ginx.UrlParamInt64(c, "bid"))
newBoard := bo.Clone(me.Username, bo.GroupId)
newBoard := bo.Clone(me.Username, bo.GroupId, " Cloned")
ginx.Dangerous(newBoard.Add(rt.Ctx))
@@ -311,32 +317,34 @@ func (rt *Router) boardClone(c *gin.Context) {
type boardsForm struct {
BoardIds []int64 `json:"board_ids"`
Bgids []int64 `json:"bgids"`
}
func (rt *Router) boardBatchClone(c *gin.Context) {
me := c.MustGet("user").(*models.User)
bgid := ginx.UrlParamInt64(c, "id")
rt.bgrwCheck(c, bgid)
var f boardsForm
ginx.BindJSON(c, &f)
for _, bgid := range f.Bgids {
rt.bgrwCheck(c, bgid)
}
reterr := make(map[string]string, len(f.BoardIds))
lang := c.GetHeader("X-Language")
for _, bid := range f.BoardIds {
bo := rt.Board(bid)
newBoard := bo.Clone(me.Username, bgid)
payload, err := models.BoardPayloadGet(rt.Ctx, bo.Id)
if err != nil {
reterr[newBoard.Name] = i18n.Sprintf(lang, err.Error())
continue
}
for _, bgid := range f.Bgids {
for _, bid := range f.BoardIds {
bo := rt.Board(bid)
newBoard := bo.Clone(me.Username, bgid, "")
payload, err := models.BoardPayloadGet(rt.Ctx, bo.Id)
if err != nil {
reterr[fmt.Sprintf("%s-%d", newBoard.Name, bgid)] = i18n.Sprintf(lang, err.Error())
continue
}
if err = newBoard.AtomicAdd(rt.Ctx, payload); err != nil {
reterr[newBoard.Name] = i18n.Sprintf(lang, err.Error())
} else {
reterr[newBoard.Name] = ""
if err = newBoard.AtomicAdd(rt.Ctx, payload); err != nil {
reterr[fmt.Sprintf("%s-%d", newBoard.Name, bgid)] = i18n.Sprintf(lang, err.Error())
}
}
}

View File

@@ -0,0 +1,66 @@
package router
import (
"net/http"
"github.com/ccfos/nightingale/v6/models"
"github.com/gin-gonic/gin"
"github.com/toolkits/pkg/ginx"
)
func (rt *Router) builtinComponentsAdd(c *gin.Context) {
var lst []models.BuiltinComponent
ginx.BindJSON(c, &lst)
username := Username(c)
count := len(lst)
if count == 0 {
ginx.Bomb(http.StatusBadRequest, "input json is empty")
}
reterr := make(map[string]string)
for i := 0; i < count; i++ {
if err := lst[i].Add(rt.Ctx, username); err != nil {
reterr[lst[i].Ident] = err.Error()
}
}
ginx.NewRender(c).Data(reterr, nil)
}
func (rt *Router) builtinComponentsGets(c *gin.Context) {
query := ginx.QueryStr(c, "query", "")
bc, err := models.BuiltinComponentGets(rt.Ctx, query)
ginx.Dangerous(err)
ginx.NewRender(c).Data(bc, nil)
}
func (rt *Router) builtinComponentsPut(c *gin.Context) {
var req models.BuiltinComponent
ginx.BindJSON(c, &req)
bc, err := models.BuiltinComponentGet(rt.Ctx, "id = ?", req.ID)
ginx.Dangerous(err)
if bc == nil {
ginx.NewRender(c, http.StatusNotFound).Message("No such builtin component")
return
}
username := Username(c)
req.UpdatedBy = username
ginx.NewRender(c).Message(bc.Update(rt.Ctx, req))
}
func (rt *Router) builtinComponentsDel(c *gin.Context) {
var req idsForm
ginx.BindJSON(c, &req)
req.Verify()
ginx.NewRender(c).Message(models.BuiltinComponentDels(rt.Ctx, req.Ids))
}

View File

@@ -0,0 +1,120 @@
package router
import (
"github.com/ccfos/nightingale/v6/models"
"github.com/ccfos/nightingale/v6/pkg/prom"
"github.com/gin-gonic/gin"
"github.com/toolkits/pkg/ginx"
)
func (rt *Router) metricFilterGets(c *gin.Context) {
lst, err := models.MetricFilterGets(rt.Ctx, "")
ginx.Dangerous(err)
me := c.MustGet("user").(*models.User)
gids, err := models.MyGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
arr := make([]models.MetricFilter, 0)
for _, f := range lst {
if me.Username == f.CreateBy {
arr = append(arr, f)
continue
}
if HasPerm(gids, f.GroupsPerm, false) {
arr = append(arr, f)
}
}
ginx.NewRender(c).Data(arr, err)
}
func (rt *Router) metricFilterAdd(c *gin.Context) {
var f models.MetricFilter
ginx.BindJSON(c, &f)
me := c.MustGet("user").(*models.User)
f.CreateBy = me.Username
f.UpdateBy = me.Username
ginx.Dangerous(f.Add(rt.Ctx))
ginx.NewRender(c).Data(f, nil)
}
func (rt *Router) metricFilterDel(c *gin.Context) {
var f idsForm
ginx.BindJSON(c, &f)
f.Verify()
me := c.MustGet("user").(*models.User)
for _, id := range f.Ids {
old, err := models.MetricFilterGet(rt.Ctx, id)
ginx.Dangerous(err)
if me.Username != old.CreateBy {
gids, err := models.MyGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if !HasPerm(gids, old.GroupsPerm, true) {
ginx.NewRender(c).Message("no permission")
return
}
}
}
ginx.NewRender(c).Message(models.MetricFilterDel(rt.Ctx, f.Ids))
}
func (rt *Router) metricFilterPut(c *gin.Context) {
var f models.MetricFilter
ginx.BindJSON(c, &f)
me := c.MustGet("user").(*models.User)
old, err := models.MetricFilterGet(rt.Ctx, f.ID)
ginx.Dangerous(err)
if me.Username != old.CreateBy {
gids, err := models.MyGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if !HasPerm(gids, old.GroupsPerm, true) {
ginx.NewRender(c).Message("no permission")
return
}
}
f.UpdateBy = me.Username
ginx.NewRender(c).Message(f.Update(rt.Ctx))
}
type metricPromqlReq struct {
LabelFilter string `json:"label_filter"`
Promql string `json:"promql"`
}
func (rt *Router) getMetricPromql(c *gin.Context) {
var req metricPromqlReq
ginx.BindJSON(c, &req)
promql := prom.AddLabelToPromQL(req.LabelFilter, req.Promql)
ginx.NewRender(c).Data(promql, nil)
}
func HasPerm(gids []int64, gps []models.GroupPerm, checkWrite bool) bool {
gmap := make(map[int64]struct{})
for _, gp := range gps {
if checkWrite && !gp.Write {
continue
}
gmap[gp.Gid] = struct{}{}
}
for _, gid := range gids {
if _, ok := gmap[gid]; ok {
return true
}
}
return false
}

View File

@@ -0,0 +1,115 @@
package router
import (
"net/http"
"time"
"github.com/ccfos/nightingale/v6/models"
"github.com/gin-gonic/gin"
"github.com/toolkits/pkg/ginx"
)
// single or import
func (rt *Router) builtinMetricsAdd(c *gin.Context) {
var lst []models.BuiltinMetric
ginx.BindJSON(c, &lst)
username := Username(c)
count := len(lst)
if count == 0 {
ginx.Bomb(http.StatusBadRequest, "input json is empty")
}
lang := c.GetHeader("X-Language")
if lang == "" {
lang = "zh_CN"
}
reterr := make(map[string]string)
for i := 0; i < count; i++ {
lst[i].Lang = lang
lst[i].UUID = time.Now().UnixNano()
if err := lst[i].Add(rt.Ctx, username); err != nil {
reterr[lst[i].Name] = err.Error()
}
}
ginx.NewRender(c).Data(reterr, nil)
}
func (rt *Router) builtinMetricsGets(c *gin.Context) {
collector := ginx.QueryStr(c, "collector", "")
typ := ginx.QueryStr(c, "typ", "")
query := ginx.QueryStr(c, "query", "")
limit := ginx.QueryInt(c, "limit", 20)
lang := c.GetHeader("X-Language")
unit := ginx.QueryStr(c, "unit", "")
if lang == "" {
lang = "zh_CN"
}
bm, err := models.BuiltinMetricGets(rt.Ctx, lang, collector, typ, query, unit, limit, ginx.Offset(c, limit))
ginx.Dangerous(err)
total, err := models.BuiltinMetricCount(rt.Ctx, lang, collector, typ, query, unit)
ginx.Dangerous(err)
ginx.NewRender(c).Data(gin.H{
"list": bm,
"total": total,
}, nil)
}
func (rt *Router) builtinMetricsPut(c *gin.Context) {
var req models.BuiltinMetric
ginx.BindJSON(c, &req)
bm, err := models.BuiltinMetricGet(rt.Ctx, "id = ?", req.ID)
ginx.Dangerous(err)
if bm == nil {
ginx.NewRender(c, http.StatusNotFound).Message("No such builtin metric")
return
}
username := Username(c)
req.UpdatedBy = username
ginx.NewRender(c).Message(bm.Update(rt.Ctx, req))
}
func (rt *Router) builtinMetricsDel(c *gin.Context) {
var req idsForm
ginx.BindJSON(c, &req)
req.Verify()
ginx.NewRender(c).Message(models.BuiltinMetricDels(rt.Ctx, req.Ids))
}
func (rt *Router) builtinMetricsDefaultTypes(c *gin.Context) {
lst := []string{
"Linux",
"cAdvisor",
"Ping",
"MySQL",
"Redis",
"Kafka",
"Elasticsearch",
"PostgreSQL",
"MongoDB",
"Memcached",
}
ginx.NewRender(c).Data(lst, nil)
}
func (rt *Router) builtinMetricsTypes(c *gin.Context) {
collector := ginx.QueryStr(c, "collector", "")
query := ginx.QueryStr(c, "query", "")
lang := c.GetHeader("X-Language")
ginx.NewRender(c).Data(models.BuiltinMetricTypes(rt.Ctx, lang, collector, query))
}
func (rt *Router) builtinMetricsCollectors(c *gin.Context) {
typ := ginx.QueryStr(c, "typ", "")
query := ginx.QueryStr(c, "query", "")
lang := c.GetHeader("X-Language")
ginx.NewRender(c).Data(models.BuiltinMetricCollectors(rt.Ctx, lang, typ, query))
}

View File

@@ -0,0 +1,246 @@
package router
import (
"encoding/json"
"net/http"
"strings"
"time"
"github.com/ccfos/nightingale/v6/models"
"github.com/gin-gonic/gin"
"github.com/toolkits/pkg/ginx"
)
type Board struct {
Name string `json:"name"`
Tags string `json:"tags"`
Configs interface{} `json:"configs"`
UUID int64 `json:"uuid"`
}
func (rt *Router) builtinPayloadsAdd(c *gin.Context) {
var lst []models.BuiltinPayload
ginx.BindJSON(c, &lst)
username := Username(c)
count := len(lst)
if count == 0 {
ginx.Bomb(http.StatusBadRequest, "input json is empty")
}
reterr := make(map[string]string)
for i := 0; i < count; i++ {
if lst[i].Type == "alert" {
if strings.HasPrefix(strings.TrimSpace(lst[i].Content), "[") {
// 处理多个告警规则模板的情况
alertRules := []models.AlertRule{}
if err := json.Unmarshal([]byte(lst[i].Content), &alertRules); err != nil {
reterr[lst[i].Name] = err.Error()
}
for _, rule := range alertRules {
if rule.UUID == 0 {
rule.UUID = time.Now().UnixNano()
}
contentBytes, err := json.Marshal(rule)
if err != nil {
reterr[rule.Name] = err.Error()
continue
}
bp := models.BuiltinPayload{
Type: lst[i].Type,
Component: lst[i].Component,
Cate: lst[i].Cate,
Name: rule.Name,
Tags: rule.AppendTags,
UUID: rule.UUID,
Content: string(contentBytes),
CreatedBy: username,
UpdatedBy: username,
}
if err := bp.Add(rt.Ctx, username); err != nil {
reterr[bp.Name] = err.Error()
}
}
continue
}
alertRule := models.AlertRule{}
if err := json.Unmarshal([]byte(lst[i].Content), &alertRule); err != nil {
reterr[lst[i].Name] = err.Error()
continue
}
if alertRule.UUID == 0 {
alertRule.UUID = time.Now().UnixNano()
}
bp := models.BuiltinPayload{
Type: lst[i].Type,
Component: lst[i].Component,
Cate: lst[i].Cate,
Name: alertRule.Name,
Tags: alertRule.AppendTags,
UUID: alertRule.UUID,
Content: lst[i].Content,
CreatedBy: username,
UpdatedBy: username,
}
if err := bp.Add(rt.Ctx, username); err != nil {
reterr[bp.Name] = err.Error()
}
} else if lst[i].Type == "dashboard" {
if strings.HasPrefix(strings.TrimSpace(lst[i].Content), "[") {
// 处理多个告警规则模板的情况
dashboards := []Board{}
if err := json.Unmarshal([]byte(lst[i].Content), &dashboards); err != nil {
reterr[lst[i].Name] = err.Error()
}
for _, dashboard := range dashboards {
if dashboard.UUID == 0 {
dashboard.UUID = time.Now().UnixNano()
}
contentBytes, err := json.Marshal(dashboard)
if err != nil {
reterr[dashboard.Name] = err.Error()
continue
}
bp := models.BuiltinPayload{
Type: lst[i].Type,
Component: lst[i].Component,
Cate: lst[i].Cate,
Name: dashboard.Name,
Tags: dashboard.Tags,
UUID: dashboard.UUID,
Content: string(contentBytes),
CreatedBy: username,
UpdatedBy: username,
}
if err := bp.Add(rt.Ctx, username); err != nil {
reterr[bp.Name] = err.Error()
}
}
continue
}
dashboard := Board{}
if err := json.Unmarshal([]byte(lst[i].Content), &dashboard); err != nil {
reterr[lst[i].Name] = err.Error()
continue
}
if dashboard.UUID == 0 {
dashboard.UUID = time.Now().UnixNano()
}
bp := models.BuiltinPayload{
Type: lst[i].Type,
Component: lst[i].Component,
Cate: lst[i].Cate,
Name: dashboard.Name,
Tags: dashboard.Tags,
UUID: dashboard.UUID,
Content: lst[i].Content,
CreatedBy: username,
UpdatedBy: username,
}
if err := bp.Add(rt.Ctx, username); err != nil {
reterr[bp.Name] = err.Error()
}
} else {
if err := lst[i].Add(rt.Ctx, username); err != nil {
reterr[lst[i].Name] = err.Error()
}
}
}
ginx.NewRender(c).Data(reterr, nil)
}
func (rt *Router) builtinPayloadsGets(c *gin.Context) {
typ := ginx.QueryStr(c, "type", "")
component := ginx.QueryStr(c, "component", "")
cate := ginx.QueryStr(c, "cate", "")
query := ginx.QueryStr(c, "query", "")
lst, err := models.BuiltinPayloadGets(rt.Ctx, typ, component, cate, query)
ginx.NewRender(c).Data(lst, err)
}
func (rt *Router) builtinPayloadcatesGet(c *gin.Context) {
typ := ginx.QueryStr(c, "type", "")
component := ginx.QueryStr(c, "component", "")
cates, err := models.BuiltinPayloadCates(rt.Ctx, typ, component)
ginx.NewRender(c).Data(cates, err)
}
func (rt *Router) builtinPayloadGet(c *gin.Context) {
id := ginx.UrlParamInt64(c, "id")
bp, err := models.BuiltinPayloadGet(rt.Ctx, "id = ?", id)
if err != nil {
ginx.Bomb(http.StatusInternalServerError, err.Error())
}
if bp == nil {
ginx.Bomb(http.StatusNotFound, "builtin payload not found")
}
ginx.NewRender(c).Data(bp, nil)
}
func (rt *Router) builtinPayloadsPut(c *gin.Context) {
var req models.BuiltinPayload
ginx.BindJSON(c, &req)
bp, err := models.BuiltinPayloadGet(rt.Ctx, "id = ?", req.ID)
ginx.Dangerous(err)
if bp == nil {
ginx.NewRender(c, http.StatusNotFound).Message("No such builtin payload")
return
}
if req.Type == "alert" {
alertRule := models.AlertRule{}
if err := json.Unmarshal([]byte(req.Content), &alertRule); err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
req.Name = alertRule.Name
req.Tags = alertRule.AppendTags
} else if req.Type == "dashboard" {
dashboard := Board{}
if err := json.Unmarshal([]byte(req.Content), &dashboard); err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
req.Name = dashboard.Name
req.Tags = dashboard.Tags
}
username := Username(c)
req.UpdatedBy = username
ginx.NewRender(c).Message(bp.Update(rt.Ctx, req))
}
func (rt *Router) builtinPayloadsDel(c *gin.Context) {
var req idsForm
ginx.BindJSON(c, &req)
req.Verify()
ginx.NewRender(c).Message(models.BuiltinPayloadDels(rt.Ctx, req.Ids))
}

View File

@@ -92,7 +92,7 @@ func (rt *Router) loginPost(c *gin.Context) {
}
func (rt *Router) logoutPost(c *gin.Context) {
logger.Infof("username:%s login from:%s", c.GetString("username"), c.ClientIP())
logger.Infof("username:%s logout from:%s", c.GetString("username"), c.ClientIP())
metadata, err := rt.extractTokenMetadata(c.Request)
if err != nil {
ginx.NewRender(c, http.StatusBadRequest).Message("failed to parse jwt token")

View File

@@ -33,6 +33,11 @@ func (rt *Router) alertMuteGetsByGids(c *gin.Context) {
var err error
gids, err = models.MyBusiGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if len(gids) == 0 {
ginx.Bomb(http.StatusForbidden, "forbidden")
return
}
}
}

View File

@@ -143,6 +143,8 @@ func (rt *Router) user() gin.HandlerFunc {
c.Set("user", user)
c.Set("isadmin", user.IsAdmin())
// Update user.LastActiveTime
rt.UserCache.SetLastActiveTime(user.Id, time.Now().Unix())
c.Next()
}
}

View File

@@ -32,6 +32,11 @@ func (rt *Router) recordingRuleGetsByGids(c *gin.Context) {
var err error
gids, err = models.MyBusiGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if len(gids) == 0 {
ginx.Bomb(http.StatusForbidden, "forbidden")
return
}
}
}

View File

@@ -153,173 +153,242 @@ func (rt *Router) targetGetTags(c *gin.Context) {
}
type targetTagsForm struct {
Idents []string `json:"idents" binding:"required"`
Tags []string `json:"tags" binding:"required"`
Idents []string `json:"idents" binding:"required_without=HostIps"`
HostIps []string `json:"host_ips" binding:"required_without=Idents"`
Tags []string `json:"tags" binding:"required"`
}
func (rt *Router) targetBindTagsByFE(c *gin.Context) {
var f targetTagsForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
rt.checkTargetPerm(c, f.Idents)
ginx.NewRender(c).Message(rt.targetBindTags(f))
ginx.NewRender(c).Data(rt.targetBindTags(f, failedResults))
}
func (rt *Router) targetBindTagsByService(c *gin.Context) {
var f targetTagsForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
ginx.NewRender(c).Message(rt.targetBindTags(f))
ginx.NewRender(c).Data(rt.targetBindTags(f, failedResults))
}
func (rt *Router) targetBindTags(f targetTagsForm) error {
for i := 0; i < len(f.Tags); i++ {
arr := strings.Split(f.Tags[i], "=")
func (rt *Router) targetBindTags(f targetTagsForm, failedIdents map[string]string) (map[string]string, error) {
// 1. Check tags
if err := rt.validateTags(f.Tags); err != nil {
return nil, err
}
// 2. Acquire targets by idents
targets, err := models.TargetsGetByIdents(rt.Ctx, f.Idents)
if err != nil {
return nil, err
}
// 3. Add tags to targets
for _, target := range targets {
if err = rt.addTagsToTarget(target, f.Tags); err != nil {
failedIdents[target.Ident] = err.Error()
}
}
return failedIdents, nil
}
func (rt *Router) validateTags(tags []string) error {
for _, tag := range tags {
arr := strings.Split(tag, "=")
if len(arr) != 2 {
return fmt.Errorf("invalid tag(%s)", f.Tags[i])
return fmt.Errorf("invalid tag format: %s (expected format: key=value)", tag)
}
if strings.TrimSpace(arr[0]) == "" || strings.TrimSpace(arr[1]) == "" {
return fmt.Errorf("invalid tag(%s)", f.Tags[i])
key, value := strings.TrimSpace(arr[0]), strings.TrimSpace(arr[1])
if key == "" {
return fmt.Errorf("invalid tag: key is empty in tag %s", tag)
}
if value == "" {
return fmt.Errorf("invalid tag: value is empty in tag %s", tag)
}
if strings.IndexByte(arr[0], '.') != -1 {
return fmt.Errorf("invalid tagkey(%s): cannot contains . ", arr[0])
if strings.Contains(key, ".") {
return fmt.Errorf("invalid tag key: %s (key cannot contain '.')", key)
}
if strings.IndexByte(arr[0], '-') != -1 {
return fmt.Errorf("invalid tagkey(%s): cannot contains -", arr[0])
if strings.Contains(key, "-") {
return fmt.Errorf("invalid tag key: %s (key cannot contain '-')", key)
}
if !model.LabelNameRE.MatchString(arr[0]) {
return fmt.Errorf("invalid tagkey(%s)", arr[0])
if !model.LabelNameRE.MatchString(key) {
return fmt.Errorf("invalid tag key: %s "+
"(key must start with a letter or underscore, followed by letters, digits, or underscores)", key)
}
}
for i := 0; i < len(f.Idents); i++ {
target, err := models.TargetGetByIdent(rt.Ctx, f.Idents[i])
if err != nil {
return err
}
if target == nil {
continue
}
// 不能有同key的标签否则附到时序数据上会产生覆盖让人困惑
for j := 0; j < len(f.Tags); j++ {
tagkey := strings.Split(f.Tags[j], "=")[0]
tagkeyPrefix := tagkey + "="
if strings.HasPrefix(target.Tags, tagkeyPrefix) {
return fmt.Errorf("duplicate tagkey(%s)", tagkey)
}
}
err = target.AddTags(rt.Ctx, f.Tags)
if err != nil {
return err
}
}
return nil
}
func (rt *Router) addTagsToTarget(target *models.Target, tags []string) error {
for _, tag := range tags {
tagKey := strings.Split(tag, "=")[0]
if strings.Contains(target.Tags, tagKey+"=") {
return fmt.Errorf("duplicate tagkey(%s)", tagKey)
}
}
return target.AddTags(rt.Ctx, tags)
}
func (rt *Router) targetUnbindTagsByFE(c *gin.Context) {
var f targetTagsForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
rt.checkTargetPerm(c, f.Idents)
ginx.NewRender(c).Message(rt.targetUnbindTags(f))
ginx.NewRender(c).Data(rt.targetUnbindTags(f, failedResults))
}
func (rt *Router) targetUnbindTagsByService(c *gin.Context) {
var f targetTagsForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
ginx.NewRender(c).Message(rt.targetUnbindTags(f))
ginx.NewRender(c).Data(rt.targetUnbindTags(f, failedResults))
}
func (rt *Router) targetUnbindTags(f targetTagsForm) error {
for i := 0; i < len(f.Idents); i++ {
target, err := models.TargetGetByIdent(rt.Ctx, f.Idents[i])
if err != nil {
return err
}
if target == nil {
continue
}
func (rt *Router) targetUnbindTags(f targetTagsForm, failedIdents map[string]string) (map[string]string, error) {
// 1. Acquire targets by idents
targets, err := models.TargetsGetByIdents(rt.Ctx, f.Idents)
if err != nil {
return nil, err
}
// 2. Remove tags from targets
for _, target := range targets {
err = target.DelTags(rt.Ctx, f.Tags)
if err != nil {
return err
failedIdents[target.Ident] = err.Error()
continue
}
}
return nil
return failedIdents, nil
}
type targetNoteForm struct {
Idents []string `json:"idents" binding:"required"`
Note string `json:"note"`
Idents []string `json:"idents" binding:"required_without=HostIps"`
HostIps []string `json:"host_ips" binding:"required_without=Idents"`
Note string `json:"note"`
}
func (rt *Router) targetUpdateNote(c *gin.Context) {
var f targetNoteForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
rt.checkTargetPerm(c, f.Idents)
ginx.NewRender(c).Message(models.TargetUpdateNote(rt.Ctx, f.Idents, f.Note))
ginx.NewRender(c).Data(failedResults, models.TargetUpdateNote(rt.Ctx, f.Idents, f.Note))
}
func (rt *Router) targetUpdateNoteByService(c *gin.Context) {
var f targetNoteForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
ginx.NewRender(c).Message(models.TargetUpdateNote(rt.Ctx, f.Idents, f.Note))
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
ginx.NewRender(c).Data(failedResults, models.TargetUpdateNote(rt.Ctx, f.Idents, f.Note))
}
type targetBgidForm struct {
Idents []string `json:"idents" binding:"required"`
Bgid int64 `json:"bgid"`
Idents []string `json:"idents" binding:"required_without=HostIps"`
HostIps []string `json:"host_ips" binding:"required_without=Idents"`
Bgid int64 `json:"bgid"`
}
func (rt *Router) targetUpdateBgid(c *gin.Context) {
var f targetBgidForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
user := c.MustGet("user").(*models.User)
if user.IsAdmin() {
ginx.NewRender(c).Message(models.TargetUpdateBgid(rt.Ctx, f.Idents, f.Bgid, false))
ginx.NewRender(c).Data(failedResults, models.TargetUpdateBgid(rt.Ctx, f.Idents, f.Bgid, false))
return
}
@@ -361,24 +430,69 @@ func (rt *Router) targetUpdateBgid(c *gin.Context) {
ginx.Bomb(http.StatusBadRequest, "invalid bgid")
}
ginx.NewRender(c).Message(models.TargetUpdateBgid(rt.Ctx, f.Idents, f.Bgid, false))
ginx.NewRender(c).Data(failedResults, models.TargetUpdateBgid(rt.Ctx, f.Idents, f.Bgid, false))
}
func (rt *Router) targetUpdateBgidByService(c *gin.Context) {
var f targetBgidForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
ginx.NewRender(c).Data(failedResults, models.TargetUpdateBgid(rt.Ctx, f.Idents, f.Bgid, false))
}
type identsForm struct {
Idents []string `json:"idents" binding:"required"`
Idents []string `json:"idents" binding:"required_without=HostIps"`
HostIps []string `json:"host_ips" binding:"required_without=Idents"`
}
func (rt *Router) targetDel(c *gin.Context) {
var f identsForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents empty")
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
rt.checkTargetPerm(c, f.Idents)
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
ginx.NewRender(c).Message(models.TargetDel(rt.Ctx, f.Idents))
ginx.NewRender(c).Data(failedResults, models.TargetDel(rt.Ctx, f.Idents))
}
func (rt *Router) targetDelByService(c *gin.Context) {
var f identsForm
var err error
var failedResults = make(map[string]string)
ginx.BindJSON(c, &f)
if len(f.Idents) == 0 && len(f.HostIps) == 0 {
ginx.Bomb(http.StatusBadRequest, "idents or host_ips must be provided")
}
// Acquire idents by idents and hostIps
failedResults, f.Idents, err = models.TargetsGetIdentsByIdentsAndHostIps(rt.Ctx, f.Idents, f.HostIps)
if err != nil {
ginx.Bomb(http.StatusBadRequest, err.Error())
}
ginx.NewRender(c).Data(failedResults, models.TargetDel(rt.Ctx, f.Idents))
}
func (rt *Router) checkTargetPerm(c *gin.Context, idents []string) {

View File

@@ -1,6 +1,7 @@
package router
import (
"net/http"
"time"
"github.com/ccfos/nightingale/v6/alert/sender"
@@ -50,6 +51,11 @@ func (rt *Router) taskGetsByGids(c *gin.Context) {
var err error
gids, err = models.MyBusiGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if len(gids) == 0 {
ginx.Bomb(http.StatusForbidden, "forbidden")
return
}
}
}

View File

@@ -45,6 +45,11 @@ func (rt *Router) taskTplGetsByGids(c *gin.Context) {
var err error
gids, err = models.MyBusiGroupIds(rt.Ctx, me.Id)
ginx.Dangerous(err)
if len(gids) == 0 {
ginx.Bomb(http.StatusForbidden, "forbidden")
return
}
}
}

View File

@@ -40,13 +40,16 @@ func (rt *Router) userFindAll(c *gin.Context) {
}
func (rt *Router) userGets(c *gin.Context) {
stime, etime := getTimeRange(c)
limit := ginx.QueryInt(c, "limit", 20)
query := ginx.QueryStr(c, "query", "")
order := ginx.QueryStr(c, "order", "username")
desc := ginx.QueryBool(c, "desc", false)
total, err := models.UserTotal(rt.Ctx, query)
total, err := models.UserTotal(rt.Ctx, query, stime, etime)
ginx.Dangerous(err)
list, err := models.UserGets(rt.Ctx, query, limit, ginx.Offset(c, limit))
list, err := models.UserGets(rt.Ctx, query, limit, ginx.Offset(c, limit), stime, etime, order, desc)
ginx.Dangerous(err)
user := c.MustGet("user").(*models.User)
@@ -95,6 +98,7 @@ func (rt *Router) userAddPost(c *gin.Context) {
UpdateBy: username,
}
ginx.Dangerous(u.Verify())
ginx.NewRender(c).Message(u.Add(rt.Ctx))
}

View File

@@ -5,23 +5,27 @@ import (
"time"
"github.com/ccfos/nightingale/v6/center/cconf"
"github.com/ccfos/nightingale/v6/memsto"
"github.com/ccfos/nightingale/v6/models"
"github.com/ccfos/nightingale/v6/pkg/cas"
"github.com/ccfos/nightingale/v6/pkg/ctx"
"github.com/ccfos/nightingale/v6/pkg/ldapx"
"github.com/ccfos/nightingale/v6/pkg/oauth2x"
"github.com/ccfos/nightingale/v6/pkg/oidcx"
"github.com/ccfos/nightingale/v6/pkg/tplx"
"github.com/BurntSushi/toml"
"github.com/toolkits/pkg/logger"
)
type SsoClient struct {
OIDC *oidcx.SsoClient
LDAP *ldapx.SsoClient
CAS *cas.SsoClient
OAuth2 *oauth2x.SsoClient
LastUpdateTime int64
OIDC *oidcx.SsoClient
LDAP *ldapx.SsoClient
CAS *cas.SsoClient
OAuth2 *oauth2x.SsoClient
LastUpdateTime int64
configCache *memsto.ConfigCache
configLastUpdateTime int64
}
const LDAP = `
@@ -111,7 +115,7 @@ Phone = 'phone_number'
Email = 'email'
`
func Init(center cconf.Center, ctx *ctx.Context) *SsoClient {
func Init(center cconf.Center, ctx *ctx.Context, configCache *memsto.ConfigCache) *SsoClient {
ssoClient := new(SsoClient)
m := make(map[string]string)
m["LDAP"] = LDAP
@@ -140,6 +144,11 @@ func Init(center cconf.Center, ctx *ctx.Context) *SsoClient {
log.Fatalln(err)
}
}
if configCache == nil {
logger.Error("configCache is nil, sso initialization failed")
}
ssoClient.configCache = configCache
userVariableMap := configCache.Get()
configs, err := models.SsoConfigGets(ctx)
if err != nil {
@@ -147,6 +156,7 @@ func Init(center cconf.Center, ctx *ctx.Context) *SsoClient {
}
for _, cfg := range configs {
cfg.Content = tplx.ReplaceTemplateUseText(cfg.Name, cfg.Content, userVariableMap)
switch cfg.Name {
case "LDAP":
var config ldapx.Config
@@ -185,7 +195,7 @@ func Init(center cconf.Center, ctx *ctx.Context) *SsoClient {
}
}
ssoClient.SyncSsoUsers(ctx)
go ssoClient.SyncSsoUsers(ctx)
go ssoClient.Reload(ctx)
return ssoClient
}
@@ -197,7 +207,8 @@ func (s *SsoClient) reload(ctx *ctx.Context) error {
return err
}
if lastUpdateTime == s.LastUpdateTime {
lastCacheUpdateTime := s.configCache.GetLastUpdateTime()
if lastUpdateTime == s.LastUpdateTime && lastCacheUpdateTime == s.configLastUpdateTime {
return nil
}
@@ -205,8 +216,9 @@ func (s *SsoClient) reload(ctx *ctx.Context) error {
if err != nil {
return err
}
userVariableMap := s.configCache.Get()
for _, cfg := range configs {
cfg.Content = tplx.ReplaceTemplateUseText(cfg.Name, cfg.Content, userVariableMap)
switch cfg.Name {
case "LDAP":
var config ldapx.Config
@@ -250,6 +262,7 @@ func (s *SsoClient) reload(ctx *ctx.Context) error {
}
s.LastUpdateTime = lastUpdateTime
s.configLastUpdateTime = lastCacheUpdateTime
return nil
}

View File

@@ -43,16 +43,14 @@ func Initialize(configDir string, cryptoKey string) (func(), error) {
ctx := ctx.NewContext(context.Background(), nil, false, config.CenterApi)
var redis storage.Redis
if config.Redis.Address != "" {
redis, err = storage.NewRedis(config.Redis)
if err != nil {
return nil, err
}
redis, err = storage.NewRedis(config.Redis)
if err != nil {
return nil, err
}
syncStats := memsto.NewSyncStats()
targetCache := memsto.NewTargetCache(ctx, syncStats, nil)
targetCache := memsto.NewTargetCache(ctx, syncStats, redis)
busiGroupCache := memsto.NewBusiGroupCache(ctx, syncStats)
idents := idents.New(ctx, redis)
metas := metas.New(redis)

View File

@@ -55,8 +55,6 @@ Enable = true
user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
[HTTP.JWTAuth]
# signing key
SigningKey = "5b94a0fd640fe2765af826acfe42d151"
# unit: min
AccessExpired = 1500
# unit: min
@@ -96,8 +94,6 @@ MaxLifetime = 7200
MaxOpenConns = 150
# max idle connections
MaxIdleConns = 50
# table prefix
TablePrefix = ""
# enable auto migrate or not
# EnableAutoMigrate = false

View File

@@ -55,8 +55,6 @@ Enable = true
user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
[HTTP.JWTAuth]
# signing key
SigningKey = "5b94a0fd640fe2765af826acfe42d151"
# unit: min
AccessExpired = 1500
# unit: min
@@ -97,8 +95,6 @@ MaxLifetime = 7200
MaxOpenConns = 150
# max idle connections
MaxIdleConns = 50
# table prefix
TablePrefix = ""
# enable auto migrate or not
# EnableAutoMigrate = false

View File

@@ -55,8 +55,6 @@ Enable = true
user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
[HTTP.JWTAuth]
# signing key
SigningKey = "5b94a0fd640fe2765af826acfe42d151"
# unit: min
AccessExpired = 1500
# unit: min
@@ -97,8 +95,6 @@ MaxLifetime = 7200
MaxOpenConns = 150
# max idle connections
MaxIdleConns = 50
# table prefix
TablePrefix = ""
# enable auto migrate or not
# EnableAutoMigrate = false

View File

@@ -10,6 +10,7 @@ CREATE TABLE users (
contacts varchar(1024),
maintainer boolean not null default false,
belong varchar(16) not null default '',
last_active_time bigint not null default 0,
create_at bigint not null default 0,
create_by varchar(64) not null default '',
update_at bigint not null default 0,
@@ -831,4 +832,56 @@ COMMENT ON COLUMN builtin_metrics.expression IS 'expression of metric';
COMMENT ON COLUMN builtin_metrics.created_at IS 'create time';
COMMENT ON COLUMN builtin_metrics.created_by IS 'creator';
COMMENT ON COLUMN builtin_metrics.updated_at IS 'update time';
COMMENT ON COLUMN builtin_metrics.updated_by IS 'updater';
COMMENT ON COLUMN builtin_metrics.updated_by IS 'updater';
CREATE TABLE metric_filter (
id BIGSERIAL PRIMARY KEY,
name VARCHAR(191) NOT NULL,
configs VARCHAR(4096) NOT NULL,
groups_perm TEXT,
create_at BIGINT NOT NULL DEFAULT 0,
create_by VARCHAR(191) NOT NULL DEFAULT '',
update_at BIGINT NOT NULL DEFAULT 0,
update_by VARCHAR(191) NOT NULL DEFAULT ''
);
CREATE INDEX idx_name ON metric_filter (name);
CREATE TABLE board_busigroup (
busi_group_id BIGINT NOT NULL DEFAULT 0,
board_id BIGINT NOT NULL DEFAULT 0,
PRIMARY KEY (busi_group_id, board_id)
);
CREATE TABLE builtin_components (
id BIGSERIAL PRIMARY KEY,
ident VARCHAR(191) NOT NULL,
logo VARCHAR(191) NOT NULL,
readme TEXT NOT NULL,
created_at BIGINT NOT NULL DEFAULT 0,
created_by VARCHAR(191) NOT NULL DEFAULT '',
updated_at BIGINT NOT NULL DEFAULT 0,
updated_by VARCHAR(191) NOT NULL DEFAULT ''
);
CREATE INDEX idx_ident ON builtin_components (ident);
CREATE TABLE builtin_payloads (
id BIGSERIAL PRIMARY KEY,
type VARCHAR(191) NOT NULL,
component VARCHAR(191) NOT NULL,
cate VARCHAR(191) NOT NULL,
name VARCHAR(191) NOT NULL,
tags VARCHAR(191) NOT NULL DEFAULT '',
content TEXT NOT NULL,
created_at BIGINT NOT NULL DEFAULT 0,
created_by VARCHAR(191) NOT NULL DEFAULT '',
updated_at BIGINT NOT NULL DEFAULT 0,
updated_by VARCHAR(191) NOT NULL DEFAULT ''
);
CREATE INDEX idx_component ON builtin_payloads (component);
CREATE INDEX idx_name ON builtin_payloads (name);
CREATE INDEX idx_cate ON builtin_payloads (cate);
CREATE INDEX idx_type ON builtin_payloads (type);

View File

@@ -55,8 +55,6 @@ Enable = true
user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
[HTTP.JWTAuth]
# signing key
SigningKey = "5b94a0fd640fe2765af826acfe42d151"
# unit: min
AccessExpired = 1500
# unit: min
@@ -92,8 +90,6 @@ MaxLifetime = 7200
MaxOpenConns = 150
# max idle connections
MaxIdleConns = 50
# table prefix
TablePrefix = ""
# enable auto migrate or not
# EnableAutoMigrate = false

View File

@@ -16,6 +16,7 @@ CREATE TABLE `users` (
`contacts` varchar(1024) comment 'json e.g. {wecom:xx, dingtalk_robot_token:yy}',
`maintainer` tinyint(1) not null default 0,
`belong` varchar(16) not null default '' comment 'belong',
`last_active_time` bigint not null default 0,
`create_at` bigint not null default 0,
`create_by` varchar(64) not null default '',
`update_at` bigint not null default 0,
@@ -284,8 +285,8 @@ CREATE TABLE `alert_rule` (
`notify_repeat_step` int not null default 0 comment 'unit: min',
`notify_max_number` int not null default 0 comment '',
`recover_duration` int not null default 0 comment 'unit: s',
`callbacks` varchar(1024) not null default '' comment 'split by space: http://a.com/api/x http://a.com/api/y',
`runbook_url` varchar(255),
`callbacks` varchar(4096) not null default '' comment 'split by space: http://a.com/api/x http://a.com/api/y',
`runbook_url` varchar(4096),
`append_tags` varchar(255) not null default '' comment 'split by space: service=n9e mod=api',
`annotations` text not null comment 'annotations',
`extra_config` text not null comment 'extra_config',
@@ -502,6 +503,44 @@ CREATE TABLE `alert_his_event` (
KEY (`trigger_time`, `group_id`)
) ENGINE=InnoDB DEFAULT CHARSET = utf8mb4;
CREATE TABLE `board_busigroup` (
`busi_group_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'busi group id',
`board_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'board id',
PRIMARY KEY (`busi_group_id`, `board_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `builtin_components` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '''unique identifier''',
`ident` varchar(191) NOT NULL COMMENT '''identifier of component''',
`logo` varchar(191) NOT NULL COMMENT '''logo of component''',
`readme` text NOT NULL COMMENT '''readme of component''',
`created_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''create time''',
`created_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''creator''',
`updated_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''update time''',
`updated_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''updater''',
PRIMARY KEY (`id`),
KEY `idx_ident` (`ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `builtin_payloads` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '''unique identifier''',
`type` varchar(191) NOT NULL COMMENT '''type of payload''',
`component` varchar(191) NOT NULL COMMENT '''component of payload''',
`cate` varchar(191) NOT NULL COMMENT '''category of payload''',
`name` varchar(191) NOT NULL COMMENT '''name of payload''',
`tags` varchar(191) NOT NULL DEFAULT '' COMMENT '''tags of payload''',
`content` longtext NOT NULL COMMENT '''content of payload''',
`created_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''create time''',
`created_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''creator''',
`updated_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''update time''',
`updated_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''updater''',
PRIMARY KEY (`id`),
KEY `idx_component` (`component`),
KEY `idx_name` (`name`),
KEY `idx_cate` (`cate`),
KEY `idx_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `task_tpl`
(
`id` int unsigned NOT NULL AUTO_INCREMENT,
@@ -654,6 +693,18 @@ CREATE TABLE `builtin_metrics` (
INDEX `idx_lang` (`lang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `metric_filter` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'unique identifier',
`name` varchar(191) NOT NULL COMMENT 'name of metric filter',
`configs` varchar(4096) NOT NULL COMMENT 'configuration of metric filter',
`groups_perm` text,
`create_at` bigint NOT NULL DEFAULT '0' COMMENT 'create time',
`create_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'creator',
`update_at` bigint NOT NULL DEFAULT '0' COMMENT 'update time',
`update_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'updater',
PRIMARY KEY (`id`),
KEY `idx_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `task_meta`
(
@@ -2011,4 +2062,4 @@ CREATE TABLE task_host_99
UNIQUE KEY (`id`, `host`),
PRIMARY KEY (`ii`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
DEFAULT CHARSET = utf8mb4;

View File

@@ -0,0 +1,77 @@
/* v7.0.0-beta.3 */
CREATE TABLE `builtin_metrics` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'unique identifier',
`collector` varchar(191) NOT NULL COMMENT 'type of collector',
`typ` varchar(191) NOT NULL COMMENT 'type of metric',
`name` varchar(191) NOT NULL COMMENT 'name of metric',
`unit` varchar(191) NOT NULL COMMENT 'unit of metric',
`lang` varchar(191) NOT NULL DEFAULT '' COMMENT 'language of metric',
`note` varchar(4096) NOT NULL COMMENT 'description of metric in Chinese',
`expression` varchar(4096) NOT NULL COMMENT 'expression of metric',
`created_at` bigint NOT NULL DEFAULT 0 COMMENT 'create time',
`created_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'creator',
`updated_at` bigint NOT NULL DEFAULT 0 COMMENT 'update time',
`updated_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'updater',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_collector_typ_name` (`lang`,`collector`, `typ`, `name`),
INDEX `idx_collector` (`collector`),
INDEX `idx_typ` (`typ`),
INDEX `idx_name` (`name`),
INDEX `idx_lang` (`lang`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `metric_filter` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'unique identifier',
`name` varchar(191) NOT NULL COMMENT 'name of metric filter',
`configs` varchar(4096) NOT NULL COMMENT 'configuration of metric filter',
`groups_perm` text,
`create_at` bigint NOT NULL DEFAULT '0' COMMENT 'create time',
`create_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'creator',
`update_at` bigint NOT NULL DEFAULT '0' COMMENT 'update time',
`update_by` varchar(191) NOT NULL DEFAULT '' COMMENT 'updater',
PRIMARY KEY (`id`),
KEY `idx_name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `board_busigroup` (
`busi_group_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'busi group id',
`board_id` bigint(20) NOT NULL DEFAULT '0' COMMENT 'board id',
PRIMARY KEY (`busi_group_id`, `board_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/* v7.0.0-beta.6 */
CREATE TABLE `builtin_components` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '''unique identifier''',
`ident` varchar(191) NOT NULL COMMENT '''identifier of component''',
`logo` varchar(191) NOT NULL COMMENT '''logo of component''',
`readme` text NOT NULL COMMENT '''readme of component''',
`created_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''create time''',
`created_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''creator''',
`updated_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''update time''',
`updated_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''updater''',
PRIMARY KEY (`id`),
KEY `idx_ident` (`ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `builtin_payloads` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '''unique identifier''',
`type` varchar(191) NOT NULL COMMENT '''type of payload''',
`component` varchar(191) NOT NULL COMMENT '''component of payload''',
`cate` varchar(191) NOT NULL COMMENT '''category of payload''',
`name` varchar(191) NOT NULL COMMENT '''name of payload''',
`tags` varchar(191) NOT NULL DEFAULT '' COMMENT '''tags of payload''',
`content` longtext NOT NULL COMMENT '''content of payload''',
`created_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''create time''',
`created_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''creator''',
`updated_at` bigint(20) NOT NULL DEFAULT 0 COMMENT '''update time''',
`updated_by` varchar(191) NOT NULL DEFAULT '' COMMENT '''updater''',
PRIMARY KEY (`id`),
KEY `idx_component` (`component`),
KEY `idx_name` (`name`),
KEY `idx_cate` (`cate`),
KEY `idx_type` (`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/* v7.0.0-beta.7 */
ALTER TABLE users ADD COLUMN last_active_time BIGINT NOT NULL DEFAULT 0;

View File

@@ -27,7 +27,7 @@ KeyFile = ""
# whether print access log
PrintAccessLog = false
# whether enable pprof
PProf = false
PProf = true
# expose prometheus /metrics?
ExposeMetrics = true
# http graceful shutdown timeout, unit: s
@@ -55,8 +55,6 @@ Enable = true
user001 = "ccc26da7b9aba533cbb263a36c07dcc5"
[HTTP.JWTAuth]
# signing key
SigningKey = "5b94a0fd640fe2765af826acfe42d151"
# unit: min
AccessExpired = 1500
# unit: min
@@ -88,8 +86,6 @@ MaxLifetime = 7200
MaxOpenConns = 150
# max idle connections
MaxIdleConns = 50
# table prefix
TablePrefix = ""
# enable auto migrate or not
# EnableAutoMigrate = false
@@ -167,7 +163,7 @@ MaxIdleConnsPerHost = 100
# TLSCert = "/etc/n9e/cert.pem"
# TLSKey = "/etc/n9e/key.pem"
# InsecureSkipVerify = false
# [[Writers.WriteRelabels]]
# [[Pushgw.Writers.WriteRelabels]]
# Action = "replace"
# SourceLabels = ["__address__"]
# Regex = "([^:]+)(?::\\d+)?"

View File

@@ -120,6 +120,8 @@ MaxIdleConnsPerHost = 100
Enable = false
RPCListen = "0.0.0.0:20090"
# n9e-edge cannot directly reuse the redis that n9e relies on at the center.
# It needs to deploy a separate redis in the edge region for n9e-edge to use.
[Redis]
# address, ip:port or ip1:port,ip2:port for cluster and sentinel(SentinelAddrs)
Address = "127.0.0.1:6379"

13
go.mod
View File

@@ -8,7 +8,7 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/expr-lang/expr v1.16.1
github.com/flashcatcloud/ibex v1.3.2
github.com/flashcatcloud/ibex v1.3.3
github.com/gin-contrib/pprof v1.4.0
github.com/gin-gonic/gin v1.9.1
github.com/go-ldap/ldap/v3 v3.4.4
@@ -33,6 +33,7 @@ require (
github.com/spaolacci/murmur3 v1.1.0
github.com/tidwall/gjson v1.14.0
github.com/toolkits/pkg v1.3.6
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1
golang.org/x/oauth2 v0.10.0
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
gopkg.in/yaml.v2 v2.4.0
@@ -47,12 +48,15 @@ require (
github.com/bytedance/sonic v1.9.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/fatih/camelcase v1.0.0 // indirect
github.com/fatih/structs v1.1.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-asn1-ber/asn1-ber v1.5.4 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
@@ -83,12 +87,13 @@ require (
github.com/tidwall/pretty v1.2.0 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/automaxprocs v1.5.2 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/crypto v0.17.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/image v0.13.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.33.0 // indirect

44
go.sum
View File

@@ -1,9 +1,16 @@
github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw=
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 h1:8q4SaHjFsClSvuVne0ID/5Ka8u3fcIHyqkLjcFpNRHQ=
github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg=
github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY=
github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e h1:NeAW1fUYUEWhft7pkxDf6WoUvEZJ/uOKsvtpjLnn8MU=
github.com/Azure/go-ntlmssp v0.0.0-20220621081337-cb9428e4ac1e/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
github.com/AzureAD/microsoft-authentication-library-for-go v1.0.0 h1:OBhqkivkhkMqLPymWEppkm7vgPQY2XsHoEkaMQ0AdZY=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
github.com/aws/aws-sdk-go v1.44.302 h1:ST3ko6GrJKn3Xi+nAvxjG3uk/V1pW8KC52WLeIxqqNk=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bsm/ginkgo/v2 v2.5.0 h1:aOAnND1T40wEdAtkGSkvSICWeQ8L3UASX7YVCqQx+eQ=
@@ -28,6 +35,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE=
github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA=
github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
@@ -38,8 +47,8 @@ github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8
github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc=
github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo=
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
github.com/flashcatcloud/ibex v1.3.2 h1:50UzXHFqyw/jahDFoCb8vsEHy+vGiyScy7dWn6BpjTY=
github.com/flashcatcloud/ibex v1.3.2/go.mod h1:T8hbMUySK2q6cXUaYp0AUVeKkU9Od2LjzwmB5lmTRBM=
github.com/flashcatcloud/ibex v1.3.3 h1:1Bxk5sgpsq4+e9bMchucGttg8Sw4KEpZy9tctFfj/cE=
github.com/flashcatcloud/ibex v1.3.3/go.mod h1:T8hbMUySK2q6cXUaYp0AUVeKkU9Od2LjzwmB5lmTRBM=
github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
github.com/garyburd/redigo v1.6.2/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY=
@@ -53,9 +62,13 @@ github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SU
github.com/go-asn1-ber/asn1-ber v1.5.4 h1:vXT6d/FNDiELJnLb6hGNa309LMsrCoYFvpwHDF0+Y1A=
github.com/go-asn1-ber/asn1-ber v1.5.4/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-ldap/ldap/v3 v3.4.4 h1:qPjipEpt+qDa6SI/h1fzuGWoRUY+qqQ9sOZq67/PYUs=
github.com/go-ldap/ldap/v3 v3.4.4/go.mod h1:fe1MsuN5eJJ1FeLT/LEBVdWfNWKh459R7aXgXtJC+aI=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
@@ -80,6 +93,7 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -151,12 +165,15 @@ github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkr
github.com/jinzhu/now v1.1.4/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ=
github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk=
github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
@@ -173,6 +190,7 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
@@ -200,9 +218,12 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mojocn/base64Captcha v1.3.6 h1:gZEKu1nsKpttuIAQgWHO+4Mhhls8cAKyiV2Ew03H+Tw=
github.com/mojocn/base64Captcha v1.3.6/go.mod h1:i5CtHvm+oMbj1UzEPXaA8IH/xHFZ3DGY3Wh3dBpZ28E=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -218,6 +239,7 @@ github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUo
github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU=
github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4=
github.com/prometheus/procfs v0.11.0 h1:5EAgkfkMl659uZPbe9AS2N68a7Cc1TJbPEuGzFuRbyk=
github.com/prometheus/procfs v0.11.0/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
github.com/prometheus/prometheus v0.47.1 h1:bd2LiZyxzHn9Oo2Ei4eK2D86vz/L/OiqR1qYo0XmMBo=
@@ -282,9 +304,12 @@ go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/automaxprocs v1.4.0/go.mod h1:/mTEdr7LvHhs0v7mjdxDreTz1OG5zdZGqgOnhWiR/+Q=
go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME=
go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
@@ -309,8 +334,10 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1 h1:MGwJjxBy0HJshjDNfLsYO8xppfqWlA5ZT9OhtUUhTNw=
golang.org/x/exp v0.0.0-20230713183714-613f0c0eb8a1/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/image v0.13.0 h1:3cge/F/QTkNLauhf2QoE9zp+7sr+ZcL4HnoZmdwg9sg=
golang.org/x/image v0.13.0/go.mod h1:6mmbMOeV28HuMTgA6OSRkdXKYw/t5W9Uwn2Yv1r3Yxk=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
@@ -333,8 +360,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8=
golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -343,6 +370,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -365,8 +393,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,95 +1,106 @@
{
"id": 0,
"group_id": 0,
"name": "ARMS-DB",
"tags": "ARMS",
"ident": "",
"tags": "ARMS",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"version": "3.0.0",
"links": [],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"type": "query",
"name": "service",
"definition": "label_values(arms_system_cpu_idle,service)",
"allOption": false,
"multi": false,
"reg": "",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
},
{
"type": "query",
"name": "instance",
"definition": "label_values(arms_db_requests_count{service=\"$service\"},endpoint)",
"allOption": false,
"multi": false,
"reg": "",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
},
{
"type": "query",
"name": "db",
"definition": "label_values(arms_db_requests_count{endpoint=\"${instance}\"},destId)",
"allValue": ".*",
"allOption": true,
"multi": false,
"reg": "",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
}
],
"panels": [
{
"version": "3.0.0",
"id": "bd8c0aac-06df-4b2d-9456-cad8e7389499",
"type": "row",
"name": "概览(DB级别)",
"collapsed": true,
"id": "bd8c0aac-06df-4b2d-9456-cad8e7389499",
"layout": {
"h": 1,
"i": "bd8c0aac-06df-4b2d-9456-cad8e7389499",
"w": 24,
"x": 0,
"y": 0,
"i": "bd8c0aac-06df-4b2d-9456-cad8e7389499"
"y": 0
},
"panels": []
"name": "概览(DB级别)",
"panels": [],
"type": "row",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "8d2da301-e5e8-4b2f-9b31-59aa0835c312",
"type": "timeseries",
"layout": {
"h": 8,
"i": "8d2da301-e5e8-4b2f-9b31-59aa0835c312",
"w": 12,
"x": 0,
"y": 1
},
"links": [],
"maxPerRow": 4,
"name": "请求数/每分钟",
"links": [],
"layout": {
"h": 8,
"w": 12,
"x": 0,
"y": 1,
"i": "8d2da301-e5e8-4b2f-9b31-59aa0835c312"
"options": {
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"refId": "B",
"expr": "sum by (callType) (sum_over_time(arms_db_requests_count{endpoint=\"${instance}\",destId=~\"${db}\"}[1m]))",
"legend": "{{callType}}入口"
"legend": "{{callType}}入口",
"refId": "B"
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ab2b0969-50e7-4e4b-962a-58be133e6aef",
"layout": {
"h": 8,
"i": "ab2b0969-50e7-4e4b-962a-58be133e6aef",
"w": 12,
"x": 12,
"y": 1
},
"links": [],
"maxPerRow": 4,
"name": "响应时间/每分钟",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
@@ -97,101 +108,50 @@
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
},
{
"version": "3.0.0",
"id": "ab2b0969-50e7-4e4b-962a-58be133e6aef",
"type": "timeseries",
"name": "响应时间/每分钟",
"links": [],
"layout": {
"h": 8,
"w": 12,
"x": 12,
"y": 1,
"i": "ab2b0969-50e7-4e4b-962a-58be133e6aef"
},
"targets": [
{
"refId": "A",
"expr": "sum by (callType) (sum_over_time(arms_db_requests_seconds{endpoint=\"$instance\",destId=~\"^$db$\"}[1m]))/sum by (callType) (sum_over_time(arms_db_requests_count{endpoint=\"$instance\",destId=~\"^$db$\"}[1m]))",
"legend": "{{callType}}入口"
"legend": "{{callType}}入口",
"refId": "A"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"type": "timeseries",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "6bd5d219-0a94-4f90-b2e0-93ed3eeca9f0",
"type": "timeseries",
"name": "错误数/每分钟",
"links": [],
"layout": {
"h": 8,
"i": "6bd5d219-0a94-4f90-b2e0-93ed3eeca9f0",
"w": 12,
"x": 0,
"y": 9,
"i": "6bd5d219-0a94-4f90-b2e0-93ed3eeca9f0"
"y": 9
},
"targets": [
{
"refId": "A",
"expr": "sum by (callType) (sum_over_time(arms_db_requests_error_count{endpoint=\"$instance\",destId=~\"$db\"}[1m]))",
"legend": "{{callType}}入口"
}
],
"links": [],
"maxPerRow": 4,
"name": "错误数/每分钟",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
@@ -199,56 +159,51 @@
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"targets": [
{
"expr": "sum by (callType) (sum_over_time(arms_db_requests_error_count{endpoint=\"$instance\",destId=~\"$db\"}[1m]))",
"legend": "{{callType}}入口",
"refId": "A"
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"version": "3.0.0",
"id": "d9093b86-5796-471a-a28c-fe1d8daf1721",
"type": "timeseries",
"name": "性能一览/每分钟",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "针对所有SQL的聚和指标",
"links": [],
"id": "d9093b86-5796-471a-a28c-fe1d8daf1721",
"layout": {
"h": 8,
"i": "d9093b86-5796-471a-a28c-fe1d8daf1721",
"w": 12,
"x": 12,
"y": 9,
"i": "d9093b86-5796-471a-a28c-fe1d8daf1721"
"y": 9
},
"targets": [
{
"refId": "A",
"expr": "sum(sum_over_time(arms_db_requests_count{endpoint=\"$instance\",destId=~\"$db\"}[1m]))",
"legend": "请求次数"
},
{
"refId": "B",
"expr": "sum(sum_over_time(arms_db_requests_seconds{endpoint=\"$instance\",destId=~\"$db\"}[1m]))/sum(sum_over_time(arms_db_requests_count{endpoint=\"$instance\",destId=~\"$db\"}[1m]))",
"legend": "平均耗时"
}
],
"links": [],
"maxPerRow": 4,
"name": "性能一览/每分钟",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
@@ -256,25 +211,82 @@
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"targets": [
{
"expr": "sum(sum_over_time(arms_db_requests_count{endpoint=\"$instance\",destId=~\"$db\"}[1m]))",
"legend": "请求次数",
"refId": "A"
},
{
"expr": "sum(sum_over_time(arms_db_requests_seconds{endpoint=\"$instance\",destId=~\"$db\"}[1m]))/sum(sum_over_time(arms_db_requests_count{endpoint=\"$instance\",destId=~\"$db\"}[1m]))",
"legend": "平均耗时",
"refId": "B"
}
],
"type": "timeseries",
"version": "3.0.0"
}
]
}
}
],
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"allOption": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(arms_system_cpu_idle,service)",
"multi": false,
"name": "service",
"reg": "",
"type": "query"
},
{
"allOption": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(arms_db_requests_count{service=\"$service\"},endpoint)",
"multi": false,
"name": "instance",
"reg": "",
"type": "query"
},
{
"allOption": true,
"allValue": ".*",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(arms_db_requests_count{endpoint=\"${instance}\"},destId)",
"multi": false,
"name": "db",
"reg": "",
"type": "query"
}
],
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327092680000
}

View File

@@ -1,7 +1,13 @@
{
"id": 0,
"group_id": 0,
"name": "阿里云 ARMS-JVM-SERVICE",
"tags": "JVM ARMS",
"ident": "",
"tags": "JVM ARMS",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
@@ -770,14 +776,14 @@
"type": "datasource"
},
{
"name": "service",
"label": "service",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${prom}"
},
"definition": "label_values(arms_jvm_buffer_pool_count, service)"
"definition": "label_values(arms_jvm_buffer_pool_count, service)",
"label": "service",
"name": "service",
"type": "query"
},
{
"datasource": {
@@ -791,5 +797,11 @@
}
],
"version": "3.0.0"
}
}
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327094704000
}

View File

@@ -1,337 +1,304 @@
{
"id": 0,
"group_id": 0,
"name": "ARMS-Machine",
"tags": "ARMS",
"ident": "",
"tags": "ARMS",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"version": "3.0.0",
"links": [],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"type": "query",
"name": "service",
"definition": "label_values(arms_system_cpu_idle,service)",
"allOption": false,
"multi": false,
"reg": "",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
},
{
"type": "query",
"name": "host",
"definition": "label_values(arms_system_cpu_idle{service=\"$service\"},host)",
"allValue": "*",
"allOption": false,
"multi": false,
"reg": "",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
}
],
"panels": [
{
"version": "3.0.0",
"id": "8865eacb-f0f6-45fa-912a-8494907c48d6",
"type": "row",
"name": "系统信息",
"collapsed": true,
"id": "8865eacb-f0f6-45fa-912a-8494907c48d6",
"layout": {
"h": 1,
"i": "8865eacb-f0f6-45fa-912a-8494907c48d6",
"w": 24,
"x": 0,
"y": 0,
"i": "8865eacb-f0f6-45fa-912a-8494907c48d6"
"y": 0
},
"panels": []
"name": "系统信息",
"panels": [],
"type": "row",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7fd3186b-6190-44c7-ad05-1c81993f27c9",
"type": "timeseries",
"layout": {
"h": 9,
"i": "7fd3186b-6190-44c7-ad05-1c81993f27c9",
"w": 24,
"x": 0,
"y": 1
},
"links": [],
"maxPerRow": 4,
"name": "CPU",
"links": [],
"layout": {
"h": 9,
"w": 24,
"x": 0,
"y": 1,
"i": "7fd3186b-6190-44c7-ad05-1c81993f27c9"
"options": {
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"refId": "A",
"expr": "max(arms_system_cpu_system{host=~\"$host\"})",
"legend": "系统CPU使用率"
"legend": "系统CPU使用率",
"refId": "A"
},
{
"refId": "B",
"expr": "max(arms_system_cpu_io_wait{host=~\"$host\"})",
"legend": "等待IO完成的CPU使用率"
"legend": "等待IO完成的CPU使用率",
"refId": "B"
},
{
"refId": "C",
"expr": "max(arms_system_cpu_user{host=~\"$host\"})",
"legend": "用户CPU使用率"
"legend": "用户CPU使用率",
"refId": "C"
},
{
"refId": "D",
"expr": "max(arms_system_cpu_system{host=\"$host\"})+max(arms_system_cpu_io_wait{host=~\"$host\"})+max(arms_system_cpu_user{host=\"$host\"})",
"legend": "总和"
"legend": "总和",
"refId": "D"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"type": "timeseries",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "60fc127b-b565-40de-9346-860062d5ea58",
"type": "timeseries",
"layout": {
"h": 9,
"i": "60fc127b-b565-40de-9346-860062d5ea58",
"w": 24,
"x": 0,
"y": 10
},
"links": [],
"maxPerRow": 4,
"name": "内存",
"links": [],
"layout": {
"h": 9,
"w": 24,
"x": 0,
"y": 10,
"i": "60fc127b-b565-40de-9346-860062d5ea58"
"options": {
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"refId": "A",
"expr": "max(arms_system_mem_used_bytes{host=\"$host\"})",
"legend": "系统的已经使用的内存"
"legend": "系统的已经使用的内存",
"refId": "A"
},
{
"refId": "C",
"expr": "max(arms_system_mem_total_bytes{host=\"$host\"})",
"legend": "总和"
"legend": "总和",
"refId": "C"
},
{
"refId": "D",
"expr": "max(arms_system_mem_buffers_bytes{host=\"$host\"})",
"legend": "系统的BufferCache的内存数"
"legend": "系统的BufferCache的内存数",
"refId": "D"
},
{
"refId": "E",
"expr": "max(arms_system_mem_cached_bytes{host=\"$host\"})",
"legend": "系统的PageCache里的内存数"
"legend": "系统的PageCache里的内存数",
"refId": "E"
},
{
"refId": "B",
"expr": "max(arms_system_mem_free_bytes{host=\"$host\"})",
"legend": "系统的空闲内存"
"legend": "系统的空闲内存",
"refId": "B"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"type": "timeseries",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "5229fd8c-3e26-44e6-a091-145c3caef46f",
"type": "timeseries",
"layout": {
"h": 9,
"i": "5229fd8c-3e26-44e6-a091-145c3caef46f",
"w": 24,
"x": 0,
"y": 19
},
"links": [],
"maxPerRow": 4,
"name": "负载",
"links": [],
"layout": {
"h": 9,
"w": 24,
"x": 0,
"y": 19,
"i": "5229fd8c-3e26-44e6-a091-145c3caef46f"
"options": {
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"refId": "A",
"expr": "max(arms_system_load{host=\"$host\"})",
"legend": "负载"
"legend": "负载",
"refId": "A"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"type": "timeseries",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "60872e48-5445-4ee1-b0a2-19be72b6f737",
"type": "timeseries",
"layout": {
"h": 9,
"i": "60872e48-5445-4ee1-b0a2-19be72b6f737",
"w": 24,
"x": 0,
"y": 28
},
"links": [],
"maxPerRow": 4,
"name": "磁盘",
"links": [],
"layout": {
"h": 9,
"w": 24,
"x": 0,
"y": 28,
"i": "60872e48-5445-4ee1-b0a2-19be72b6f737"
"options": {
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"refId": "A",
"expr": "max(arms_system_disk_free_bytes{host=\"$host\"})",
"legend": "可用磁盘容量"
"legend": "可用磁盘容量",
"refId": "A"
},
{
"refId": "B",
"expr": "max(arms_system_disk_total_bytes{host=\"$host\"})",
"legend": "总磁盘容量"
"legend": "总磁盘容量",
"refId": "B"
},
{
"refId": "C",
"expr": "max(arms_system_disk_total_bytes{host=~\"$host\"})-max(arms_system_disk_free_bytes{host=~\"$host\"})",
"legend": "已使用磁盘容量"
"legend": "已使用磁盘容量",
"refId": "C"
}
],
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"type": "timeseries",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "517cc410-c4a0-4923-a902-3c102f06cd0c",
"type": "timeseries",
"name": "网络流量(Byte)/每分钟",
"links": [],
"layout": {
"h": 9,
"i": "517cc410-c4a0-4923-a902-3c102f06cd0c",
"w": 24,
"x": 0,
"y": 37,
"i": "517cc410-c4a0-4923-a902-3c102f06cd0c"
"y": 37
},
"targets": [
{
"refId": "A",
"expr": "max(max_over_time(arms_system_net_in_bytes{host=~\"$host\"}[1m]))",
"legend": "网络接收的字节数"
},
{
"refId": "B",
"expr": "max(max_over_time(arms_system_net_out_bytes{host=~\"$host\"}[1m]))",
"legend": "网络发送的字节数"
}
],
"links": [],
"maxPerRow": 4,
"name": "网络流量(Byte)/每分钟",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
@@ -339,65 +306,55 @@
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"targets": [
{
"expr": "max(max_over_time(arms_system_net_in_bytes{host=~\"$host\"}[1m]))",
"legend": "网络接收的字节数",
"refId": "A"
},
{
"expr": "max(max_over_time(arms_system_net_out_bytes{host=~\"$host\"}[1m]))",
"legend": "网络发送的字节数",
"refId": "B"
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"version": "3.0.0",
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "linear",
"lineWidth": 2,
"stack": "off",
"version": "3.0.0"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "752d89ce-1136-4ddf-b4b9-1a232a8840db",
"type": "timeseries",
"name": "网络数据包(个)/每分钟",
"links": [],
"layout": {
"h": 9,
"i": "752d89ce-1136-4ddf-b4b9-1a232a8840db",
"w": 24,
"x": 0,
"y": 46,
"i": "752d89ce-1136-4ddf-b4b9-1a232a8840db"
"y": 46
},
"targets": [
{
"refId": "A",
"expr": "max(max_over_time(arms_system_net_in_packets{host=~\"$host\"}[1m]))",
"legend": "网络接收的报文数"
},
{
"refId": "C",
"expr": "max(max_over_time(arms_system_net_out_packets{host=~\"$host\"}[1m]))",
"legend": "网络发送的报文数"
},
{
"refId": "D",
"expr": "max(max_over_time(arms_system_net_in_errs{host=~\"$host\"}[1m]))",
"legend": "网络接收的错误数"
},
{
"refId": "E",
"expr": "max(max_over_time(arms_system_net_out_errs{host=~\"$host\"}[1m]))",
"legend": "网络丢弃报文数"
}
],
"links": [],
"maxPerRow": 4,
"name": "网络数据包(个)/每分钟",
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
@@ -405,25 +362,80 @@
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"custom": {
"version": "3.0.0",
"drawStyle": "lines",
"lineInterpolation": "linear",
"fillOpacity": 0.3,
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
},
"maxPerRow": 4,
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"targets": [
{
"expr": "max(max_over_time(arms_system_net_in_packets{host=~\"$host\"}[1m]))",
"legend": "网络接收的报文数",
"refId": "A"
},
{
"expr": "max(max_over_time(arms_system_net_out_packets{host=~\"$host\"}[1m]))",
"legend": "网络发送的报文数",
"refId": "C"
},
{
"expr": "max(max_over_time(arms_system_net_in_errs{host=~\"$host\"}[1m]))",
"legend": "网络接收的错误数",
"refId": "D"
},
{
"expr": "max(max_over_time(arms_system_net_out_errs{host=~\"$host\"}[1m]))",
"legend": "网络丢弃报文数",
"refId": "E"
}
],
"type": "timeseries",
"version": "3.0.0"
}
]
}
}
],
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"allOption": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(arms_system_cpu_idle,service)",
"multi": false,
"name": "service",
"reg": "",
"type": "query"
},
{
"allOption": false,
"allValue": "*",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(arms_system_cpu_idle{service=\"$service\"},host)",
"multi": false,
"name": "host",
"reg": "",
"type": "query"
}
],
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327098444000
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,352 +1,364 @@
{
"name": "阿里云CDN",
"tags": "CDN",
"ident": "",
"configs": {
"var": [
{
"name": "datasource",
"label": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"name": "instance_id",
"label": "instance_id",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_cdn_qps_isp_value, instance_id)"
}
],
"panels": [
{
"type": "timeseries",
"id": "0430c7e9-7372-45e3-9bb2-c5939baf6bfa",
"layout": {
"h": 4,
"w": 8,
"x": 0,
"y": 0,
"i": "0430c7e9-7372-45e3-9bb2-c5939baf6bfa",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"targets": [
{
"refId": "A",
"expr": "aliyun_acs_cdn_bps_isp_value{instance_id=\"$instance_id\"}",
"legend": "峰值 {{instance_id}"
},
{
"expr": "aliyun_acs_cdn_internet_out_average{instance_id=\"$instance_id\"}",
"refId": "B",
"legend": "均值 {{instance_id}}"
}
"id": 0,
"group_id": 0,
"name": "阿里云CDN",
"ident": "",
"tags": "CDN",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": true,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "0430c7e9-7372-45e3-9bb2-c5939baf6bfa",
"layout": {
"h": 4,
"i": "0430c7e9-7372-45e3-9bb2-c5939baf6bfa",
"isResizable": true,
"w": 8,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "网络带宽(bits/s)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_cdn_bps_isp_value{instance_id=\"$instance_id\"}",
"legend": "峰值 {{instance_id}",
"refId": "A"
},
{
"expr": "aliyun_acs_cdn_internet_out_average{instance_id=\"$instance_id\"}",
"legend": "均值 {{instance_id}}",
"refId": "B"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b438ae81-3dfc-4ed8-b66f-262a4b507e4b",
"layout": {
"h": 4,
"i": "b438ae81-3dfc-4ed8-b66f-262a4b507e4b",
"isResizable": true,
"w": 8,
"x": 8,
"y": 0
},
"maxPerRow": 4,
"name": "下行流量(bytes)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_cdn_internet_out_isp_value{instance_id=\"$instance_id\"}",
"legend": "{{instance_id}}",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "af0874c7-3123-437a-93bc-448f6de8b43b",
"layout": {
"h": 4,
"i": "c6e41c04-d591-4117-bdf1-5dc6e1f4c084",
"isResizable": true,
"w": 8,
"x": 16,
"y": 0
},
"maxPerRow": 4,
"name": "每秒访问次数(个)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_cdn_qps_isp_value{instance_id=\"$instance_id\"}",
"legend": "{{instance_id}}",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": true,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ec8fcf96-1691-4e45-9a5f-2f183021b434",
"layout": {
"h": 4,
"i": "ec8fcf96-1691-4e45-9a5f-2f183021b434",
"isResizable": true,
"w": 8,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "边缘状态码4XX占比(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_cdn_code4xx_isp_value{instance_id=\"$instance_id\"}",
"legend": "峰值{{instance_id}}",
"refId": "A"
},
{
"expr": "aliyun_acs_cdn_bps_average{instance_id=\"$instance_id\"}",
"legend": "均值 {{instance_id}}",
"refId": "B"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": true,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "25b6e3fa-f6dd-4452-8025-3c7d9a9a592c",
"layout": {
"h": 4,
"i": "e884b781-1bd4-476c-a807-a68a6417764e",
"isResizable": true,
"w": 8,
"x": 8,
"y": 4
},
"maxPerRow": 4,
"name": "边缘状态码5XX占比(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_cdn_code5xx_isp_value{instance_id=\"$instance_id\"}",
"legend": "峰值{{instance_id}}",
"refId": "A"
},
{
"expr": "aliyun_acs_cdn_bps_average{instance_id=\"$instance_id\"}",
"legend": "均值 {{instance_id}}",
"refId": "B"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
"var": [
{
"definition": "prometheus",
"label": "datasource",
"name": "datasource",
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_cdn_qps_isp_value, instance_id)",
"label": "instance_id",
"name": "instance_id",
"type": "query"
}
],
"name": "网络带宽(bits/s)",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": true,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "b438ae81-3dfc-4ed8-b66f-262a4b507e4b",
"layout": {
"h": 4,
"w": 8,
"x": 8,
"y": 0,
"i": "b438ae81-3dfc-4ed8-b66f-262a4b507e4b",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"targets": [
{
"refId": "A",
"expr": "aliyun_acs_cdn_internet_out_isp_value{instance_id=\"$instance_id\"}",
"legend": "{{instance_id}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "下行流量(bytes)",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "af0874c7-3123-437a-93bc-448f6de8b43b",
"layout": {
"h": 4,
"w": 8,
"x": 16,
"y": 0,
"i": "c6e41c04-d591-4117-bdf1-5dc6e1f4c084",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"targets": [
{
"refId": "A",
"expr": "aliyun_acs_cdn_qps_isp_value{instance_id=\"$instance_id\"}",
"legend": "{{instance_id}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "每秒访问次数(个)",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "ec8fcf96-1691-4e45-9a5f-2f183021b434",
"layout": {
"h": 4,
"w": 8,
"x": 0,
"y": 4,
"i": "ec8fcf96-1691-4e45-9a5f-2f183021b434",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"targets": [
{
"refId": "A",
"expr": "aliyun_acs_cdn_code4xx_isp_value{instance_id=\"$instance_id\"}",
"legend": "峰值{{instance_id}}"
},
{
"expr": "aliyun_acs_cdn_bps_average{instance_id=\"$instance_id\"}",
"refId": "B",
"legend": "均值 {{instance_id}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "边缘状态码4XX占比(%)",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": true,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "25b6e3fa-f6dd-4452-8025-3c7d9a9a592c",
"layout": {
"h": 4,
"w": 8,
"x": 8,
"y": 4,
"i": "e884b781-1bd4-476c-a807-a68a6417764e",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"targets": [
{
"refId": "A",
"expr": "aliyun_acs_cdn_code5xx_isp_value{instance_id=\"$instance_id\"}",
"legend": "峰值{{instance_id}}"
},
{
"expr": "aliyun_acs_cdn_bps_average{instance_id=\"$instance_id\"}",
"refId": "B",
"legend": "均值 {{instance_id}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "边缘状态码5XX占比(%)",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": true,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
}
],
"version": "3.0.0"
}
}
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327104499000
}

View File

@@ -1,324 +1,336 @@
{
"name": "阿里云ECS",
"tags": "",
"ident": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"id": "8606d5ad-c3c7-4b1d-86bf-474d3302ee17",
"layout": {
"h": 4,
"i": "8606d5ad-c3c7-4b1d-86bf-474d3302ee17",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "CPU平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_cpu_utilization_average{ident=~\"$ident\"}) by (ident,instance_id)",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"id": "c7034fe3-5521-4867-a8bd-429767cc03a2",
"layout": {
"h": 4,
"i": "55404296-0bd9-409d-aeaf-e9c7cceea0dd",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "内存平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_memory_usedutilization_average{ident=~\"$ident\"}) by (ident,instance_id)",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"id": "e4c11925-b359-4edb-9269-4bdd4d230224",
"layout": {
"h": 4,
"i": "0c7b3a5a-ef12-4349-be9b-7a245bf01418",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "系统负载[5m]",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_load_5m_average{ident=~\"$ident\"}) by (ident,instance_id)",
"legend": "{{ident}} {{instance_id}} 5分钟负载",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"id": "388d4da6-eb1f-48f1-955d-37579809dfec",
"layout": {
"h": 4,
"i": "5abea3d2-ea82-4bdb-a4f0-4dd1316c0377",
"isResizable": true,
"w": 12,
"x": 12,
"y": 5
},
"maxPerRow": 4,
"name": "磁盘平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_diskusage_utilization_average{ident=~\"$ident\"}) by (ident,instance_id)",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "f8d19cc9-0168-4c13-b9a9-c7980eced974",
"layout": {
"h": 4,
"i": "f8d19cc9-0168-4c13-b9a9-c7980eced974",
"w": 12,
"x": 0,
"y": 9
},
"maxPerRow": 4,
"name": "网络流量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "bitsSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_intranet_in_average{ident=~\"$ident\"}) by (ident,instance_id)",
"legend": "主机:{{ident}} 实例ID: {{instance_id}} 入流量",
"refId": "A",
"step": 300,
"time": {
"end": "now",
"start": "now-5m"
"id": 0,
"group_id": 0,
"name": "阿里云ECS",
"ident": "",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"datasourceValue": "${datasource}",
"id": "8606d5ad-c3c7-4b1d-86bf-474d3302ee17",
"layout": {
"h": 4,
"i": "8606d5ad-c3c7-4b1d-86bf-474d3302ee17",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "CPU平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_cpu_utilization_average{ident=~\"$ident\"}) by (ident,instance_id)",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"datasourceValue": "${datasource}",
"id": "c7034fe3-5521-4867-a8bd-429767cc03a2",
"layout": {
"h": 4,
"i": "55404296-0bd9-409d-aeaf-e9c7cceea0dd",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "内存平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_memory_usedutilization_average{ident=~\"$ident\"}) by (ident,instance_id)",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"datasourceValue": "${datasource}",
"id": "e4c11925-b359-4edb-9269-4bdd4d230224",
"layout": {
"h": 4,
"i": "0c7b3a5a-ef12-4349-be9b-7a245bf01418",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "系统负载[5m]",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_load_5m_average{ident=~\"$ident\"}) by (ident,instance_id)",
"legend": "{{ident}} {{instance_id}} 5分钟负载",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"datasourceValue": "${datasource}",
"id": "388d4da6-eb1f-48f1-955d-37579809dfec",
"layout": {
"h": 4,
"i": "5abea3d2-ea82-4bdb-a4f0-4dd1316c0377",
"isResizable": true,
"w": 12,
"x": 12,
"y": 5
},
"maxPerRow": 4,
"name": "磁盘平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_diskusage_utilization_average{ident=~\"$ident\"}) by (ident,instance_id)",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f8d19cc9-0168-4c13-b9a9-c7980eced974",
"layout": {
"h": 4,
"i": "f8d19cc9-0168-4c13-b9a9-c7980eced974",
"w": 12,
"x": 0,
"y": 9
},
"maxPerRow": 4,
"name": "网络流量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "bitsSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_ecs_dashboard_intranet_in_average{ident=~\"$ident\"}) by (ident,instance_id)",
"legend": "主机:{{ident}} 实例ID: {{instance_id}} 入流量",
"refId": "A",
"step": 300,
"time": {
"end": "now",
"start": "now-5m"
}
},
{
"expr": "sum(aliyun_acs_ecs_dashboard_intranet_out_average{ident=~\"$ident\"}) by (ident,instance_id)",
"legend": "主机:{{ident}} 实例ID: {{instance_id}} 出流量",
"refId": "B",
"step": 300,
"time": {
"end": "now",
"start": "now-5m"
}
}
],
"type": "timeseries",
"version": "2.0.0"
}
},
{
"expr": "sum(aliyun_acs_ecs_dashboard_intranet_out_average{ident=~\"$ident\"}) by (ident,instance_id)",
"legend": "主机:{{ident}} 实例ID: {{instance_id}} 出流量",
"refId": "B",
"step": 300,
"time": {
"end": "now",
"start": "now-5m"
}
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
}
],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_ecs_dashboard_cpu_utilization_average,ident)",
"multi": true,
"name": "ident",
"type": "query"
}
],
"version": "3.0.0"
}
}
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_ecs_dashboard_cpu_utilization_average,ident)",
"multi": true,
"name": "ident",
"type": "query"
}
],
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327106006000
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,474 +1,486 @@
{
"name": "MSE监控大盘",
"tags": "",
"ident": "MSE-Monitor",
"configs": {
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"name": "envoy_clusterid",
"label": "envoy_clusterid",
"type": "query",
"hide": false,
"definition": "label_values(envoy_cluster_bind_errors, envoy_clusterid)",
"multi": false,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
}
],
"panels": [
{
"type": "stat",
"id": "aba69dc0-5a11-4bcd-add9-335b5a677bee",
"layout": {
"h": 5,
"w": 6,
"x": 0,
"y": 0,
"i": "aba69dc0-5a11-4bcd-add9-335b5a677bee",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "sum(delta(envoy_http_rq_total{envoy_clusterid=\"$envoy_clusterid\"}[1m]))"
}
"id": 0,
"group_id": 0,
"name": "MSE监控大盘",
"ident": "MSE-Monitor",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "value",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "aba69dc0-5a11-4bcd-add9-335b5a677bee",
"layout": {
"h": 5,
"i": "aba69dc0-5a11-4bcd-add9-335b5a677bee",
"isResizable": true,
"w": 6,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "PV一分钟",
"options": {
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
}
},
"targets": [
{
"expr": "sum(delta(envoy_http_rq_total{envoy_clusterid=\"$envoy_clusterid\"}[1m]))",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"detailName": "详情",
"legengPosition": "right"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "e34a272e-6125-4afa-a2c1-80d7d9078673",
"layout": {
"h": 5,
"i": "116a5607-5860-426e-a560-d3241da88b57",
"isResizable": true,
"w": 9,
"x": 6,
"y": 0
},
"maxPerRow": 4,
"name": "请求成功率",
"options": {
"standardOptions": {
"decimals": 0,
"util": "percentUnit"
}
},
"targets": [
{
"expr": "sum(delta(envoy_http_downstream_rq{envoy_clusterid=\"$envoy_clusterid\"}[3m])) by (response_code_class)",
"legend": "",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "pie",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "a8917108-58a6-479a-8ec4-571f1b5a79c2",
"layout": {
"h": 5,
"i": "9be66a1f-c0bb-47dc-a3c0-ad43b588789b",
"isResizable": true,
"w": 9,
"x": 15,
"y": 0
},
"maxPerRow": 4,
"name": "请求量(一分钟)",
"options": {
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "bytesSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(delta(envoy_http_downstream_cx_rx_bytes_total{envoy_clusterid=\"$envoy_clusterid\"}[1m]))",
"legend": "",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "1b102bee-ccc9-49a0-a1d1-cc097bb6a987",
"layout": {
"h": 6,
"i": "1b102bee-ccc9-49a0-a1d1-cc097bb6a987",
"isResizable": true,
"w": 8,
"x": 0,
"y": 5
},
"maxPerRow": 4,
"name": "平均延迟",
"options": {
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "milliseconds"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(rate(envoy_http_downstream_rq_time_sum{envoy_clusterid=\"$envoy_clusterid\"}[10m])) / sum(rate(envoy_http_downstream_rq_time_count{envoy_clusterid=\"$envoy_clusterid\"}[10m]))",
"legend": "",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "b432fc11-2f9d-4b72-826b-6ca787401859",
"layout": {
"h": 6,
"i": "ea4c1073-07d3-4adc-a4d3-4812cc55ad7c",
"isResizable": true,
"w": 8,
"x": 8,
"y": 5
},
"maxPerRow": 4,
"name": "P95",
"options": {
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "milliseconds"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "histogram_quantile(0.95, sum(rate(envoy_http_downstream_rq_time_bucket{envoy_clusterid=\"$envoy_clusterid\"}[10m])) by (le, service))",
"legend": "",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "9062d707-d8a7-4a93-82e5-46f6059e8d70",
"layout": {
"h": 6,
"i": "d36246b9-4a9c-4ab0-9171-c5ac330be0ca",
"isResizable": true,
"w": 8,
"x": 16,
"y": 5
},
"maxPerRow": 4,
"name": "QPS",
"options": {
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(irate(envoy_http_downstream_rq{envoy_clusterid=\"$envoy_clusterid\"}[2m]))",
"legend": "",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"baseColor": "#9470FF",
"calc": "lastNotNull",
"serieWidth": 40,
"sortOrder": "desc"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "c3f64cfd-adb2-4316-bb84-55f88ed513a3",
"layout": {
"h": 6,
"i": "807c34f9-bd61-4da3-ad88-41bb3e045605",
"isResizable": true,
"w": 24,
"x": 0,
"y": 11
},
"maxPerRow": 4,
"name": "Top Service Request",
"options": {
"standardOptions": {}
},
"targets": [
{
"expr": "label_replace(label_replace(topk(10, sum(delta(envoy_cluster_upstream_rq_total{envoy_clusterid=\"$envoy_clusterid\", cluster_name=~\"outbound_([0-9]+)_(.*)_(.*).svc.cluster.local$\", cluster_name!~\".*waf-proxy.static\", cluster_name!~\"outbound_([0-9]+)_(.*)_kubernetes.default.svc.cluster.local\", cluster_name!~\"outbound_([0-9]+)_(.*)_(.*).kube-system.svc.cluster.local\", cluster_name!~\"outbound_([0-9]+)_(.*)_(.*).arms-prom.svc.cluster.local\"}[1m])) by (cluster_name)), \"service_name\", \"$3\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*).svc.cluster.local$\"), \"port\", \"$1\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*).svc.cluster.local$\")",
"legend": "{{service_name}}:{{port}}",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "barGauge",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": 7,
"id": "8df57678-ff19-4b63-b768-4dad3f12222b",
"layout": {
"h": 5,
"i": "44f413ba-3262-4ccf-a4b1-c1165bafaaff",
"isResizable": true,
"w": 24,
"x": 0,
"y": 17
},
"maxPerRow": 4,
"name": "Top Service RT",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "milliseconds"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "label_replace(label_replace(avg(delta(envoy_cluster_upstream_rq_time_sum{envoy_clusterid=\"$envoy_clusterid\", cluster_name=~\"outbound_([0-9]+)_(.*)_(.*)$\"}[3m])) by (cluster_name) / avg(delta(envoy_cluster_upstream_rq_time_count{envoy_clusterid=\"$envoy_clusterid\", cluster_name=~\"outbound_([0-9]+)_(.*)_(.*)$\"}[1m])) by (cluster_name), \"service_name\", \"$3\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*)$\"), \"port\", \"$1\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*)$\")",
"legend": "{{service_name}}:{{port}}",
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(envoy_cluster_bind_errors, envoy_clusterid)",
"hide": false,
"label": "envoy_clusterid",
"multi": false,
"name": "envoy_clusterid",
"type": "query"
}
],
"name": "PV一分钟",
"maxPerRow": 4,
"custom": {
"textMode": "valueAndName",
"graphMode": "none",
"colorMode": "value",
"calc": "lastNotNull",
"valueField": "Value",
"colSpan": 1,
"textSize": {}
},
"options": {
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
},
"standardOptions": {}
}
},
{
"type": "pie",
"id": "e34a272e-6125-4afa-a2c1-80d7d9078673",
"layout": {
"h": 5,
"w": 9,
"x": 6,
"y": 0,
"i": "116a5607-5860-426e-a560-d3241da88b57",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "sum(delta(envoy_http_downstream_rq{envoy_clusterid=\"$envoy_clusterid\"}[3m])) by (response_code_class)",
"legend": ""
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "请求成功率",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"legengPosition": "right",
"detailName": "详情"
},
"options": {
"standardOptions": {
"util": "percentUnit",
"decimals": 0
}
}
},
{
"type": "timeseries",
"id": "a8917108-58a6-479a-8ec4-571f1b5a79c2",
"layout": {
"h": 5,
"w": 9,
"x": 15,
"y": 0,
"i": "9be66a1f-c0bb-47dc-a3c0-ad43b588789b",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "sum(delta(envoy_http_downstream_cx_rx_bytes_total{envoy_clusterid=\"$envoy_clusterid\"}[1m]))",
"legend": ""
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "请求量(一分钟)",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "bytesSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "1b102bee-ccc9-49a0-a1d1-cc097bb6a987",
"layout": {
"h": 6,
"w": 8,
"x": 0,
"y": 5,
"i": "1b102bee-ccc9-49a0-a1d1-cc097bb6a987",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "sum(rate(envoy_http_downstream_rq_time_sum{envoy_clusterid=\"$envoy_clusterid\"}[10m])) / sum(rate(envoy_http_downstream_rq_time_count{envoy_clusterid=\"$envoy_clusterid\"}[10m]))",
"legend": ""
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "平均延迟",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "milliseconds"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "b432fc11-2f9d-4b72-826b-6ca787401859",
"layout": {
"h": 6,
"w": 8,
"x": 8,
"y": 5,
"i": "ea4c1073-07d3-4adc-a4d3-4812cc55ad7c",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "histogram_quantile(0.95, sum(rate(envoy_http_downstream_rq_time_bucket{envoy_clusterid=\"$envoy_clusterid\"}[10m])) by (le, service))",
"legend": ""
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "P95",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "milliseconds"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "timeseries",
"id": "9062d707-d8a7-4a93-82e5-46f6059e8d70",
"layout": {
"h": 6,
"w": 8,
"x": 16,
"y": 5,
"i": "d36246b9-4a9c-4ab0-9171-c5ac330be0ca",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "sum(irate(envoy_http_downstream_rq{envoy_clusterid=\"$envoy_clusterid\"}[2m]))",
"legend": ""
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "QPS",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "list"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
},
{
"type": "barGauge",
"id": "c3f64cfd-adb2-4316-bb84-55f88ed513a3",
"layout": {
"h": 6,
"w": 24,
"x": 0,
"y": 11,
"i": "807c34f9-bd61-4da3-ad88-41bb3e045605",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "label_replace(label_replace(topk(10, sum(delta(envoy_cluster_upstream_rq_total{envoy_clusterid=\"$envoy_clusterid\", cluster_name=~\"outbound_([0-9]+)_(.*)_(.*).svc.cluster.local$\", cluster_name!~\".*waf-proxy.static\", cluster_name!~\"outbound_([0-9]+)_(.*)_kubernetes.default.svc.cluster.local\", cluster_name!~\"outbound_([0-9]+)_(.*)_(.*).kube-system.svc.cluster.local\", cluster_name!~\"outbound_([0-9]+)_(.*)_(.*).arms-prom.svc.cluster.local\"}[1m])) by (cluster_name)), \"service_name\", \"$3\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*).svc.cluster.local$\"), \"port\", \"$1\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*).svc.cluster.local$\")",
"legend": "{{service_name}}:{{port}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Top Service Request",
"maxPerRow": 4,
"custom": {
"calc": "lastNotNull",
"baseColor": "#9470FF",
"serieWidth": 40,
"sortOrder": "desc"
},
"options": {
"standardOptions": {}
}
},
{
"type": "timeseries",
"id": "8df57678-ff19-4b63-b768-4dad3f12222b",
"layout": {
"h": 5,
"w": 24,
"x": 0,
"y": 17,
"i": "44f413ba-3262-4ccf-a4b1-c1165bafaaff",
"isResizable": true
},
"version": "3.0.0",
"datasourceCate": "prometheus",
"datasourceValue": 7,
"targets": [
{
"refId": "A",
"expr": "label_replace(label_replace(avg(delta(envoy_cluster_upstream_rq_time_sum{envoy_clusterid=\"$envoy_clusterid\", cluster_name=~\"outbound_([0-9]+)_(.*)_(.*)$\"}[3m])) by (cluster_name) / avg(delta(envoy_cluster_upstream_rq_time_count{envoy_clusterid=\"$envoy_clusterid\", cluster_name=~\"outbound_([0-9]+)_(.*)_(.*)$\"}[1m])) by (cluster_name), \"service_name\", \"$3\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*)$\"), \"port\", \"$1\", \"cluster_name\", \"outbound_([0-9]+)_(.*)_(.*)$\")",
"legend": "{{service_name}}:{{port}}"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"name": "Top Service RT",
"maxPerRow": 4,
"options": {
"tooltip": {
"mode": "all",
"sort": "none"
},
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "milliseconds"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"value": null,
"type": "base"
}
]
}
},
"custom": {
"drawStyle": "lines",
"lineInterpolation": "smooth",
"spanNulls": false,
"lineWidth": 2,
"fillOpacity": 0.3,
"gradientMode": "opacity",
"stack": "off",
"scaleDistribution": {
"type": "linear"
}
}
}
],
"version": "3.0.0"
}
}
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327111860000
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,334 +1,346 @@
{
"name": "阿里云RDS",
"tags": "",
"ident": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"layout": {
"h": 4,
"i": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "CPU平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_cpu_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
"id": 0,
"group_id": 0,
"name": "阿里云RDS",
"ident": "",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"layout": {
"h": 4,
"i": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "CPU平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_cpu_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c43eb882-915f-4c38-a0b5-8f33c21ab44a",
"layout": {
"h": 4,
"i": "09903231-6557-42be-9cf3-2873878e9bf2",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "内存平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_memory_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "37447883-ad79-46bc-888a-1be2835c1c64",
"layout": {
"h": 4,
"i": "378a5a26-c28e-4612-af09-f82ec2e11d80",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "磁盘平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_disk_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c9735607-3f24-44a7-bbf1-3ad39441c5c9",
"layout": {
"h": 4,
"i": "93a4c8a6-ac23-4e26-8a38-781ec1668820",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "IOPS平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_iops_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b516e7dc-8022-409d-b907-18c4143df891",
"layout": {
"h": 5,
"i": "b516e7dc-8022-409d-b907-18c4143df891",
"isResizable": true,
"w": 24,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "SQL执行量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_delete_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "delete",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_insert_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "insert",
"refId": "B"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_insert_select_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "insert_select",
"refId": "C"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_update_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "update",
"refId": "D"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_select_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "select",
"refId": "E"
}
],
"type": "timeseries",
"version": "2.0.0"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c43eb882-915f-4c38-a0b5-8f33c21ab44a",
"layout": {
"h": 4,
"i": "09903231-6557-42be-9cf3-2873878e9bf2",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "内存平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_memory_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_rds_dashboard_cpu_usage_average,name)",
"multi": false,
"name": "name",
"type": "query"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_rds_dashboard_cpu_usage_average{name=\"$name\"},instance_id)",
"multi": false,
"name": "instance_id",
"type": "query"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "37447883-ad79-46bc-888a-1be2835c1c64",
"layout": {
"h": 4,
"i": "378a5a26-c28e-4612-af09-f82ec2e11d80",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "磁盘平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_disk_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c9735607-3f24-44a7-bbf1-3ad39441c5c9",
"layout": {
"h": 4,
"i": "93a4c8a6-ac23-4e26-8a38-781ec1668820",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "IOPS平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_iops_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b516e7dc-8022-409d-b907-18c4143df891",
"layout": {
"h": 5,
"i": "b516e7dc-8022-409d-b907-18c4143df891",
"isResizable": true,
"w": 24,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "SQL执行量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_delete_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "delete",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_insert_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "insert",
"refId": "B"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_insert_select_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "insert_select",
"refId": "C"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_update_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "update",
"refId": "D"
},
{
"expr": "sum(aliyun_acs_rds_dashboard_my_sql_com_select_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "select",
"refId": "E"
}
],
"type": "timeseries",
"version": "2.0.0"
}
],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"name": "name",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_rds_dashboard_cpu_usage_average,name)",
"multi": false
},
{
"name": "instance_id",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_rds_dashboard_cpu_usage_average{name=\"$name\"},instance_id)",
"multi": false
}
],
"version": "3.0.0"
}
}
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327125143000
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,319 +1,331 @@
{
"name": "阿里云REDIS",
"tags": "",
"ident": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"layout": {
"h": 4,
"i": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "CPU平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_cpu_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
"id": 0,
"group_id": 0,
"name": "阿里云REDIS",
"ident": "",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"layout": {
"h": 4,
"i": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "CPU平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_cpu_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c43eb882-915f-4c38-a0b5-8f33c21ab44a",
"layout": {
"h": 4,
"i": "09903231-6557-42be-9cf3-2873878e9bf2",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "内存平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_memory_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "37447883-ad79-46bc-888a-1be2835c1c64",
"layout": {
"h": 4,
"i": "378a5a26-c28e-4612-af09-f82ec2e11d80",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "连接数平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_connection_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c9735607-3f24-44a7-bbf1-3ad39441c5c9",
"layout": {
"h": 4,
"i": "93a4c8a6-ac23-4e26-8a38-781ec1668820",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "失败统计平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_failed_count_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b516e7dc-8022-409d-b907-18c4143df891",
"layout": {
"h": 5,
"i": "b516e7dc-8022-409d-b907-18c4143df891",
"isResizable": true,
"w": 24,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "网络流量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "bitsSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_intranet_in_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "in",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_kvstore_intranet_out_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "out",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c43eb882-915f-4c38-a0b5-8f33c21ab44a",
"layout": {
"h": 4,
"i": "09903231-6557-42be-9cf3-2873878e9bf2",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "内存平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_memory_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average,name)",
"multi": false,
"name": "name",
"type": "query"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average{name=\"$name\"},instance_id)",
"multi": false,
"name": "instance_id",
"type": "query"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "37447883-ad79-46bc-888a-1be2835c1c64",
"layout": {
"h": 4,
"i": "378a5a26-c28e-4612-af09-f82ec2e11d80",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "连接数平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_connection_usage_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c9735607-3f24-44a7-bbf1-3ad39441c5c9",
"layout": {
"h": 4,
"i": "93a4c8a6-ac23-4e26-8a38-781ec1668820",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "失败统计平均使用率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_failed_count_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b516e7dc-8022-409d-b907-18c4143df891",
"layout": {
"h": 5,
"i": "b516e7dc-8022-409d-b907-18c4143df891",
"isResizable": true,
"w": 24,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "网络流量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "bitsSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_kvstore_intranet_in_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "in",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_kvstore_intranet_out_average{instance_id=\"$instance_id\"}) by (instance_id)",
"legend": "out",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0"
}
],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"name": "name",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average,name)",
"multi": false
},
{
"name": "instance_id",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average{name=\"$name\"},instance_id)",
"multi": false
}
],
"version": "3.0.0"
}
}
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327128561000
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,437 +1,449 @@
{
"name": "阿里云REDIS_N",
"tags": "",
"ident": "",
"configs": {
"panels": [
{
"collapsed": false,
"id": "2c38fd30-4c4c-40a9-ad4a-5c945db32947",
"layout": {
"h": 1,
"i": "2c38fd30-4c4c-40a9-ad4a-5c945db32947",
"isResizable": false,
"w": 24,
"x": 0,
"y": 0
},
"name": "默认分组",
"type": "row"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"layout": {
"h": 4,
"i": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"isResizable": true,
"w": 8,
"x": 0,
"y": 1
},
"maxPerRow": 4,
"name": "CPU 使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_cpu_usage_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
"id": 0,
"group_id": 0,
"name": "阿里云REDIS_N",
"ident": "",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"collapsed": false,
"id": "2c38fd30-4c4c-40a9-ad4a-5c945db32947",
"layout": {
"h": 1,
"i": "2c38fd30-4c4c-40a9-ad4a-5c945db32947",
"isResizable": false,
"w": 24,
"x": 0,
"y": 0
},
"name": "默认分组",
"type": "row"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"layout": {
"h": 4,
"i": "01f4d444-aa2d-466d-9615-c76baf60a40c",
"isResizable": true,
"w": 8,
"x": 0,
"y": 1
},
"maxPerRow": 4,
"name": "CPU 使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_cpu_usage_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c43eb882-915f-4c38-a0b5-8f33c21ab44a",
"layout": {
"h": 4,
"i": "09903231-6557-42be-9cf3-2873878e9bf2",
"isResizable": true,
"w": 8,
"x": 8,
"y": 1
},
"maxPerRow": 4,
"name": "内存使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_memory_usage_average{instance_id=\"$instance_id\"}",
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "37447883-ad79-46bc-888a-1be2835c1c64",
"layout": {
"h": 4,
"i": "378a5a26-c28e-4612-af09-f82ec2e11d80",
"isResizable": true,
"w": 8,
"x": 16,
"y": 1
},
"maxPerRow": 4,
"name": "连接数使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_connection_usage_average{instance_id=\"$instance_id\"}",
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "2d1c8cdf-538e-48b5-8563-358f242825e5",
"layout": {
"h": 4,
"i": "764e188d-d728-44a0-a79d-133d957df9a9",
"isResizable": true,
"w": 8,
"x": 0,
"y": 5
},
"maxPerRow": 4,
"name": "流入带宽使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_intranet_in_ratio_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "0577dc0f-887a-4a54-9100-ef5e5e7443a0",
"layout": {
"h": 4,
"i": "93955b6b-620c-4407-908c-01ba4f544fef",
"isResizable": true,
"w": 8,
"x": 8,
"y": 5
},
"maxPerRow": 4,
"name": "流出带宽使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_intranet_out_ratio_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a83bd550-3866-4225-9c09-08dd77e1b281",
"layout": {
"h": 4,
"i": "7b4d509b-1a8d-4f6a-9df4-f14116c4b9eb",
"isResizable": true,
"w": 8,
"x": 16,
"y": 5
},
"maxPerRow": 4,
"name": "连接数使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_connection_usage_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average,name)",
"multi": false,
"name": "name",
"type": "query"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average,instance_id)",
"multi": false,
"name": "instance_id",
"type": "query"
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c43eb882-915f-4c38-a0b5-8f33c21ab44a",
"layout": {
"h": 4,
"i": "09903231-6557-42be-9cf3-2873878e9bf2",
"isResizable": true,
"w": 8,
"x": 8,
"y": 1
},
"maxPerRow": 4,
"name": "内存使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_memory_usage_average{instance_id=\"$instance_id\"}",
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "37447883-ad79-46bc-888a-1be2835c1c64",
"layout": {
"h": 4,
"i": "378a5a26-c28e-4612-af09-f82ec2e11d80",
"isResizable": true,
"w": 8,
"x": 16,
"y": 1
},
"maxPerRow": 4,
"name": "连接数使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_connection_usage_average{instance_id=\"$instance_id\"}",
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "2d1c8cdf-538e-48b5-8563-358f242825e5",
"layout": {
"h": 4,
"i": "764e188d-d728-44a0-a79d-133d957df9a9",
"isResizable": true,
"w": 8,
"x": 0,
"y": 5
},
"maxPerRow": 4,
"name": "流入带宽使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_intranet_in_ratio_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "0577dc0f-887a-4a54-9100-ef5e5e7443a0",
"layout": {
"h": 4,
"i": "93955b6b-620c-4407-908c-01ba4f544fef",
"isResizable": true,
"w": 8,
"x": 8,
"y": 5
},
"maxPerRow": 4,
"name": "流出带宽使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "percent"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_intranet_out_ratio_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a83bd550-3866-4225-9c09-08dd77e1b281",
"layout": {
"h": 4,
"i": "7b4d509b-1a8d-4f6a-9df4-f14116c4b9eb",
"isResizable": true,
"w": 8,
"x": 16,
"y": 5
},
"maxPerRow": 4,
"name": "连接数使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "aliyun_acs_kvstore_connection_usage_average{instance_id=\"$instance_id\"}",
"instant": false,
"legend": "",
"refId": "A",
"step": 120
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
}
],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"name": "name",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average,name)",
"multi": false
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_kvstore_cpu_usage_average,instance_id)",
"multi": false,
"name": "instance_id",
"type": "query"
}
],
"version": "3.0.0"
}
}
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327133348000
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,388 +1,400 @@
{
"name": "阿里云SLB",
"tags": "",
"ident": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"id": "aa8b2623-1e14-43cd-a3c4-33944a61fcc5",
"layout": {
"h": 4,
"i": "aa8b2623-1e14-43cd-a3c4-33944a61fcc5",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "七层实例QPS使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_qps_utilization_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} QPS使用率 ",
"refId": "A"
}
"id": 0,
"group_id": 0,
"name": "阿里云SLB",
"ident": "",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceName": "Default",
"datasourceValue": "${datasource}",
"id": "aa8b2623-1e14-43cd-a3c4-33944a61fcc5",
"layout": {
"h": 4,
"i": "aa8b2623-1e14-43cd-a3c4-33944a61fcc5",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "七层实例QPS使用率(%)",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_qps_utilization_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} QPS使用率 ",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b2002c63-8f0b-436c-b765-5bb65191f3c2",
"layout": {
"h": 4,
"i": "b2002c63-8f0b-436c-b765-5bb65191f3c2",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "7层协议实例Upstream状态码分布",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_upstream_code4xx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 状态码 4xx ",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_upstream_code5xx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 状态码 5xx ",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "71028d82-4804-468f-92f4-3444953b22cc",
"layout": {
"h": 4,
"i": "71028d82-4804-468f-92f4-3444953b22cc",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "新建连接数",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_new_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 新建连接数",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "25f90635-ff68-4dc2-bfb0-c6634f0e6867",
"layout": {
"h": 4,
"i": "25f90635-ff68-4dc2-bfb0-c6634f0e6867",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "并发连接数",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_active_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 活跃连接数",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_inactive_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 非活跃连接数",
"refId": "B"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_max_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 最大活跃连接数",
"refId": "C"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "fde27e57-bdd6-4fd6-b3c0-75222f736d3b",
"layout": {
"h": 4,
"i": "fde27e57-bdd6-4fd6-b3c0-75222f736d3b",
"isResizable": true,
"w": 12,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "数据包数",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_packet_rx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 接受数据包数",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_packet_tx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 发送数据包数",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a0fd47db-0b49-4b71-ae16-b4108324e35a",
"layout": {
"h": 4,
"i": "a0fd47db-0b49-4b71-ae16-b4108324e35a",
"isResizable": true,
"w": 12,
"x": 12,
"y": 8
},
"maxPerRow": 4,
"name": "流量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "bitsSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_traffic_rx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 出流量",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_traffic_tx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 入流量",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "b2002c63-8f0b-436c-b765-5bb65191f3c2",
"layout": {
"h": 4,
"i": "b2002c63-8f0b-436c-b765-5bb65191f3c2",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "7层协议实例Upstream状态码分布",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_upstream_code4xx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 状态码 4xx ",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_upstream_code5xx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 状态码 5xx ",
"refId": "B"
}
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_slb_dashboard_active_connection_average ,instance_id)",
"multi": true,
"name": "instance_id",
"type": "query"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "71028d82-4804-468f-92f4-3444953b22cc",
"layout": {
"h": 4,
"i": "71028d82-4804-468f-92f4-3444953b22cc",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "新建连接数",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_new_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 新建连接数",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "25f90635-ff68-4dc2-bfb0-c6634f0e6867",
"layout": {
"h": 4,
"i": "25f90635-ff68-4dc2-bfb0-c6634f0e6867",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "并发连接数",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_active_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 活跃连接数",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_inactive_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 非活跃连接数",
"refId": "B"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_max_connection_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 最大活跃连接数",
"refId": "C"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "fde27e57-bdd6-4fd6-b3c0-75222f736d3b",
"layout": {
"h": 4,
"i": "fde27e57-bdd6-4fd6-b3c0-75222f736d3b",
"isResizable": true,
"w": 12,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "数据包数",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_packet_rx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 接受数据包数",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_packet_tx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 发送数据包数",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "a0fd47db-0b49-4b71-ae16-b4108324e35a",
"layout": {
"h": 4,
"i": "a0fd47db-0b49-4b71-ae16-b4108324e35a",
"isResizable": true,
"w": 12,
"x": 12,
"y": 8
},
"maxPerRow": 4,
"name": "流量",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {
"util": "bitsSI"
},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_traffic_rx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 出流量",
"refId": "A"
},
{
"expr": "sum(aliyun_acs_slb_dashboard_instance_traffic_tx_average{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}} 入流量",
"refId": "B"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
}
],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_acs_slb_dashboard_active_connection_average ,instance_id)",
"multi": true,
"name": "instance_id",
"type": "query"
}
],
"version": "3.0.0"
}
}
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327138375000
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,358 +1,370 @@
{
"name": "阿里云WAF",
"tags": "",
"ident": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "ec46b990-faf5-4ed7-a791-bbac5df91636",
"layout": {
"h": 4,
"i": "ec46b990-faf5-4ed7-a791-bbac5df91636",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "4xx 环比率V3",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_4xx_ratio_wafv3_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "4xx 环比率V3",
"refId": "A"
}
"id": 0,
"group_id": 0,
"name": "阿里云WAF",
"ident": "",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ec46b990-faf5-4ed7-a791-bbac5df91636",
"layout": {
"h": 4,
"i": "ec46b990-faf5-4ed7-a791-bbac5df91636",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"maxPerRow": 4,
"name": "4xx 环比率V3",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_4xx_ratio_wafv3_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "4xx 环比率V3",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "efc75e62-5e75-470d-b12b-a98ca44b268a",
"layout": {
"h": 4,
"i": "584b5a3c-2b7a-4e11-bee5-c2ed8661933e",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "5xx 环比率V3",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_5xx_ratio_wafv3_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "5xx 环比率V3",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "79aefa1b-5e50-4c0c-980d-e5523b859509",
"layout": {
"h": 4,
"i": "fc875397-c1a4-4713-b564-09abf852bcf3",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "4xx 环比率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_4xx_ratio_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "4xx 环比率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "60c211d4-d51a-4681-b23b-ec8cc5dce7fe",
"layout": {
"h": 4,
"i": "946be0db-32a3-48ea-9473-88fdfa77201d",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "5xx 环比率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_5xx_ratio_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "5xx 环比率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "0de9271c-7b19-4003-ae56-2e273b4b99c4",
"layout": {
"h": 4,
"i": "0de9271c-7b19-4003-ae56-2e273b4b99c4",
"isResizable": true,
"w": 12,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "QPS环比增长率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_qps_ratio_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}}QPS 环比增长率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ccf2ffc1-6f22-4a13-b795-68072c077e1f",
"layout": {
"h": 4,
"i": "d0320716-f704-4b6e-8671-b58fb77a5d7c",
"isResizable": true,
"w": 12,
"x": 12,
"y": 8
},
"maxPerRow": 4,
"name": "QPS环比下降率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_qps_ratio_down_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}}QPS 环比下降率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "efc75e62-5e75-470d-b12b-a98ca44b268a",
"layout": {
"h": 4,
"i": "584b5a3c-2b7a-4e11-bee5-c2ed8661933e",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"maxPerRow": 4,
"name": "5xx 环比率V3",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_5xx_ratio_wafv3_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "5xx 环比率V3",
"refId": "A"
}
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_waf_qps_ratio_maximum,instance_id)",
"multi": true,
"name": "instance_id",
"type": "query"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "79aefa1b-5e50-4c0c-980d-e5523b859509",
"layout": {
"h": 4,
"i": "fc875397-c1a4-4713-b564-09abf852bcf3",
"isResizable": true,
"w": 12,
"x": 0,
"y": 4
},
"maxPerRow": 4,
"name": "4xx 环比率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_4xx_ratio_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "4xx 环比率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "60c211d4-d51a-4681-b23b-ec8cc5dce7fe",
"layout": {
"h": 4,
"i": "946be0db-32a3-48ea-9473-88fdfa77201d",
"isResizable": true,
"w": 12,
"x": 12,
"y": 4
},
"maxPerRow": 4,
"name": "5xx 环比率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_5xx_ratio_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "5xx 环比率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "0de9271c-7b19-4003-ae56-2e273b4b99c4",
"layout": {
"h": 4,
"i": "0de9271c-7b19-4003-ae56-2e273b4b99c4",
"isResizable": true,
"w": 12,
"x": 0,
"y": 8
},
"maxPerRow": 4,
"name": "QPS环比增长率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_qps_ratio_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}}QPS 环比增长率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"lineWidth": 2,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"id": "ccf2ffc1-6f22-4a13-b795-68072c077e1f",
"layout": {
"h": 4,
"i": "d0320716-f704-4b6e-8671-b58fb77a5d7c",
"isResizable": true,
"w": 12,
"x": 12,
"y": 8
},
"maxPerRow": 4,
"name": "QPS环比下降率",
"options": {
"legend": {
"displayMode": "hidden"
},
"standardOptions": {},
"thresholds": {
"steps": [
{
"color": "#634CD9",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "none"
}
},
"targets": [
{
"expr": "sum(aliyun_waf_qps_ratio_down_maximum{instance_id=~\"$instance_id\"}) by (instance_id)",
"legend": "{{instance_id}}QPS 环比下降率",
"refId": "A"
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
}
],
"var": [
{
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(aliyun_waf_qps_ratio_maximum,instance_id)",
"multi": true,
"name": "instance_id",
"type": "query"
}
],
"version": "3.0.0"
}
}
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327142143000
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -1,30 +0,0 @@
# 调整间隔时间
如有诉求对此插件本身的采集间隔时间调整的话就启用,单位为秒
interval = 15
# 获取被监控端设备的网卡名称
可用以下命令获取网卡名称列表
```
ip addr | grep '^[0-9]' |awk -F':' '{print $2}'
lo
eth0
br-153e7f4f0c83
br-2f302c2a8faa
br-5ae0cdb82efc
br-68cba8773a8c
br-c50ca3122079
docker0
br-fd769e4347bd
veth944ac75@if52
```
# 在数组instances中启用eth_device
将以上获取的网卡列表根据自己的诉求填入如eth0
```
eth_device="eth0"
```
# 测试是否能获取到值
```
./categraf --test --inputs arp_packet
```

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,9 @@
interval = 15
[[instances]]
urls = [
"http://<otel-collector-ip>:<otel-collector-port>/metrics"
]
url_label_key = "otel_collector"
url_label_value = "{{.Host}}"

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,983 @@
{
"id": 0,
"group_id": 0,
"name": "Cluster Overview",
"ident": "",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"links": [],
"panels": [
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "970f949f-cdc8-4ec0-b2c8-c49d3bd14d8d",
"layout": {
"h": 4,
"i": "970f949f-cdc8-4ec0-b2c8-c49d3bd14d8d",
"isResizable": true,
"w": 3,
"x": 0,
"y": 0
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#F2495C",
"type": "base",
"value": null
},
{
"color": "#73BF69",
"value": 0
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "sum by(job) (kafka_controller_active_count{job=\"$cluster_id\"})",
"legend": "Active Controller",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "bcf3c5d7-9dd1-4cb6-81a1-3198f4b049e2",
"layout": {
"h": 4,
"i": "bcf3c5d7-9dd1-4cb6-81a1-3198f4b049e2",
"isResizable": true,
"w": 3,
"x": 3,
"y": 0
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
},
{
"color": "#F2495C",
"value": 1
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "kafka_broker_fenced_count{job=\"$cluster_id\", instance=\"$active_controller\"}",
"legend": "Fenced Broker",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "333648e6-4bef-4e2d-bb84-f1d720d383cc",
"layout": {
"h": 4,
"i": "333648e6-4bef-4e2d-bb84-f1d720d383cc",
"isResizable": true,
"w": 4,
"x": 6,
"y": 0
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#3274D9",
"type": "base",
"value": null
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "kafka_topic_count{job=\"$cluster_id\", instance=\"$active_controller\"}",
"legend": "Topics",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "value",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "659a8d96-5276-49fb-a011-22d85dace435",
"layout": {
"h": 4,
"i": "659a8d96-5276-49fb-a011-22d85dace435",
"isResizable": true,
"w": 2,
"x": 10,
"y": 0
},
"links": [],
"maxPerRow": 4,
"name": "Error Rate",
"options": {
"standardOptions": {
"decimals": 1,
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
},
{
"color": "#F2495C",
"value": 1
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "sum(rate(kafka_request_error_count_total{job=\"$cluster_id\", error!=\"NONE\"}[$__rate_interval]))",
"legend": "__auto",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "0650f241-385f-4386-8b76-7f23d53ef8fb",
"layout": {
"h": 8,
"i": "0650f241-385f-4386-8b76-7f23d53ef8fb",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"links": [],
"maxPerRow": 4,
"name": "Bytes In (+) / Out (-)",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "hidden",
"placement": "bottom"
},
"standardOptions": {
"decimals": 1,
"util": "bytesSecIEC"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "desc"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum(rate(kafka_broker_network_io_bytes_total{job=\"$cluster_id\", direction=\"in\"}[$__rate_interval]))",
"legend": "In",
"maxDataPoints": 240,
"refId": "A"
},
{
"expr": "sum(rate(kafka_broker_network_io_bytes_total{job=\"$cluster_id\", direction=\"out\"}[$__rate_interval])) * -1",
"legend": "Out",
"maxDataPoints": 240,
"refId": "B"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "aac842e5-e997-4c0f-84e4-0b104dd303e3",
"layout": {
"h": 4,
"i": "aac842e5-e997-4c0f-84e4-0b104dd303e3",
"isResizable": true,
"w": 6,
"x": 0,
"y": 4
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#F2495C",
"type": "base",
"value": null
},
{
"color": "#73BF69",
"value": 0
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "kafka_broker_active_count{job=\"$cluster_id\", instance=\"$active_controller\"}",
"legend": "Active Broker",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "fb4e88e4-9e6e-44d0-8bb8-1fe717c0b824",
"layout": {
"h": 4,
"i": "fb4e88e4-9e6e-44d0-8bb8-1fe717c0b824",
"isResizable": true,
"w": 4,
"x": 6,
"y": 4
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#3274D9",
"type": "base",
"value": null
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "kafka_partition_total_count{job=\"$cluster_id\", instance=\"$active_controller\"}",
"legend": "Partitions",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "b752e09e-4bc4-4e12-935e-d24f1d422a9b",
"layout": {
"h": 4,
"i": "b752e09e-4bc4-4e12-935e-d24f1d422a9b",
"isResizable": true,
"w": 2,
"x": 10,
"y": 4
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"decimals": 0,
"util": "bytesIEC"
},
"thresholds": {
"steps": [
{
"color": "#56A64B",
"type": "base",
"value": null
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "sum(kafka_log_size{job=\"$cluster_id\"})",
"legend": "Size",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"baseColor": "#9470FF",
"calc": "lastNotNull",
"serieWidth": 70,
"sortOrder": "desc"
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "7b8a904f-179f-4140-9ed4-d109271ec7af",
"layout": {
"h": 5,
"i": "7b8a904f-179f-4140-9ed4-d109271ec7af",
"isResizable": true,
"w": 5,
"x": 0,
"y": 8
},
"links": [],
"maxPerRow": 4,
"name": "Group Count",
"options": {
"standardOptions": {
"util": "none"
},
"valueMappings": []
},
"targets": [
{
"expr": "sum(kafka_group_count{job=\"$cluster_id\"})",
"legend": "total",
"maxDataPoints": 240,
"refId": "A"
},
{
"expr": "sum(kafka_group_stable_count{job=\"$cluster_id\"})",
"legend": "stable",
"maxDataPoints": 240,
"refId": "D"
},
{
"expr": "sum(kafka_group_dead_count{job=\"$cluster_id\"})",
"legend": "dead",
"maxDataPoints": 240,
"refId": "B"
},
{
"expr": "sum(kafka_group_empty_count{job=\"$cluster_id\"})",
"legend": "empty",
"maxDataPoints": 240,
"refId": "C"
},
{
"expr": "sum(kafka_group_preparing_rebalance_count{job=\"$cluster_id\"})",
"legend": "prepare_rebalance",
"maxDataPoints": 240,
"refId": "E"
},
{
"expr": "sum(kafka_group_completing_rebalance_count{job=\"$cluster_id\"})",
"legend": "completing_rebalance",
"maxDataPoints": 240,
"refId": "F"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "barGauge",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colorMode": "value",
"columns": [],
"displayMode": "labelsOfSeriesToRows",
"linkMode": "appendLinkColumn",
"links": [
{
"title": "下钻",
"url": "/dashboards/automq-group-metrics?TSDB=${DS_PROMETHEUS}\u0026cluster_id=${cluster_id}\u0026group_id=${__field.labels.consumer_group}\u0026partition=all\u0026topic=${__field.labels.topic}"
}
],
"showHeader": true
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "b7cb494b-413f-4b12-ae1e-7da55b65d5ee",
"layout": {
"h": 5,
"i": "b7cb494b-413f-4b12-ae1e-7da55b65d5ee",
"isResizable": true,
"w": 19,
"x": 5,
"y": 8
},
"links": [],
"maxPerRow": 4,
"name": "Consumer Lag",
"options": {
"standardOptions": {},
"valueMappings": [
{
"match": {
"special": 0
},
"result": {
"color": "rgba(44, 157, 61, 1)"
},
"type": "special"
},
{
"match": {
"from": 0
},
"result": {
"color": "rgba(228, 22, 22, 1)"
},
"type": "range"
}
]
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"valueMappings": []
}
}
],
"targets": [
{
"expr": "sum by(topic) (max by(topic, partition) (kafka_log_end_offset{job=\"$cluster_id\"}))\n- on(topic) group_left(consumer_group)\nsum by(consumer_group, topic) (max by(consumer_group, topic, partition) (kafka_group_commit_offset{job=\"$cluster_id\"}))",
"legend": "",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {
"renameByName": {
"value": "lag"
}
}
}
],
"type": "table",
"version": "3.0.0"
},
{
"custom": {
"aggrDimension": [
"topic"
],
"calc": "lastNotNull",
"colorMode": "value",
"displayMode": "labelValuesToRows",
"linkMode": "appendLinkColumn",
"links": [
{
"title": "下钻",
"url": "/dashboards/automq-topic-metrics?TSDB=${DS_PROMETHEUS}\u0026cluster_id=${cluster_id}\u0026topic=${__field.labels.topic}"
}
],
"showHeader": true
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "90716481-5dd6-4c4e-8219-cbcb724a22d9",
"layout": {
"h": 4,
"i": "90716481-5dd6-4c4e-8219-cbcb724a22d9",
"isResizable": true,
"w": 24,
"x": 0,
"y": 13
},
"links": [],
"maxPerRow": 4,
"name": "Topic Statistics",
"options": {
"standardOptions": {
"decimals": 2
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"value": "D"
},
"properties": {
"standardOptions": {
"decimals": 2,
"util": "bytesIEC"
},
"valueMappings": []
}
},
{
"matcher": {
"id": "byFrameRefID",
"value": "A"
},
"properties": {
"standardOptions": {
"decimals": 1,
"util": "bytesSecIEC"
}
},
"type": "special"
},
{
"matcher": {
"id": "byFrameRefID",
"value": "B"
},
"properties": {
"standardOptions": {
"decimals": 1,
"util": "bytesSecIEC"
}
},
"type": "special"
}
],
"targets": [
{
"expr": "sum by(topic) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"in\"}[$__rate_interval]))",
"legend": "Bytes in",
"maxDataPoints": 240,
"refId": "A"
},
{
"expr": "sum by(topic) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"out\"}[$__rate_interval]))",
"legend": "Bytes out",
"maxDataPoints": 240,
"refId": "B"
},
{
"expr": "sum by(topic) (rate(kafka_message_count_total{job=\"$cluster_id\", direction=\"in\"}[$__rate_interval]))",
"legend": "Msgs in",
"maxDataPoints": 240,
"refId": "C"
},
{
"expr": "sum by(topic) (kafka_log_size{job=\"$cluster_id\"})",
"legend": "Size",
"maxDataPoints": 240,
"refId": "D"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "table",
"version": "3.0.0"
},
{
"custom": {
"aggrDimension": [
"instance"
],
"calc": "lastNotNull",
"colorMode": "value",
"displayMode": "labelValuesToRows",
"linkMode": "appendLinkColumn",
"links": [
{
"title": "下钻",
"url": "/dashboards/automq-broker-metrics?DS_PROMETHEUS=${DS_PROMETHEUS}\u0026cluster_id=${cluster_id}\u0026node_id=${__field.labels.instance}"
}
],
"showHeader": true
},
"datasourceCate": "prometheus",
"datasourceValue": "${DS_PROMETHEUS}",
"id": "a427c6d3-0fab-45c2-92e5-585e5435fcfe",
"layout": {
"h": 6,
"i": "a427c6d3-0fab-45c2-92e5-585e5435fcfe",
"isResizable": true,
"w": 24,
"x": 0,
"y": 17
},
"links": [],
"maxPerRow": 4,
"name": "Broker Statistics",
"options": {
"standardOptions": {}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"value": "C"
},
"properties": {
"standardOptions": {
"util": "bytesSecIEC"
}
}
},
{
"matcher": {
"id": "byFrameRefID",
"value": "D"
},
"properties": {
"standardOptions": {
"util": "bytesSecIEC"
}
},
"type": "special"
},
{
"matcher": {
"id": "byFrameRefID",
"value": "H"
},
"properties": {
"standardOptions": {
"util": "milliseconds"
}
},
"type": "special"
},
{
"matcher": {
"id": "byFrameRefID",
"value": "I"
},
"properties": {
"standardOptions": {
"util": "milliseconds"
}
},
"type": "special"
}
],
"targets": [
{
"expr": "sum by(instance) (kafka_partition_count{job=\"$cluster_id\"})",
"legend": "Partitions",
"maxDataPoints": 240,
"refId": "A"
},
{
"expr": "sum by(instance) (kafka_server_connection_count{job=\"$cluster_id\"})",
"legend": "Connections",
"maxDataPoints": 240,
"refId": "B"
},
{
"expr": "sum by(instance) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"in\"}[$__rate_interval]))",
"legend": "Bytes In",
"maxDataPoints": 240,
"refId": "C"
},
{
"expr": "sum by(instance) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", direction=\"out\"}[$__rate_interval]))",
"legend": "Bytes Out",
"maxDataPoints": 240,
"refId": "D"
},
{
"expr": "sum by(instance) (rate(kafka_message_count_total{job=\"$cluster_id\", direction=\"in\"}[$__rate_interval]))",
"legend": "Msgs In",
"maxDataPoints": 240,
"refId": "E"
},
{
"expr": "sum by(instance) (rate(kafka_request_count_total{job=\"$cluster_id\", type=\"Produce\"}[$__rate_interval]))",
"legend": "Produce",
"maxDataPoints": 240,
"refId": "F"
},
{
"expr": "sum by(instance) (rate(kafka_request_count_total{job=\"$cluster_id\", type=\"Fetch\"}[$__rate_interval]))",
"legend": "Fetch",
"maxDataPoints": 240,
"refId": "G"
},
{
"expr": "sum by(instance) (kafka_request_time_99p_milliseconds{job=\"$cluster_id\", type=\"Produce\"})",
"legend": "Produce P99",
"maxDataPoints": 240,
"refId": "H"
},
{
"expr": "sum by(instance) (kafka_request_time_99p_milliseconds{job=\"$cluster_id\", type=\"Fetch\"})",
"legend": "Fetch P99",
"maxDataPoints": 240,
"refId": "I"
},
{
"expr": "sum by(instance) (rate(kafka_topic_request_failed_total{job=\"$cluster_id\", type=\"produce\"}[$__rate_interval]))",
"legend": "Failed Produce",
"maxDataPoints": 240,
"refId": "J"
},
{
"expr": "sum by(instance) (rate(kafka_topic_request_failed_total{job=\"$cluster_id\", type=\"fetch\"}[$__rate_interval]))",
"legend": "Failed Fetch",
"maxDataPoints": 240,
"refId": "K"
},
{
"expr": "sum by(instance) (rate(kafka_request_error_count_total{job=\"$cluster_id\", error!=\"NONE\"}[$__rate_interval]))",
"legend": "Error Request",
"maxDataPoints": 240,
"refId": "L"
}
],
"transformations": [
{
"id": "organize",
"options": {
"renameByName": {
"instance": "Node ID"
}
}
}
],
"type": "table",
"version": "3.0.0"
}
],
"var": [
{
"definition": "prometheus",
"name": "DS_PROMETHEUS",
"type": "datasource"
},
{
"allOption": false,
"datasource": {
"cate": "prometheus",
"value": "${DS_PROMETHEUS}"
},
"definition": "label_values(process_runtime_jvm_cpu_utilization_ratio,job)",
"hide": false,
"multi": false,
"name": "cluster_id",
"reg": "",
"type": "query"
},
{
"datasource": {
"cate": "prometheus",
"value": "${DS_PROMETHEUS}"
},
"definition": "label_values(kafka_controller_active_count{job=\"$cluster_id\"} \u003e 0, instance)",
"hide": false,
"multi": false,
"name": "active_controller",
"reg": "",
"type": "query"
}
],
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327162929000
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,238 @@
{
"id": 0,
"group_id": 0,
"name": "Group Metrics",
"ident": "automq-group-metrics",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"links": [],
"panels": [
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "cac8a249-bb61-4c2d-bc90-91a7dac58f3b",
"layout": {
"h": 5,
"i": "cac8a249-bb61-4c2d-bc90-91a7dac58f3b",
"isResizable": true,
"w": 12,
"x": 0,
"y": 0
},
"links": [],
"maxPerRow": 4,
"name": "Consumer Throughput",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "hidden",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "desc"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum by(consumer_group, topic, partition) (rate(kafka_group_commit_offset{job=\"$cluster_id\", consumer_group=~\"$group_id\", topic=~\"$topic\", partition=~\"$partition\"}[$__rate_interval]))",
"legend": "{{consumer_group}}#{{topic}}-{{partition}}",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "fc0afd7c-0161-4ee4-88de-81c74f432769",
"layout": {
"h": 5,
"i": "12e7bb88-2851-44ea-a311-44ebcdb0e7b7",
"isResizable": true,
"w": 12,
"x": 12,
"y": 0
},
"links": [],
"maxPerRow": 4,
"name": "Consumer Lag",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "hidden",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "desc"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum by(topic) (max by(topic, partition) (kafka_log_end_offset{job=\"$cluster_id\", topic=~\"$topic\", partition=~\"$partition\"}))\n- on(topic) group_left(consumer_group)\nsum by(consumer_group, topic) (max by(consumer_group, topic, partition) (kafka_group_commit_offset{job=\"$cluster_id\", consumer_group=~\"$group_id\", topic=~\"$topic\", partition=~\"$partition\"}))",
"legend": "{{consumer_group}}#{{topic}}-{{partition}}",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
}
],
"var": [
{
"definition": "prometheus",
"hide": false,
"name": "TSDB",
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${TSDB}"
},
"definition": "label_values(process_runtime_jvm_cpu_utilization_ratio,job)",
"hide": false,
"multi": false,
"name": "cluster_id",
"reg": "",
"type": "query"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${TSDB}"
},
"definition": "label_values(kafka_group_commit_offset,consumer_group)",
"hide": false,
"multi": true,
"name": "group_id",
"reg": "",
"type": "query"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${TSDB}"
},
"definition": "label_values(kafka_group_commit_offset,topic)",
"hide": false,
"multi": true,
"name": "topic",
"reg": "",
"type": "query"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${TSDB}"
},
"definition": "label_values(kafka_group_commit_offset,partition)",
"hide": false,
"multi": true,
"name": "partition",
"reg": "",
"type": "query"
}
],
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327172992000
}

View File

@@ -0,0 +1,729 @@
{
"id": 0,
"group_id": 0,
"name": "Topic Metrics",
"ident": "automq-topic-metrics",
"tags": "",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"links": [],
"panels": [
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "d4df5a68-ae8b-40e9-8f88-cd2e3f88e783",
"layout": {
"h": 3,
"i": "d4df5a68-ae8b-40e9-8f88-cd2e3f88e783",
"isResizable": true,
"w": 5,
"x": 0,
"y": 0
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "rgba(44, 157, 61, 1)",
"type": "base",
"value": null
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "sum by(job) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", topic=~\"$topic\", partition=~\"$partition\", direction=\"in\"}[$__rate_interval]))",
"legend": "Bytes In Total",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "52e25ff6-5ef8-4237-a49d-85473f9f90af",
"layout": {
"h": 3,
"i": "52e25ff6-5ef8-4237-a49d-85473f9f90af",
"isResizable": true,
"w": 3,
"x": 5,
"y": 0
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"decimals": 2,
"util": "bytesIEC"
},
"thresholds": {
"steps": [
{
"color": "rgba(148, 112, 255, 1)",
"type": "base",
"value": null
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "sum by(topic) (kafka_log_size{job=\"$cluster_id\", topic=~\"$topic\"})",
"legend": "Size",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.15,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "75a6d933-f8d8-46f8-8cf0-9ef9dcc4e86b",
"layout": {
"h": 6,
"i": "75a6d933-f8d8-46f8-8cf0-9ef9dcc4e86b",
"isResizable": true,
"w": 8,
"x": 8,
"y": 0
},
"links": [],
"maxPerRow": 4,
"name": "Messages In",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "hidden",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "single"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum by(topic) (rate(kafka_message_count_total{job=\"$cluster_id\", topic=~\"$topic\", direction=\"in\"}[$__rate_interval]))",
"legend": "{{topic}}",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.15,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "f1bbfda3-0fd8-4b85-b725-222f992fbbc9",
"layout": {
"h": 6,
"i": "f1bbfda3-0fd8-4b85-b725-222f992fbbc9",
"isResizable": true,
"w": 8,
"x": 16,
"y": 0
},
"links": [],
"maxPerRow": 4,
"name": "Request Throughput",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "hidden",
"placement": "bottom"
},
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "single"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum by(topic, type) (rate(kafka_topic_request_count_total{job=\"$cluster_id\", topic=~\"$topic\"}[$__rate_interval]))",
"legend": "{{type}}",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "56a85016-ca99-4495-be6a-53de1366a396",
"layout": {
"h": 3,
"i": "56a85016-ca99-4495-be6a-53de1366a396",
"isResizable": true,
"w": 5,
"x": 0,
"y": 3
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "rgba(44, 157, 61, 1)",
"type": "base",
"value": null
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "sum by(job) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", topic=~\"$topic\", partition=~\"$partition\", direction=\"out\"}[$__rate_interval]))",
"legend": "Bytes Out Total",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colSpan": 1,
"colorMode": "background",
"graphMode": "none",
"textMode": "valueAndName",
"textSize": {},
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "6efe4439-00ab-41d8-a4f0-b2117ad13648",
"layout": {
"h": 3,
"i": "6efe4439-00ab-41d8-a4f0-b2117ad13648",
"isResizable": true,
"w": 3,
"x": 5,
"y": 3
},
"links": [],
"maxPerRow": 4,
"options": {
"standardOptions": {
"util": "none"
},
"thresholds": {
"steps": [
{
"color": "rgba(148, 112, 255, 1)",
"type": "base",
"value": null
}
]
},
"valueMappings": []
},
"targets": [
{
"expr": "count by(topic) (kafka_log_size{job=\"$cluster_id\", topic=~\"$topic\"})",
"legend": "Partition Count",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "stat",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "f3da44a7-bcb6-4b92-a5f9-b7e6856ced1a",
"layout": {
"h": 6,
"i": "f3da44a7-bcb6-4b92-a5f9-b7e6856ced1a",
"isResizable": true,
"w": 8,
"x": 0,
"y": 6
},
"links": [],
"maxPerRow": 4,
"name": "Size",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"decimals": 1,
"util": "bytesIEC"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "single"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum by(topic) (kafka_log_size{job=\"$cluster_id\", topic=~\"$topic\"})",
"legend": "{{topic}}",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.15,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "1354e591-5030-42f0-a3c3-eeb1e7c0a537",
"layout": {
"h": 6,
"i": "1354e591-5030-42f0-a3c3-eeb1e7c0a537",
"isResizable": true,
"w": 8,
"x": 8,
"y": 6
},
"links": [],
"maxPerRow": 4,
"name": "Bytes In",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"decimals": 1,
"util": "bytesSecIEC"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "desc"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum by(topic, partition) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", topic=~\"$topic\", direction=\"in\", partition=~\"$partition\"}[$__rate_interval]))",
"legend": "{{topic}}-{{partition}}",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.15,
"gradientMode": "none",
"lineInterpolation": "linear",
"lineWidth": 1,
"scaleDistribution": {
"type": "linear"
},
"spanNulls": false,
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "a91a656b-e5b1-4265-ba88-f1881b324137",
"layout": {
"h": 6,
"i": "a91a656b-e5b1-4265-ba88-f1881b324137",
"isResizable": true,
"w": 8,
"x": 16,
"y": 6
},
"links": [],
"maxPerRow": 4,
"name": "Bytes Out",
"options": {
"legend": {
"behaviour": "showItem",
"displayMode": "list",
"placement": "bottom"
},
"standardOptions": {
"decimals": 1,
"util": "bytesSecIEC"
},
"thresholds": {
"steps": [
{
"color": "#73BF69",
"type": "base",
"value": null
}
]
},
"tooltip": {
"mode": "all",
"sort": "desc"
},
"valueMappings": []
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
},
"properties": {
"rightYAxisDisplay": "off"
}
}
],
"targets": [
{
"expr": "sum by(topic, partition) (rate(kafka_network_io_bytes_total{job=\"$cluster_id\", topic=~\"$topic\", direction=\"out\", partition=~\"$partition\"}[$__rate_interval]))",
"legend": "{{topic}}-{{partition}}",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "timeseries",
"version": "3.0.0"
},
{
"custom": {
"calc": "lastNotNull",
"colorMode": "value",
"columns": [],
"displayMode": "labelsOfSeriesToRows",
"linkMode": "appendLinkColumn",
"showHeader": true
},
"datasourceCate": "prometheus",
"datasourceValue": "${TSDB}",
"id": "5c3e188e-3d7c-4bc9-b8c7-c19c39a8d396",
"layout": {
"h": 4,
"i": "5c3e188e-3d7c-4bc9-b8c7-c19c39a8d396",
"isResizable": true,
"w": 24,
"x": 0,
"y": 12
},
"maxPerRow": 4,
"name": "Consume group lag",
"options": {
"standardOptions": {}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID"
}
}
],
"targets": [
{
"expr": "sum by(topic) (max by(topic, partition) (kafka_log_end_offset{job=\"$cluster_id\", topic=~\"$topic\", partition=~\"$partition\"}))\n- on(topic) group_left(consumer_group)\nsum by(consumer_group, topic) (max by(consumer_group, topic, partition) (kafka_group_commit_offset{job=\"$cluster_id\", topic=~\"$topic\", partition=~\"$partition\"}))",
"maxDataPoints": 240,
"refId": "A"
}
],
"transformations": [
{
"id": "organize",
"options": {}
}
],
"type": "table",
"version": "3.0.0"
}
],
"var": [
{
"definition": "prometheus",
"hide": false,
"name": "TSDB",
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${TSDB}"
},
"definition": "label_values(process_runtime_jvm_cpu_utilization_ratio,job)",
"hide": false,
"multi": false,
"name": "cluster_id",
"reg": "",
"type": "query"
},
{
"allOption": true,
"datasource": {
"cate": "prometheus",
"value": "${TSDB}"
},
"definition": "label_values(kafka_log_size,topic)",
"hide": false,
"multi": true,
"name": "topic",
"reg": "",
"type": "query"
},
{
"allOption": true,
"allValue": ".*",
"datasource": {
"cate": "prometheus",
"value": "${TSDB}"
},
"definition": "label_values(kafka_log_size{topic=\"$topic\"},partition)",
"hide": false,
"multi": true,
"name": "partition",
"reg": "",
"type": "query"
}
],
"version": "3.0.0"
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327174664000
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -0,0 +1,20 @@
## 前言
AuthMQ 官方文档提供了指标吐出方式以及和监控系统的整合方式,具体可以参考[AutoMQ](https://docs.automq.com/zh/docs/automq-opensource/LkwkwdQlwizjqckhj0dcc2IdnDh)。
## 推荐方式
建议采用 AutoMQ 文档中的方案二:使用 Prometheus OTLP Receiver 的方式,把所有的指标都收集到 OTel Collector 中,然后使用 Prometheus 或者 Categraf 直接去拉取数据即可。假如使用 Categraf就是使用 prometheus 插件去拉取数据,比如我们为 prometheus 插件提供一个单独的 automq.toml 的配置文件:`conf/input.prometheus/automq.toml` ,内容如下:
```toml
[[instances]]
urls = [
"http://<otel-collector-ip>:<otel-collector-port>/metrics"
]
url_label_key = "otel_collector"
url_label_value = "{{.Host}}"
```
注意url_label_key 一般都是指定为 instance但是这里故意指定为其他字符串是因为 AutoMQ 原始的指标中包含了 instance 标签,为了避免冲突,所以指定为其他字符串。

View File

@@ -0,0 +1,887 @@
[
{
"id": 0,
"uuid": 1717556327176351000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Broker节点入站网络IO速率",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_network_io_bytes_total{direction=\"in\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327179998000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Broker节点出站网络IO速率",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_network_io_bytes_total{direction=\"out\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327182502000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Broker节点当前分配的分区数量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "kafka_partition_count",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327184905000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Broker节点每秒消息吞吐量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_message_count_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327187098000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Consumer Group提交偏移量总和",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, consumer_group, topic) (max by(job, consumer_group, topic, partition) (kafka_group_commit_offset))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327189255000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Consumer Group提交偏移量速率每个实例",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, consumer_group, topic, partition) (rate(kafka_group_commit_offset[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327191388000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Consumer Group数量总和",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (kafka_group_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327193321000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Consumer Group最大提交偏移量",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "max by(job, consumer_group, topic, partition) (kafka_group_commit_offset)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327195219000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Fetch请求处理时间的50分位数",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_50p_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327197092000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Fetch请求处理时间的99分位数",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_99p_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327198909000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Fetch请求处理时间的99分位数每个实例",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "avg by(job, instance) (kafka_request_time_99p_milliseconds)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327201071000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Fetch请求处理时间的平均值",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_mean_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327202824000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Fetch请求处理时间的最大值",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_max_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327204459000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Fetch请求失败速率每个实例",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_topic_request_failed_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327206530000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Kafka Controller活跃状态计数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job) (kafka_controller_active_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327208370000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Produce请求处理时间的50分位数",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_50p_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327210667000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Produce请求处理时间的99分位数",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_99p_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327212669000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Produce请求处理时间的99分位数每个实例",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "avg by(job, instance) (kafka_request_time_99p_milliseconds)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327214580000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Produce请求处理时间的平均值",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_mean_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327217055000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Produce请求处理时间的最大值",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "kafka_request_time_max_milliseconds",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327219060000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "Produce请求失败速率每个实例",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_topic_request_failed_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327221295000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "各个Consumer Group和Topic的最大提交偏移量",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "max by(job, consumer_group, topic, partition) (kafka_group_commit_offset)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327223767000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "各个Topic分区的最大日志结束偏移量",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "max by(job, topic, partition) (kafka_log_end_offset)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327225577000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "实例的Fetch请求速率",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance, topic) (rate(kafka_request_count_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327227527000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "实例的Produce请求速率",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance, topic) (rate(kafka_request_count_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327229750000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "已死亡的Consumer Group数量总和",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (kafka_group_dead_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327231514000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "日志大小总和",
"unit": "bytesSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (max by(job, topic, partition) (kafka_log_size))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327233243000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "日志消费延迟 lag",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic) (max by(job, topic, partition) (kafka_log_end_offset{}))\n- on(job, topic) group_left(consumer_group)\nsum by(job, consumer_group, topic) (max by(job, consumer_group, topic, partition) (kafka_group_commit_offset{}))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327236120000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "日志结束偏移量总和",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic) (max by(job, topic, partition) (kafka_log_end_offset))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327237878000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "日志结束最大偏移量",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "max by(job, topic, partition) (kafka_log_end_offset)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327240138000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "正在准备进行rebalance的Consumer Group数量总和",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (kafka_group_preparing_rebalance_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327241777000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "正在等待Leader进行状态分配的Consumer Group数量总和",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (kafka_group_completing_rebalance_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327243616000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点入站网络IO速率sum by(topic)",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic) (rate(kafka_network_io_bytes_total{direction=\"in\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327245855000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点入站网络IO速率sum by(topic, instance)",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic, instance) (rate(kafka_network_io_bytes_total{direction=\"in\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327247589000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点出站网络IO速率sum by(topic)",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic) (rate(kafka_network_io_bytes_total{direction=\"out\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327249421000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点出站网络IO速率sum by(topic, instance)",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic, instance) (rate(kafka_network_io_bytes_total{direction=\"out\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327251637000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点出站网络IO速率sum by(topic, partition)",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic, partition) (rate(kafka_network_io_bytes_total{direction=\"out\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327253444000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点消息吞吐量入站sum by(topic)",
"unit": "mps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic) (rate(kafka_message_count_total{direction=\"in\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327255550000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点消息吞吐量入站sum by(topic, instance)",
"unit": "mps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic, instance) (rate(kafka_message_count_total{direction=\"in\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327257265000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的Broker节点网络IO速率集群级别",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job) (rate(kafka_network_io_bytes_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327259010000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的日志大小",
"unit": "bytesSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic) (kafka_log_size)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327260869000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的消息吞吐量sum by(topic, type)",
"unit": "mps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic, type) (rate(kafka_message_count_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327262606000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个Topic的请求计数sum by(topic, type)",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, topic, type) (rate(kafka_topic_request_count_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327264897000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个实例的Broker节点出站网络IO速率(实例级别)",
"unit": "bytesSecSI",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_network_io_bytes_total{direction=\"out\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327267156000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个实例的Broker节点分区数量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (kafka_partition_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327269529000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个实例的Broker节点消息吞吐量入站",
"unit": "mps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_message_count_total{direction=\"in\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327271703000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个实例的Fetch请求速率",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_request_count_total{type=\"Fetch\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327273861000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个实例的Produce请求速率",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_request_count_total{type=\"Produce\"}[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327276362000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "每个实例的节点当前建立的连接数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (kafka_server_connection_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327278608000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "活跃Broker数量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "kafka_broker_active_count",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327280516000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "稳定状态的Consumer Group数量总和",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (kafka_group_stable_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327282783000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "空的Consumer Group数量总和",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (kafka_group_empty_count)",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327284934000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "节点当前建立的连接数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "kafka_server_connection_count",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327287401000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "被fence的Broker数量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "kafka_broker_fenced_count",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327291657000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "请求错误计数总和",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "sum by (job) (rate(kafka_request_error_count_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327295172000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "请求错误计数率",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "rate(kafka_request_error_count_total[1m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327297787000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "请求错误计数率(每个实例)",
"unit": "reqps",
"note": "",
"lang": "zh_CN",
"expression": "sum by(job, instance) (rate(kafka_request_error_count_total[1m]))",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327300342000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "集群Topic总数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "kafka_topic_count",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327302857000,
"collector": "Exporter",
"typ": "AutoMQ",
"name": "集群分区总数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "kafka_partition_total_count",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
}
]

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,13 @@
{
"id": 0,
"group_id": 0,
"name": "AWS RDS Telegraf",
"tags": "AWS Cloudwatch Telegraf",
"ident": "",
"tags": "AWS Cloudwatch Telegraf",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
@@ -26,6 +32,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds cpu 利用率平均值",
"id": "2002c9f5-6177-4239-a0c6-2981edacae5a",
"layout": {
@@ -63,9 +71,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -74,6 +80,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 数据库连接平均值",
"id": "c54b9dca-88ce-425a-bf75-6d8b363f6ebb",
"layout": {
@@ -111,9 +119,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -122,6 +128,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 可用存储空间平均值",
"id": "997a6214-2ac0-46c6-a0b9-046810b2b8cf",
"layout": {
@@ -159,9 +167,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -170,6 +176,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 可用内存平均值",
"id": "6c00311c-e931-487f-b088-3a3bfafc84ef",
"layout": {
@@ -207,9 +215,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -218,6 +224,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds lvm 写入 iops 平均值",
"id": "990ab5a1-4aa5-47c3-b7b7-a65f63459119",
"layout": {
@@ -250,9 +258,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -261,6 +267,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 读取 iops 平均值",
"id": "a61a80da-7d0a-45a5-a868-bd442b3aa4cf",
"layout": {
@@ -293,9 +301,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -304,6 +310,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 写入吞吐量平均值",
"id": "2e605342-3413-4004-9fcf-3dbbfa7e7be3",
"layout": {
@@ -336,9 +344,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -347,6 +353,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 读取吞吐量平均值",
"id": "1ef3f98d-1b54-408a-8cc2-4570c327d705",
"layout": {
@@ -379,9 +387,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -405,6 +411,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 网络接收吞吐量平均",
"id": "4ba500c9-e87e-41e4-bbc1-82fec507da9d",
"layout": {
@@ -437,9 +445,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -448,6 +454,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 网络传输吞吐量平均值",
"id": "edee8285-1274-4ddc-b166-fb773c764c2b",
"layout": {
@@ -480,9 +488,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -491,6 +497,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 写入延迟平均值",
"id": "ecb9b8a5-b168-4a65-b7f6-7912ab6c6b22",
"layout": {
@@ -523,9 +531,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -534,6 +540,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 读取延迟平均值",
"id": "60d009fa-e547-45be-a862-9b156c15b675",
"layout": {
@@ -566,9 +574,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -592,6 +598,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 磁盘队列深度平均值",
"id": "7edcf2a8-16f3-49ef-9026-e53dc5e72c69",
"layout": {
@@ -624,9 +632,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -635,6 +641,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 二进制日志磁盘使用情况 (MB)",
"id": "42143731-22a9-45b4-bb1e-ddb8f2c11a70",
"layout": {
@@ -667,9 +675,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -678,6 +684,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 交换分区使用平均值",
"id": "51c6f9d9-30db-4514-a54d-712e1a570b23",
"layout": {
@@ -710,9 +718,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -721,6 +727,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"description": "* Telegraf Gather AWS Cloudwatch RDS\n* cloudwatch aws rds 突发余额平均值",
"id": "767bcc71-3f71-443a-9713-03f587ccc350",
"layout": {
@@ -755,37 +763,41 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
}
],
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
"type": "datasource"
},
{
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
},
"definition": "label_values(cloudwatch_aws_rds_cpu_utilization_average, region)",
"multi": false,
"name": "region",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
"type": "query"
},
{
"definition": "label_values(cloudwatch_aws_rds_cpu_utilization_average{region=\"$region\"}, db_instance_identifier)",
"name": "instance",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
},
"definition": "label_values(cloudwatch_aws_rds_cpu_utilization_average{region=\"$region\"}, db_instance_identifier)",
"name": "instance",
"type": "query"
}
],
"version": "3.0.0"
}
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327336057000
}

View File

@@ -1,7 +1,13 @@
{
"id": 0,
"group_id": 0,
"name": "ElasticSearch",
"tags": "ElasticSearch Prometheus",
"ident": "",
"tags": "ElasticSearch Prometheus",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
@@ -14,6 +20,7 @@
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f70f4198-dec2-40c0-97d9-6986c7001e73",
"layout": {
"h": 3,
@@ -84,8 +91,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -95,6 +101,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7dafe232-ee30-479b-a2f1-e1064572c154",
"layout": {
"h": 3,
@@ -115,9 +123,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -127,6 +133,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "447fb784-a7e4-41cf-820f-6086837590e6",
"layout": {
"h": 3,
@@ -147,9 +155,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -159,6 +165,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f0375f72-4ca1-474f-81e9-ce6b64f22204",
"layout": {
"h": 3,
@@ -211,9 +219,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -223,6 +229,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "288ee5f1-b484-43f5-86bf-5b81c01b3c2c",
"layout": {
"h": 3,
@@ -275,9 +283,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -287,6 +293,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4dd345c1-2bc1-474e-83b1-153be10a5b5b",
"layout": {
"h": 3,
@@ -327,9 +335,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -353,6 +359,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "15882e6f-0585-4035-bfb6-71cb9caaa0a8",
"layout": {
"h": 4,
@@ -382,9 +390,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -400,6 +406,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "8adbc8e4-f630-4a25-98e3-ee03dec92011",
"layout": {
"h": 4,
@@ -437,8 +444,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -463,6 +469,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7aec074e-1672-4dbb-8529-28292f9a4221",
"layout": {
"h": 3,
@@ -483,9 +491,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -495,6 +501,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f138daa7-b98f-4575-89e3-42363a8102c9",
"layout": {
"h": 3,
@@ -515,9 +523,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -527,6 +533,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7412543a-dba5-4624-96ff-11e30b7e8ff4",
"layout": {
"h": 3,
@@ -547,9 +555,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -559,6 +565,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "2f26f24f-2a79-4552-b79d-60b41fa3aee6",
"layout": {
"h": 3,
@@ -579,9 +587,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -591,6 +597,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "394a83cc-f4e1-467e-83fa-b77d2c2be907",
"layout": {
"h": 3,
@@ -611,9 +619,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -623,6 +629,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "720b9719-5c37-44d9-bce8-539308afa6ae",
"layout": {
"h": 3,
@@ -643,9 +651,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -666,11 +672,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ee0c56e0-8f8e-4cbe-ac41-de2afad7b75a",
"layout": {
"h": 4,
@@ -705,19 +713,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "5c361278-8a94-4b16-afdd-e6def804b9ff",
"layout": {
"h": 4,
@@ -752,9 +760,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -770,6 +776,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ff81d109-79e5-4909-8765-857a75cebf17",
"layout": {
"h": 4,
@@ -810,8 +817,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -827,6 +833,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "d7c76456-8f34-4e1b-843b-9d174bbdfcee",
"layout": {
"h": 4,
@@ -867,18 +874,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a0096936-3790-40a1-b2ad-d7805945b948",
"layout": {
"h": 4,
@@ -911,9 +919,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -934,11 +940,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "45aafb11-c694-4686-89ab-685068f91560",
"layout": {
"h": 4,
@@ -968,19 +976,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "09ca6329-8eec-4a61-b19e-9bbeea2b9712",
"layout": {
"h": 4,
@@ -1013,9 +1021,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1036,11 +1042,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "6c0d9b3c-dda5-4da9-825e-33f650dbb008",
"layout": {
"h": 4,
@@ -1072,19 +1080,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4f7ce5a7-2771-4cbf-a569-b1a90b070b93",
"layout": {
"h": 4,
@@ -1119,9 +1127,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1142,11 +1148,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "e98839c4-e3f3-4e6e-be3a-c44b70e6072c",
"layout": {
"h": 4,
@@ -1176,19 +1184,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "45c4e3d9-90f1-41bd-8169-1d8c0a921ba9",
"layout": {
"h": 4,
@@ -1218,19 +1226,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "3b2a922d-4423-4845-8cfc-95970f3300d6",
"layout": {
"h": 4,
@@ -1260,19 +1268,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "764fbcf7-3056-41ef-b62a-51813a6c315f",
"layout": {
"h": 4,
@@ -1302,19 +1310,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7cc04ae4-946d-4837-9ea9-764a7cc2eecd",
"layout": {
"h": 4,
@@ -1347,9 +1355,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1370,11 +1376,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ad0445b0-8539-440d-bbf4-712450132a7a",
"layout": {
"h": 4,
@@ -1404,19 +1412,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c3cf6c57-c4ce-4bc2-a150-df32c4951144",
"layout": {
"h": 4,
@@ -1446,19 +1454,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "022db454-70ba-49f5-8c11-f89b76d145cb",
"layout": {
"h": 4,
@@ -1488,19 +1496,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f20bad4f-656c-428a-a1cf-aafb7d92137c",
"layout": {
"h": 4,
@@ -1530,9 +1538,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1553,11 +1559,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "cefafeb9-fc8a-4c73-92b3-648cd6f08b11",
"layout": {
"h": 4,
@@ -1587,19 +1595,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "0ab67903-16ea-4001-b784-ae04d8b815c0",
"layout": {
"h": 4,
@@ -1629,19 +1637,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "bb5dc07d-673b-4e2d-b44c-441acfa7c27b",
"layout": {
"h": 4,
@@ -1671,19 +1679,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4cac1498-c141-483f-97c6-e1177317a2ea",
"layout": {
"h": 4,
@@ -1713,9 +1721,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1736,11 +1742,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "5247f393-a934-4d9e-be0f-40b177d2be80",
"layout": {
"h": 4,
@@ -1773,19 +1781,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b87c56f7-4e50-4d15-8bcd-1218fee879d9",
"layout": {
"h": 4,
@@ -1818,19 +1826,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ae2d0a7a-b6cd-4fd5-99d4-3c4289b8b5a8",
"layout": {
"h": 4,
@@ -1863,19 +1871,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "78e4badc-8d51-4aa6-81c5-d1c9183810a2",
"layout": {
"h": 4,
@@ -1908,19 +1916,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "296b43f1-2f33-492a-bce8-6f0fde1e7b52",
"layout": {
"h": 4,
@@ -1953,9 +1961,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1975,11 +1981,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "1537acaa-d5ce-48c5-b740-26fd543eb120",
"layout": {
"h": 4,
@@ -2009,19 +2017,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a1c34fa4-4549-41a6-8d31-d25e7d860106",
"layout": {
"h": 4,
@@ -2051,16 +2059,14 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
}
],
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
"type": "datasource"
},
{
"datasource": {
@@ -2084,5 +2090,11 @@
}
],
"version": "3.0.0"
}
}
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327369517000
}

View File

@@ -1,7 +1,13 @@
{
"id": 0,
"group_id": 0,
"name": "ElasticSearch, group by service",
"tags": "ElasticSearch Prometheus Categraf",
"ident": "",
"tags": "ElasticSearch Prometheus Categraf",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
@@ -14,6 +20,7 @@
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f70f4198-dec2-40c0-97d9-6986c7001e73",
"layout": {
"h": 3,
@@ -84,8 +91,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -95,6 +101,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7dafe232-ee30-479b-a2f1-e1064572c154",
"layout": {
"h": 3,
@@ -115,9 +123,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -127,6 +133,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "447fb784-a7e4-41cf-820f-6086837590e6",
"layout": {
"h": 3,
@@ -147,9 +155,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -159,6 +165,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f0375f72-4ca1-474f-81e9-ce6b64f22204",
"layout": {
"h": 3,
@@ -211,9 +219,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -223,6 +229,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "288ee5f1-b484-43f5-86bf-5b81c01b3c2c",
"layout": {
"h": 3,
@@ -275,9 +283,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -287,6 +293,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4dd345c1-2bc1-474e-83b1-153be10a5b5b",
"layout": {
"h": 3,
@@ -327,9 +335,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -353,6 +359,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "15882e6f-0585-4035-bfb6-71cb9caaa0a8",
"layout": {
"h": 4,
@@ -382,9 +390,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -400,6 +406,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "8adbc8e4-f630-4a25-98e3-ee03dec92011",
"layout": {
"h": 4,
@@ -437,8 +444,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -463,6 +469,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7aec074e-1672-4dbb-8529-28292f9a4221",
"layout": {
"h": 3,
@@ -483,9 +491,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -495,6 +501,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f138daa7-b98f-4575-89e3-42363a8102c9",
"layout": {
"h": 3,
@@ -515,9 +523,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -527,6 +533,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7412543a-dba5-4624-96ff-11e30b7e8ff4",
"layout": {
"h": 3,
@@ -547,9 +555,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -559,6 +565,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "2f26f24f-2a79-4552-b79d-60b41fa3aee6",
"layout": {
"h": 3,
@@ -579,9 +587,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -591,6 +597,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "394a83cc-f4e1-467e-83fa-b77d2c2be907",
"layout": {
"h": 3,
@@ -611,9 +619,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -623,6 +629,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "720b9719-5c37-44d9-bce8-539308afa6ae",
"layout": {
"h": 3,
@@ -643,9 +651,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -666,11 +672,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ee0c56e0-8f8e-4cbe-ac41-de2afad7b75a",
"layout": {
"h": 4,
@@ -705,19 +713,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "5c361278-8a94-4b16-afdd-e6def804b9ff",
"layout": {
"h": 4,
@@ -752,9 +760,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -770,6 +776,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ff81d109-79e5-4909-8765-857a75cebf17",
"layout": {
"h": 4,
@@ -810,8 +817,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -827,6 +833,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "d7c76456-8f34-4e1b-843b-9d174bbdfcee",
"layout": {
"h": 4,
@@ -867,18 +874,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a0096936-3790-40a1-b2ad-d7805945b948",
"layout": {
"h": 4,
@@ -911,9 +919,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -934,11 +940,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "45aafb11-c694-4686-89ab-685068f91560",
"layout": {
"h": 4,
@@ -968,19 +976,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "09ca6329-8eec-4a61-b19e-9bbeea2b9712",
"layout": {
"h": 4,
@@ -1013,9 +1021,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1036,11 +1042,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "6c0d9b3c-dda5-4da9-825e-33f650dbb008",
"layout": {
"h": 4,
@@ -1072,19 +1080,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4f7ce5a7-2771-4cbf-a569-b1a90b070b93",
"layout": {
"h": 4,
@@ -1119,9 +1127,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1142,11 +1148,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "e98839c4-e3f3-4e6e-be3a-c44b70e6072c",
"layout": {
"h": 4,
@@ -1176,19 +1184,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "45c4e3d9-90f1-41bd-8169-1d8c0a921ba9",
"layout": {
"h": 4,
@@ -1218,19 +1226,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "3b2a922d-4423-4845-8cfc-95970f3300d6",
"layout": {
"h": 4,
@@ -1260,19 +1268,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "764fbcf7-3056-41ef-b62a-51813a6c315f",
"layout": {
"h": 4,
@@ -1302,19 +1310,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7cc04ae4-946d-4837-9ea9-764a7cc2eecd",
"layout": {
"h": 4,
@@ -1347,9 +1355,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1370,11 +1376,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ad0445b0-8539-440d-bbf4-712450132a7a",
"layout": {
"h": 4,
@@ -1404,19 +1412,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c3cf6c57-c4ce-4bc2-a150-df32c4951144",
"layout": {
"h": 4,
@@ -1446,19 +1454,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "022db454-70ba-49f5-8c11-f89b76d145cb",
"layout": {
"h": 4,
@@ -1488,19 +1496,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f20bad4f-656c-428a-a1cf-aafb7d92137c",
"layout": {
"h": 4,
@@ -1530,9 +1538,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1553,11 +1559,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "cefafeb9-fc8a-4c73-92b3-648cd6f08b11",
"layout": {
"h": 4,
@@ -1587,19 +1595,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "0ab67903-16ea-4001-b784-ae04d8b815c0",
"layout": {
"h": 4,
@@ -1629,19 +1637,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "bb5dc07d-673b-4e2d-b44c-441acfa7c27b",
"layout": {
"h": 4,
@@ -1671,19 +1679,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4cac1498-c141-483f-97c6-e1177317a2ea",
"layout": {
"h": 4,
@@ -1713,9 +1721,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1736,11 +1742,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "5247f393-a934-4d9e-be0f-40b177d2be80",
"layout": {
"h": 4,
@@ -1773,19 +1781,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b87c56f7-4e50-4d15-8bcd-1218fee879d9",
"layout": {
"h": 4,
@@ -1818,19 +1826,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ae2d0a7a-b6cd-4fd5-99d4-3c4289b8b5a8",
"layout": {
"h": 4,
@@ -1863,19 +1871,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "78e4badc-8d51-4aa6-81c5-d1c9183810a2",
"layout": {
"h": 4,
@@ -1908,19 +1916,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "296b43f1-2f33-492a-bce8-6f0fde1e7b52",
"layout": {
"h": 4,
@@ -1953,9 +1961,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1975,11 +1981,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "1537acaa-d5ce-48c5-b740-26fd543eb120",
"layout": {
"h": 4,
@@ -2009,19 +2017,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a1c34fa4-4549-41a6-8d31-d25e7d860106",
"layout": {
"h": 4,
@@ -2051,16 +2059,14 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
}
],
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
"type": "datasource"
},
{
"datasource": {
@@ -2084,5 +2090,11 @@
}
],
"version": "3.0.0"
}
}
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327373675000
}

View File

@@ -1,7 +1,13 @@
{
"id": 0,
"group_id": 0,
"name": "ElasticSearch, group by cluster",
"tags": "ElasticSearch Categraf",
"ident": "",
"tags": "ElasticSearch Categraf",
"create_at": 0,
"create_by": "",
"update_at": 0,
"update_by": "",
"configs": {
"panels": [
{
@@ -14,6 +20,7 @@
"valueField": "Value"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f70f4198-dec2-40c0-97d9-6986c7001e73",
"layout": {
"h": 3,
@@ -84,8 +91,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -95,6 +101,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7dafe232-ee30-479b-a2f1-e1064572c154",
"layout": {
"h": 3,
@@ -115,9 +123,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -127,6 +133,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "447fb784-a7e4-41cf-820f-6086837590e6",
"layout": {
"h": 3,
@@ -147,9 +155,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -159,6 +165,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f0375f72-4ca1-474f-81e9-ce6b64f22204",
"layout": {
"h": 3,
@@ -211,9 +219,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -223,6 +229,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "288ee5f1-b484-43f5-86bf-5b81c01b3c2c",
"layout": {
"h": 3,
@@ -275,9 +283,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -287,6 +293,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4dd345c1-2bc1-474e-83b1-153be10a5b5b",
"layout": {
"h": 3,
@@ -327,9 +335,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -353,6 +359,8 @@
"lineInterpolation": "smooth",
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "15882e6f-0585-4035-bfb6-71cb9caaa0a8",
"layout": {
"h": 4,
@@ -382,9 +390,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -400,6 +406,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "8adbc8e4-f630-4a25-98e3-ee03dec92011",
"layout": {
"h": 4,
@@ -437,8 +444,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -463,6 +469,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7aec074e-1672-4dbb-8529-28292f9a4221",
"layout": {
"h": 3,
@@ -483,9 +491,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -495,6 +501,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f138daa7-b98f-4575-89e3-42363a8102c9",
"layout": {
"h": 3,
@@ -515,9 +523,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -527,6 +533,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7412543a-dba5-4624-96ff-11e30b7e8ff4",
"layout": {
"h": 3,
@@ -547,9 +555,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -559,6 +565,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "2f26f24f-2a79-4552-b79d-60b41fa3aee6",
"layout": {
"h": 3,
@@ -579,9 +587,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -591,6 +597,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "394a83cc-f4e1-467e-83fa-b77d2c2be907",
"layout": {
"h": 3,
@@ -611,9 +619,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -623,6 +629,8 @@
"textMode": "valueAndName",
"textSize": {}
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "720b9719-5c37-44d9-bce8-539308afa6ae",
"layout": {
"h": 3,
@@ -643,9 +651,7 @@
}
],
"type": "stat",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -666,11 +672,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ee0c56e0-8f8e-4cbe-ac41-de2afad7b75a",
"layout": {
"h": 4,
@@ -705,19 +713,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "5c361278-8a94-4b16-afdd-e6def804b9ff",
"layout": {
"h": 4,
@@ -752,9 +760,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -770,6 +776,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ff81d109-79e5-4909-8765-857a75cebf17",
"layout": {
"h": 4,
@@ -810,8 +817,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
@@ -827,6 +833,7 @@
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "d7c76456-8f34-4e1b-843b-9d174bbdfcee",
"layout": {
"h": 4,
@@ -867,18 +874,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a0096936-3790-40a1-b2ad-d7805945b948",
"layout": {
"h": 4,
@@ -911,9 +919,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -934,11 +940,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "45aafb11-c694-4686-89ab-685068f91560",
"layout": {
"h": 4,
@@ -968,19 +976,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "09ca6329-8eec-4a61-b19e-9bbeea2b9712",
"layout": {
"h": 4,
@@ -1013,9 +1021,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1036,11 +1042,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "6c0d9b3c-dda5-4da9-825e-33f650dbb008",
"layout": {
"h": 4,
@@ -1072,19 +1080,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4f7ce5a7-2771-4cbf-a569-b1a90b070b93",
"layout": {
"h": 4,
@@ -1119,9 +1127,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1142,11 +1148,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "e98839c4-e3f3-4e6e-be3a-c44b70e6072c",
"layout": {
"h": 4,
@@ -1176,19 +1184,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "45c4e3d9-90f1-41bd-8169-1d8c0a921ba9",
"layout": {
"h": 4,
@@ -1218,19 +1226,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "3b2a922d-4423-4845-8cfc-95970f3300d6",
"layout": {
"h": 4,
@@ -1260,19 +1268,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "764fbcf7-3056-41ef-b62a-51813a6c315f",
"layout": {
"h": 4,
@@ -1302,19 +1310,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "7cc04ae4-946d-4837-9ea9-764a7cc2eecd",
"layout": {
"h": 4,
@@ -1347,9 +1355,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1370,11 +1376,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ad0445b0-8539-440d-bbf4-712450132a7a",
"layout": {
"h": 4,
@@ -1404,19 +1412,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "c3cf6c57-c4ce-4bc2-a150-df32c4951144",
"layout": {
"h": 4,
@@ -1446,19 +1454,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "022db454-70ba-49f5-8c11-f89b76d145cb",
"layout": {
"h": 4,
@@ -1488,19 +1496,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "f20bad4f-656c-428a-a1cf-aafb7d92137c",
"layout": {
"h": 4,
@@ -1530,9 +1538,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1553,11 +1559,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "cefafeb9-fc8a-4c73-92b3-648cd6f08b11",
"layout": {
"h": 4,
@@ -1587,19 +1595,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "0ab67903-16ea-4001-b784-ae04d8b815c0",
"layout": {
"h": 4,
@@ -1629,19 +1637,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "bb5dc07d-673b-4e2d-b44c-441acfa7c27b",
"layout": {
"h": 4,
@@ -1671,19 +1679,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "4cac1498-c141-483f-97c6-e1177317a2ea",
"layout": {
"h": 4,
@@ -1713,9 +1721,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1736,11 +1742,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "5247f393-a934-4d9e-be0f-40b177d2be80",
"layout": {
"h": 4,
@@ -1773,19 +1781,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "b87c56f7-4e50-4d15-8bcd-1218fee879d9",
"layout": {
"h": 4,
@@ -1818,19 +1826,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "ae2d0a7a-b6cd-4fd5-99d4-3c4289b8b5a8",
"layout": {
"h": 4,
@@ -1863,19 +1871,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "78e4badc-8d51-4aa6-81c5-d1c9183810a2",
"layout": {
"h": 4,
@@ -1908,19 +1916,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "296b43f1-2f33-492a-bce8-6f0fde1e7b52",
"layout": {
"h": 4,
@@ -1953,9 +1961,7 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"collapsed": true,
@@ -1975,11 +1981,13 @@
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "1537acaa-d5ce-48c5-b740-26fd543eb120",
"layout": {
"h": 4,
@@ -2009,19 +2017,19 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
},
{
"custom": {
"drawStyle": "lines",
"fillOpacity": 0.3,
"gradientMode": "opacity",
"lineInterpolation": "smooth",
"stack": "off",
"lineWidth": 2,
"gradientMode": "opacity"
"stack": "off"
},
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}",
"id": "a1c34fa4-4549-41a6-8d31-d25e7d860106",
"layout": {
"h": 4,
@@ -2051,38 +2059,42 @@
}
],
"type": "timeseries",
"version": "2.0.0",
"datasourceCate": "prometheus",
"datasourceValue": "${datasource}"
"version": "2.0.0"
}
],
"var": [
{
"definition": "prometheus",
"name": "datasource",
"type": "datasource",
"definition": "prometheus"
"type": "datasource"
},
{
"definition": "label_values(elasticsearch_up, cluster)",
"name": "cluster",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
},
"definition": "label_values(elasticsearch_up, cluster)",
"name": "cluster",
"type": "query"
},
{
"allOption": true,
"definition": "label_values(elasticsearch_jvm_uptime_in_millis{cluster=\"$cluster\"}, node_host)",
"multi": true,
"name": "node_host",
"type": "query",
"datasource": {
"cate": "prometheus",
"value": "${datasource}"
}
},
"definition": "label_values(elasticsearch_jvm_uptime_in_millis{cluster=\"$cluster\"}, node_host)",
"multi": true,
"name": "node_host",
"type": "query"
}
],
"version": "3.0.0"
}
}
},
"public": 0,
"public_cate": 0,
"bgids": null,
"built_in": 0,
"hide": 0,
"uuid": 1717556327376754000
}

View File

@@ -0,0 +1,452 @@
[
{
"id": 0,
"uuid": 1717556327385727000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health delayed unassigned 的分片数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_delayed_unassigned_shards",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327389271000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health Pending task 数量",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_number_of_pending_tasks",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327391502000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health relocating 的分片数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_relocating_shards",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327393576000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health unassigned 的分片数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_unassigned_shards",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327396682000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health 健康度状态码",
"unit": "none",
"note": "- 1Green绿色状态表示所有分片都正常\n- 2Yellow黄色状态主分片都正常从分片有不正常的\n- 3Red红色状态有些主分片不正常",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_status_code",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327398665000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health 数据节点数量",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_number_of_data_nodes",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327400525000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health 正在初始化的分片数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_initializing_shards",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327402553000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health 活跃主分片数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_active_primary_shards",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327404570000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health 活跃分片数",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_active_shards",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327406404000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Cluster Health 节点数量",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_cluster_health_number_of_nodes",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327408587000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Indexing 平均耗时",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_indices_indexing_index_time_in_millis[3m])\n/\nirate(elasticsearch_indices_indexing_index_total[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327410419000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Merge 平均耗时",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_indices_merges_total_time_in_millis[3m])\n/\nirate(elasticsearch_indices_merges_total[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327413133000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "Query 平均耗时",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_indices_search_query_time_in_millis[3m])\n/\nirate(elasticsearch_indices_search_query_total[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327415242000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "每秒 indexing 数量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_indices_indexing_index_total[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327417739000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "每秒 merge 大小",
"unit": "bytesSecIEC",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_indices_merges_total_size_in_bytes[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327419933000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "每秒 merge 数量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_indices_merges_total_docs[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327421867000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "每秒删除 doc 数量",
"unit": "sishort",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_indices_docs_deleted[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327424001000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "硬盘使用率",
"unit": "percent",
"note": "",
"lang": "zh_CN",
"expression": "100 - 100 * elasticsearch_fs_total_available_in_bytes / elasticsearch_fs_total_total_in_bytes",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327425727000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "网络流量 - 入向每秒流量",
"unit": "bytesSecIEC",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_transport_rx_size_in_bytes[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327428683000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "网络流量 - 出向每秒流量",
"unit": "bytesSecIEC",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_transport_tx_size_in_bytes[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327434651000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程 CPU 使用率",
"unit": "percent",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_process_cpu_percent",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327437231000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程 JVM Heap 使用率",
"unit": "percent",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_jvm_mem_heap_used_percent",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327439234000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程 JVM Heap 区 committed 大小",
"unit": "bytesIEC",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_jvm_mem_heap_committed_in_bytes",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327441202000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程 JVM Non Heap 区 committed 大小",
"unit": "bytesIEC",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_jvm_mem_non_heap_committed_in_bytes",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327443058000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程 JVM Old 内存池 used 大小",
"unit": "bytesIEC",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_jvm_mem_pools_old_used_in_bytes",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327444862000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程 JVM Young 内存池 used 大小",
"unit": "bytesIEC",
"note": "",
"lang": "zh_CN",
"expression": "elasticsearch_jvm_mem_pools_young_used_in_bytes",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327447174000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程新生代每秒 GC 次数",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_jvm_gc_collectors_young_collection_count[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327449234000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程新生代每秒 GC 耗时",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_jvm_gc_collectors_young_collection_time_in_millis[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327451371000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程老生代每秒 GC 次数",
"unit": "none",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_jvm_gc_collectors_old_collection_count[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
},
{
"id": 0,
"uuid": 1717556327459172000,
"collector": "Categraf",
"typ": "ElasticSearch",
"name": "进程老生代每秒 GC 耗时",
"unit": "milliseconds",
"note": "",
"lang": "zh_CN",
"expression": "irate(elasticsearch_jvm_gc_collectors_old_collection_time_in_millis[3m])",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
}
]

Some files were not shown because too many files have changed in this diff Show More