Skip to content
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

What classes need to be modified to support Codis monitoring?(Acquisition method:dashboard restful api) #267

Closed
SenLinLeo opened this issue Jun 3, 2019 · 1 comment

Comments

@SenLinLeo
Copy link

SenLinLeo commented Jun 3, 2019

The following metrics are available in the metrics interface.However, as not shown in Grafana, the forecast is that Prometheus is stored without scheduled polling.Don't know how to change?

Part of the code:
`
buildCodis := prometheus.NewGaugeVec(prometheus.GaugeOpts{
Name: "codis_exporter_build_info",
Help: "codis exporter build_info",
}, []string{"addr", "alias"})
buildCodis.WithLabelValues("192.32.61.178:19000", "").Set(result.Sessions.Total)
``

interface data(http://192.32.61.178:9121/metrics):
_# HELP codis_exporter_build_info codis exporter build_info
# TYPE codis_exporter_build_info gauge
codis_exporter_build_info{addr="192.32.61.178:19000",alias=""} 655
codis_exporter_build_info{addr="192.32.61.179:19000",alias=""} 655
`

@SenLinLeo SenLinLeo changed the title 如果要支持Codis监控(采集方式:dashboard restful接口),需要在哪些类上做修改? What classes need to be modified to support Codis monitoring?(Acquisition method:dashboard restful api) Jun 3, 2019
@oliver006
Copy link
Owner

oliver006 commented Jun 3, 2019

I'm not sure what Codis or the codis_exporter is that you mention.

However, it looks like your code is using addr and alias labels which were all made obsolete by PR #256 so if you use redis_exporter 1.0.0 and an older version of your exporter then mixing the metrics will not work and your Grafana dashboard will be broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants