You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "gxproject (via GitHub)" <gi...@apache.org> on 2023/11/20 02:39:24 UTC
[I] docker部署apisix,使用prometheus组件时, 当docker重启时,普罗米修斯的指标会被重置成从0开始 [apisix]
gxproject opened a new issue, #10521:
URL: https://github.com/apache/apisix/issues/10521
### Current Behavior
apisix暴露的指标是存在内存中的,重启就丢失了吗?
如果是这样我有什么办法可以让他持久化吗?
### Expected Behavior
apisix 暴露的prometheus指标不会因为重启而重置
### Error Logs
_No response_
### Steps to Reproduce
使用docker部署apisix
`docker run --name apisix \
--privileged=true \
-v /config/apisix/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml \
-p 9100:9100 \
-p 9150:9200 \
-p 9080:9080 \
-p 9180:9180 \
-p 9091:9091 \
-p 9443:9443 \
--restart=always \
-d apache/apisix:3.3.0-centos`
打开 prometheus 插件,运行一段时间,让prometheus 收集数据以调用数量为例(例如到10),然后重启apisix,运行一下,查看指标的图,出现了调用数量指标重置(从0开始)的现象, 两个时间段的数据差值 出现了负数

### Environment
- APISIX version (run `apisix version`):
- Operating system (run `uname -a`):
- OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
- etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
- APISIX Dashboard version, if relevant:
- Plugin runner version, for issues related to plugin runners:
- LuaRocks version, for installation issues (run `luarocks --version`):
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] docker部署apisix,使用prometheus组件时, 当docker重启时,prometheus的指标会被重置成从0开始 [apisix]
Posted by "luoluoyuyu (via GitHub)" <gi...@apache.org>.
luoluoyuyu commented on issue #10521:
URL: https://github.com/apache/apisix/issues/10521#issuecomment-1818287851
hi @gxproject ,general is saved in the prometheus directory under the data folder, you can use dockers persistence mechanism to achieve the preservation of metrics data, dockers persistence can be specific look at this [https://docs.docker.com/storage/]()
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] docker部署apisix,使用prometheus组件时, 当docker重启时,prometheus的指标会被重置成从0开始 [apisix]
Posted by "gxproject (via GitHub)" <gi...@apache.org>.
gxproject closed issue #10521: docker部署apisix,使用prometheus组件时, 当docker重启时,prometheus的指标会被重置成从0开始
URL: https://github.com/apache/apisix/issues/10521
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] docker部署apisix,使用prometheus组件时, 当docker重启时,prometheus的指标会被重置成从0开始 [apisix]
Posted by "luoluoyuyu (via GitHub)" <gi...@apache.org>.
luoluoyuyu commented on issue #10521:
URL: https://github.com/apache/apisix/issues/10521#issuecomment-1818272103
hi @gxproject ,It's not apisix's job to store the metrics data, apisix just provides the metrics information, which is timed and grabbed by the prometheus.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org