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
request: Expect monitoring metrics to add monitoring of nginx shared memory usage #5837
Comments
It seems to be quite difficult, and if you use the ngx.shared.DICT API to monitor it, it will lose performance. refer to: https://github.com/openresty/lua-nginx-module#ngxshareddictcapacity |
Is it like ngx_slab_stats? Which supports shared memory allocated from lua-nginx-module. |
I changed my mind and I think it's a meaningful enhancemen. Perhaps we can first monitor the nginx.shared.DICT that is used by APISIX, and next we allow users to monitor a custom nginx.shared.DICT (or read the used nginx.shared.DICT directly from the configuration file). cc @spacewander |
@tzssangglass Could you share your proposal? |
we can use |
OK so we may get a curve about the shared dict, in the diagram we can see the shared dict memory usage. |
I found that nginx adopts a way of pre-allocating memory for shared DICT, the smallest granularity is page, ranther than allocat per use. The value of |
Is there some docs or code that explain this? This is useful info. |
I checked the C code of |
Hi @ccxhwmy , would you like to work on this? |
Can you tell me which plugin I can modify to get information of |
yes, prometheus. |
Issue description
期待监控指标添加对nginx共享内存使用情况的监控
Environment
apisix version
):uname -a
):nginx -V
oropenresty -V
):curl http://127.0.0.1:9090/v1/server_info
to get the info from server-info API):luarocks --version
):The text was updated successfully, but these errors were encountered: