Since you mention "celery" I *guess* you are probably writing Python code, 
and I *guess* you are using the Python client library for prometheus. 
Whether you are exposing metrics via direct HTTP scrape, or using 
push_gateway, I don't know.

Give that your question is (probably) about programming with the Python 
client library, then I think the starting point should be to show the code 
that you've written so far, and explain how it doesn't do what you want.

Also, if you can explain what it is you're trying to achieve, there may be 
a different and better way to solve your issue. For example, are you trying 
to expose a metric for the number of active celery tasks? If so, using an 
existing exporter which converts celery status into prometheus metrics may 
be a better solution: e.g.
https://github.com/danihodovic/celery-exporter

On Wednesday, 24 May 2023 at 11:01:07 UTC+1 Yogita Bhardwaj wrote:

> The specific query I am struggling with involves, I am using Prometheus 
> gauge metrics to increment the value outside celery task and to decrement 
> the value of that gauge metrics when timeout occurs. but I m not able to 
> achieve this. Despite my efforts to resolve it, I have been unable to 
> achieve the desired results. I have reviewed the Prometheus documentation 
> and explored various online resources, but I haven't been able to find a 
> suitable solution.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/c1ff1264-e9e4-4aec-bcbe-37f109d61632n%40googlegroups.com.

Reply via email to