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 2021/11/18 05:44:12 UTC

[GitHub] [apisix] webup commented on issue #4744: k8s 环境apisix集成prometheus,apisix和prometheus的配置如何设置?request help:

webup commented on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-972557179


   > It has been solved. This is my way to deal with it:
   > 
   > 1. Add job to the configmap of prometheus-server
   > 
   > ```
   > scrape_configs:
   >     - job_name: apisix-prom
   >       metrics_path: '/apisix/prometheus/metrics'   #This is a fixed path and cannot be changed
   >       static_configs:
   >       - targets:
   >          - your-svc.your-namespace:9091
   > ```
   > 
   > 1. Add port to SVC of apisix-admin
   > 
   > ```
   > - name: apisix-prom
   >   port: 9091
   > ```
   > 
   > 1. Add the configuration of the apisix plugin_attr
   > 
   > ```
   >   plugin_attr:
   >       prometheus:
   >            export_addr:
   >               ip: "0.0.0.0"
   >               port: 9091
   > ```
   
   This works, but seems the plugin configuration made in dashboard could not overwrite this `plugin_attr` content. :(


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