-
Notifications
You must be signed in to change notification settings - Fork 521
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
[Bug] prometheus metric format is invalid #2354
Comments
And metric name is also invalid. There are not allowed to have / or $, so this snippet of code should change to the following. public static String replaceDotDashInKey(String orgKey) {
return orgKey.replace(".", "_").replace("-", "_").replace("/", "_").replace("$", "_");
} |
Hi @qwtsc , thanks for reporting the issue. |
@SunnyBoy-WYH could u check the issue when free |
@qwtsc Thanks for your report, welcome to submit PR ; but can you introduce the request path /param and something else that we can recurrent it ? ref: https://hugegraph.apache.org/docs/clients/restful-api/metrics/#1-basic-metrics |
@SunnyBoy-WYH the request path is just /metrics. check the following prometheus service monitor. apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: prometheus-hugegraph
# Change this to the namespace the Prometheus instance is running in
namespace: default
labels:
app: hugegraph
release: prometheus
spec:
selector:
matchLabels:
name: hugegraph
namespaceSelector:
matchNames:
- hugegraph-e2e
endpoints:
- port: metrics
path: /metrics
interval: 15s |
hi, will you continue to fix this issue ? @qwtsc |
Bug Type (问题类型)
None
Before submit
Environment (环境信息)
hugegraph in k8s using prometheus and grafana as service monitor.
Expected & Actual behavior (期望与实际表现)
prometheus metrics format is invalid. After some investigations and code review, I think that the problem would probably be that this PR do not use the correct data exposition format that prometheus community required. The acceptable histogram format can be viewed as follows:
and I do also think the correct metric type here is supposed to be
summary
rather thanhistogram
according to the prometheus best practice documentation.By the way, I am willing to provide a PR to fix this issue as well as grafana dashboard configuration after I figure it out .
Vertex/Edge example (问题点 / 边数据举例)
No response
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
No response
The text was updated successfully, but these errors were encountered: