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 2022/10/22 09:16:11 UTC

[GitHub] [apisix] xinxinh2020 opened a new issue, #8146: help request: what extra_labels of prometheus plugin i can use?

xinxinh2020 opened a new issue, #8146:
URL: https://github.com/apache/apisix/issues/8146

   ### Description
   
   
   Hi, i want to add some labels to metrics, and some labels are literals instead of vars. I find it will be an empty string when i use literals.  
   Besides, i cannot find how to define vars like $upstream_addr. 
   ```yaml
   plugin_attr:
     prometheus:
       metrics:
           http_status:
               extra_labels:
                   - upstream_addr: $upstream_addr
                   - upstream_status: $upstream_status
   
   ```
   Any reply would be greatly appreciated :)
   
   ### 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


[GitHub] [apisix] shreemaan-abhishek commented on issue #8146: help request: what extra_labels of prometheus plugin i can use?

Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on issue #8146:
URL: https://github.com/apache/apisix/issues/8146#issuecomment-1707761954

   @xinxinh2020 you can always set a constant value in the `register_var` function for registering apisix variables. Do you have any further questions/updates? If not, please close the issue. Thanks.


-- 
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] github-actions[bot] commented on issue #8146: help request: what extra_labels of prometheus plugin i can use?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8146:
URL: https://github.com/apache/apisix/issues/8146#issuecomment-1733349747

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


-- 
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] github-actions[bot] closed issue #8146: help request: what extra_labels of prometheus plugin i can use?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8146: help request: what extra_labels of prometheus plugin i can use?
URL: https://github.com/apache/apisix/issues/8146


-- 
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 #8146: help request: what extra_labels of prometheus plugin i can use?

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

   > Hi, i want to add some labels to metrics, and some labels are literals instead of vars. I find it will be an empty string when i use literals.
   
   you can use Nginx's variables and APISIX' variable, read more: https://github.com/apache/apisix/blob/master/docs/en/latest/apisix-variable.md
   
   and you can use the variable that register by custom, read more: https://github.com/apache/apisix/blob/master/docs/en/latest/plugin-develop.md#register-custom-variable


-- 
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] xinxinh2020 commented on issue #8146: help request: what extra_labels of prometheus plugin i can use?

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

   > 
   
   That's great!
   But i want to use a const instead of a var. This case is unsupported now, and i have a [pr]( [figure it out](https://github.com/apache/apisix/pull/8159)) to figure it out. Hope it to be accepted :)


-- 
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] tokers commented on issue #8146: help request: what extra_labels of prometheus plugin i can use?

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

   > > 
   > 
   > 
   > 
   > That's great!
   > 
   > But i want to use a const instead of a var. This case is unsupported now, and i have a [pr](https://github.com/apache/apisix/pull/8159) to figure it out. Hope it to be accepted :)
   
   Could you just share the background that you need constant labels.


-- 
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] github-actions[bot] commented on issue #8146: help request: what extra_labels of prometheus plugin i can use?

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8146:
URL: https://github.com/apache/apisix/issues/8146#issuecomment-1729254332

   Due to lack of the reporter's response this issue has been labeled with "no response". It will be close in 3 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


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