-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat(promethues): add ngx.shared.DICT status #7412
Conversation
…onfiguration file. 2.distinguish prometheus metric of ngx.shared.DICT with name, instead of label.
2.compact prometheus docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the CI pass, thanks!
I don't know why this ci error is reported here, Would you give me some suggestion. |
The error message is:
You can look up it. |
The error message report that === TEST 42: fetch the prometheus multiple shared dict data
--- request eval
["GET /apisix/prometheus/metrics",
"GET /apisix/prometheus/metrics",
"GET /apisix/prometheus/metrics",
"GET /apisix/prometheus/metrics",
"GET /apisix/prometheus/metrics",
"GET /apisix/prometheus/metrics",
"GET /apisix/prometheus/metrics",
"GET /apisix/prometheus/metrics"]
--- response_body_like eval
[qr/.*apisix_shared_dict_capacity_bytes{name="internal-status"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="internal-status"} \d+.*/,
qr/.*apisix_shared_dict_capacity_bytes{name="upstream-healthcheck"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="upstream-healthcheck"} \d+.*/,
qr/.*apisix_shared_dict_capacity_bytes{name="worker-events"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="worker-events"} \d+.*/,
qr/.*apisix_shared_dict_capacity_bytes{name="lrucache-lock"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="lrucache-lock"} \d+.*/,
qr/.*apisix_shared_dict_capacity_bytes{name="balancer-ewma"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="balancer-ewma"} \d+.*/,
qr/.*apisix_shared_dict_capacity_bytes{name="balancer-ewma-locks"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="balancer-ewma-locks"} \d+.*/,
qr/.*apisix_shared_dict_capacity_bytes{name="balancer-ewma-last-touched-at"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="balancer-ewma-last-touched-at"} \d+.*/,
qr/.*apisix_shared_dict_capacity_bytes{name="etcd-cluster-health-check"} \d+(?:.|\n)*
apisix_shared_dict_free_space_bytes{name="etcd-cluster-health-check"} \d+.*/] which has a array result. and commit dbf7e7e have a similar test case: Line 665 in dbf7e7e
|
It does seem strange, so if you don't know how to modify it, consider a different type of validation. |
define lua_shared_dict in test case and check it.
You are right! I found a new type of validation, it maybe more suitable. |
Is the error a false report? |
rerun |
@ccxhwmy could you update the apisix-grafana-dashboard meta for shared dict? |
Yes, I can. |
Thanks a lot, let's do it in another PR. |
I have update the apisix-grafana-dashboard meta for shared dict in the (PR)[https://github.com//pull/7529]. |
Description
Fixes #5837
Use the request header to carry the name of ngx.shared.DICT that needs to be fetched, use
ngx.shared.DICT.capacity
andngx.shared.DICT.free_space
to get the current status ofngx.shared.DICT
, and usegauge
to store the statusChecklist