-
Notifications
You must be signed in to change notification settings - Fork 7.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
抽象监控上报,增加推送到Prometheus的模块 #167
Conversation
Codecov Report
@@ Coverage Diff @@
## master #167 +/- ##
=========================================
Coverage ? 50.76%
Complexity ? 822
=========================================
Files ? 140
Lines ? 4759
Branches ? 674
=========================================
Hits ? 2416
Misses ? 2059
Partials ? 284
Continue to review full report at Codecov.
|
Hi, thanks for your contribution. As this PR can bring breaking changes, you'll need to open an issue related to this feature, then illustrate the thoughts and design. It's not recommended to submit a large PR directly without discussion. A new feature must be well designed and discussed with project members in relevant issue. Regarding this feature we have to consider with standardization of metrics and monitoring described in our roadmap. By the way, you can add your own fork to Awesome Sentinel first :-) |
Thanks for your contribution. It's a good idea to store metrics to some existing monitoring systems, but before that, we should first to standardize our monitoring metrics. Now the metric's name is ambiguous and the monitor indexes are not rich enough, for example the |
Hi, discussions for metrics and monitoring is welcomed in #211. |
Ping @konglz . Conflict happens after merging a previous commit. Please rebase the branch against master and push it back again. Thanks a lot. |
ping @konglz |
Describe what this PR does / why we need it
抽象监控上报
增加推送到Prometheus的模块
Does this pull request fix one issue?
Describe how you did it
抽象监控上报,修改了sentinel-core
增加推送到Prometheus的模块:sentinel-transport-prometheus-push
Describe how to verify it
配置好Prometheus Server和Prometheus PushGateway
增加一对JVM参数,例如:-Dsentinel.prometheus.gateway=127.0.0.1:9091 -Dsentinel.web.port=8080
sentinel.prometheus.gateway是Prometheus PushGateway的ip和端口号,不传默认取127.0.0.1:9091
sentinel.web.port是应用的web端口号,如无web端口,随便传1个即可,不传默认取0
在Prometheus Server上收到5个标签,分别是:
SENTINEL_BLOCKED_QPS
SENTINEL_EXCEPTION_COUNT
SENTINEL_PASSED_QPS
SENTINEL_RT
SENTINEL_SUCCESS_QPS
在Prometheus Server上看到,每个标签包含如下label:
language=java
appName
host
port
instance=ip:port
resource
Special notes for reviews