You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/09/24 03:16:28 UTC

[GitHub] [apisix] tiger333777 opened a new issue #2296: request help:

tiger333777 opened a new issue #2296:
URL: https://github.com/apache/apisix/issues/2296


   ### Issue description
   Question 1: monitoring address of apisix Prometheus: http://xx.yy.com/apisix/prometheus/metrics
   How does Prometheus restrict IP access or /apifix/Prometheus/ metrics to some monitoring servers
   Question 2:
   Prometheusmonitoring address: http://xx.yy.com/apisix/prometheus/metrics
   Can I reduce /apifix/Prometheus/metrics  to /metrics
   
   
   问题1:apisix prometheus 的监控地址:http://xx.yy.com/apisix/prometheus/metrics
   prometheus 怎么限制IP访问,或是全局的 /apisix/prometheus/metrics 限制到某些监控服务器上
   问题2:
   普米监控地址:http://xx.yy.com/apisix/prometheus/metrics
   能否将 /apisix/prometheus/metrics 减缩为/metrics,要怎么做
   
   ### Environment
   
   * apisix version (cmd: `apisix version`):apisix 1.5
   * OS:centos 7
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] moonming closed issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
moonming closed issue #2296:
URL: https://github.com/apache/apisix/issues/2296


   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2296:
URL: https://github.com/apache/apisix/issues/2296#issuecomment-722753271


   Look like we need to distinguish `plugin attr` (which need to reload to take effect) and `plugin metadata` (which don't need to reload). And we need to consider the `plugin attr` when we check if the plugin version is changed during loading plugins.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2296:
URL: https://github.com/apache/apisix/issues/2296#issuecomment-723527025


   `plugin attr` is mainly for providing the default value, we can use the default value of `plugin metadata` to support this too.
   
   here is an example: https://github.com/apache/apisix/blob/master/apisix/plugins/http-logger.lua#L61
   
   if the admin user did not set any new value, then the plugin will use the default value(same as `plugin attr`).
   
   if the admin user set a new value by `plugin metadata` API, then the plugin will use the new value.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] idbeta commented on issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
idbeta commented on issue #2296:
URL: https://github.com/apache/apisix/issues/2296#issuecomment-722250583


   ping @membphis Do these two issues need a new feat to solve?


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2296:
URL: https://github.com/apache/apisix/issues/2296#issuecomment-722380919


   > 问题1:apisix prometheus 的监控地址:http://xx.yy.com/apisix/prometheus/metrics
   > prometheus 怎么限制IP访问,或是全局的 /apisix/prometheus/metrics 限制到某些监控服务器上
   
   you can take a look at this doc: https://github.com/apache/apisix/blob/master/doc/plugin-interceptors.md#plugin-interceptors
   
   welcome to add this link to Prometheus plugin doc.
   
   > 问题2:
   > 普米监控地址:http://xx.yy.com/apisix/prometheus/metrics
   > 能否将 /apisix/prometheus/metrics 减缩为/metrics,要怎么做
   
   not support now. you need to update the source code of the plugin Prometheus.
   
   another way, add a new field and allow the users to specify the export URI path.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] spacewander commented on issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #2296:
URL: https://github.com/apache/apisix/issues/2296#issuecomment-723426993


   `plugin attr` is for configuration which need to take effect via the `init` function, like skywalking background timer and this one. It need to have the same lifecyle as the plugin lists (updated via reload). Therefore we can't remove it.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2296:
URL: https://github.com/apache/apisix/issues/2296#issuecomment-722382360


   > > 问题2:
   > > 普米监控地址:http://xx.yy.com/apisix/prometheus/metrics
   > > 能否将 /apisix/prometheus/metrics 减缩为/metrics,要怎么做
   
   support to specify the export path, how abou this way?
   
   ```
   plugin_attr:
     promethus:
       export_uri: /apisix/prometheus/metrics 
   ```


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix] membphis commented on issue #2296: request help: about prometheus metrics for deny access

Posted by GitBox <gi...@apache.org>.
membphis commented on issue #2296:
URL: https://github.com/apache/apisix/issues/2296#issuecomment-723145349


   I think we can remove `plugin_attr` finally.
   
   I love `plugin metadata` way.
   
   for this issue, we can add new field `export_uri: /apisix/prometheus/metrics ` via `plugin metadata`.


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org