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/08/03 03:17:48 UTC

[GitHub] [apisix] wjmmjr opened a new issue #4744: k8s 环境apisix集成prometheus,apisix和prometheus的配置如何设置?request help:

wjmmjr opened a new issue #4744:
URL: https://github.com/apache/apisix/issues/4744


   ### Issue description
   
   ### Environment
   
   Request help without environment information will be ignored or closed.
   
   * apisix version (cmd: `apisix version`):
   * OS (cmd: `uname -a`):
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   * etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   * apisix-dashboard version, if have:
   * luarocks version, if the issue is about installation (cmd: `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

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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   ```
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'   这是固定的路径,不能更改
         static_configs:
         - targets:
            - apisix-admin.apisix:9091
   ```
     2. apisix-admin的svc增加port
       ```
      - name: apisix-prom
        port: 9091
   ```
      
   3. apisix的configmap增加插件的配置
   ```
     plugin_attr:
         prometheus:
              export_addr:
                 ip: "0.0.0.0"
                 port: 9091
   
   ```
   


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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   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
   ```
     2. Add port to SVC of apisix-admin
       ```
      - name: apisix-prom
        port: 9091
   ```
      
   3. Add the configuration of the apisix plugin_attr
   
   ```
     plugin_attr:
         prometheus:
              export_addr:
                 ip: "0.0.0.0"
                 port: 9091
   ```
   


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



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

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


   We can also add this function to Helm chart
   
   https://github.com/apache/apisix-helm-chart


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'   这是固定的路径,不能更改
         static_configs:
         - targets:
            - apisix-admin.apisix:9091
     2. apisix-admin的svc增加port
       - name: apisix-prom
         port: 9091
      
   3. apisix的configmap增加插件的配置
     plugin_attr:
         prometheus:
           export_addr:
             ip: "0.0.0.0"
             port: 9091


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'   这是固定的路径,不能更改
         static_configs:
         - targets:
            - apisix-admin.apisix:9091
     2. apisix-admin的svc增加port
       - name: apisix-prom
         port: 9091
      
   3. apisix的configmap增加插件的配置
     plugin_attr:
         prometheus:
            export_addr:
               ip: "0.0.0.0"
               port: 9091


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'  #这是固定的路径,不能更改
         static_configs:
         - targets:
           - apisix-admin.apisix:9091
     2. apisix-admin的svc增加port
       - name: apisix-prom
         port: 9091
      
   3. apisix的configmap增加插件的配置
     plugin_attr:
         prometheus:
           export_addr:
             ip: "0.0.0.0"
             port: 9091


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470






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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'   这是固定的路径,不能更改
         static_configs:
         - targets:
            - apisix-admin.apisix:9091
     2. apisix-admin的svc增加port
         - name: apisix-prom
           port: 9091
      
   3. apisix的configmap增加插件的配置
     plugin_attr:
           prometheus:
              export_addr:
                 ip: "0.0.0.0"
                 port: 9091


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



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

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


   yep. And APISIX helm chart doesn't support this configuration now.


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



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

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


   > @tzssangglass @yzeng25 should we add this to the FAQ?
   
   Is this a native deployment of APISIX in k8s? not APISIX Ingress Controller or APISIX Helm Charts


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



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

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


   > @tzssangglass @yzeng25 should we add this to the FAQ?
   
   Only if it is frequently asked.


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'   这是固定的路径,不能更改
         static_configs:
         - targets:
            - apisix-admin.apisix:9091
     2. apisix-admin的svc增加port
         - name: apisix-prom
           port: 9091
      
   3. apisix的configmap增加插件的配置
   ```
     plugin_attr:
         prometheus:
              export_addr:
                 ip: "0.0.0.0"
                 port: 9091
   
   ```
   


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   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
   ```
     2. Add port to SVC of apisix-admin
   
      ```
      - name: apisix-prom
        port: 9091
   ```
   
      
   3. Add the configuration of the apisix plugin_attr
   
   
   ```
     plugin_attr:
         prometheus:
              export_addr:
                 ip: "0.0.0.0"
                 port: 9091
   ```
   
   


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'   这是固定的路径,不能更改
         static_configs:
         - targets:
           - apisix-admin.apisix:9091
     2. apisix-admin的svc增加port
       - name: apisix-prom
         port: 9091
      
   3. apisix的configmap增加插件的配置
     plugin_attr:
         prometheus:
           export_addr:
             ip: "0.0.0.0"
             port: 9091


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



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

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


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   `scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics' #这是固定的路径,不能更改
         static_configs:
         - targets:
           - apisix-admin.apisix:9091`
     2. apisix-admin的svc增加port
     ` - name: apisix-prom
         port: 9091
       `
   3. apisix的configmap增加插件的配置
     `plugin_attr:
         prometheus:
           export_addr:
             ip: "0.0.0.0"
             port: 9091`


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



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

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


   You need to modify the configmap resource of Apache APISIX
   
   ```
   plugin_attr:
     prometheus:
       export_addr:
         ip: 0.0.0.0
         port: 9092
   ```
   
   and create a service to expose this port.
   
   xref: https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/prometheus.md


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   
   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
   ```
     2. Add port to SVC of apisix-admin
       ```
      - name: apisix-prom
        port: 9091
   ```
      
   3. Add the configuration of the apisix plugin_attr
   ```
     plugin_attr:
         prometheus:
              export_addr:
                 ip: "0.0.0.0"
                 port: 9091
   
   ```
   


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



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

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


   @tzssangglass @yzeng25 should we add this to the FAQ?


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



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

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


   


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



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

Posted by GitBox <gi...@apache.org>.
wjmmjr edited a comment on issue #4744:
URL: https://github.com/apache/apisix/issues/4744#issuecomment-891663470


   已经解决了,我的处理方式:
   1. prometheus-server的configmap增加job_name
   scrape_configs:
       - job_name: apisix-prom
         metrics_path: '/apisix/prometheus/metrics'   这是固定的路径,不能更改
         static_configs:
         - targets:
            - apisix-admin.apisix:9091
     2. apisix-admin的svc增加port
         - name: apisix-prom
           port: 9091
      
   3. apisix的configmap增加插件的配置
     plugin_attr:
         prometheus:
              export_addr:
                 ip: "0.0.0.0"
                 port: 9091


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