[prometheus-users] Prometheus counter reset

2023-05-24 Thread Yogita Bhardwaj
I am using Prometheus counters in my project but the value of counter reset 
when service restart. how can I prevent counter reset while fetching data 
from Prometheus using http api.

-- 
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/67e08ac8-f02d-4631-a650-1c9bf0a631afn%40googlegroups.com.


[prometheus-users] How to increment gauge value in celery timeout?

2023-05-24 Thread Yogita Bhardwaj
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.
I am using Prometheus gauge metrics. I increment its value inside a python 
function that is not a celery task. but I wants to decrement its value when 
celery task timeout. so i am facing in gauge decrement.  

-- 
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/8bf99413-40c8-4a0f-80e3-1021795a22b9n%40googlegroups.com.


[prometheus-users] Info Http metrics in .net framework 4.7.2

2023-05-24 Thread domenico lorusso
Hi, i am newer using Prometheus.

I have a application with framework .net 4.7.2
Im using Prometheus.NetFramework.AspNet and in the Application_Start event 
i write this:


AspNetMetricServer.RegisterRoutes(GlobalConfiguration.Configuration);

but i don't see any http metric like this:

http_request_duration_seconds
http_requests_in_progress
...

Do you say if is possibile to see this metrics with .net framework 4.7.2? 
Thx.

-- 
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/02788268-f467-4260-96e2-cf161d7764a1n%40googlegroups.com.


[prometheus-users] Re: How to increment gauge value in celery timeout?

2023-05-24 Thread Brian Candler
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.


[prometheus-users] How to increment gauge value in celery timeout?

2023-05-24 Thread Yogita Bhardwaj
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/374d9a07-55df-438f-8a6f-07819f8f83ccn%40googlegroups.com.


Re: [prometheus-users] exporter crashes, multiple up-metric-related alerts fire

2023-05-24 Thread Ben Kochie
This is what the `group_by` feature in the alertmanager routing is for.

https://prometheus.io/docs/alerting/latest/configuration/#route

On Wed, May 24, 2023 at 11:33 AM Mario Cornaccini 
wrote:

> hi, we got a custom made exporter, checking for running linux processes..
>
> i got 1 scrape job with 27 targets;
> also there is a general alert rule:
> expr: up==0
>
> so, when the exporter crashed, we got 27 alerts.
>
> is there a way or best-practice to detect that the exporter crashed, and
> inhibit the 27 alerts, and just have one alert, exporter crashed ?
>
> (happy to give any more info if needed)
> cheers, fil
>
> --
> 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/b6796581-dcff-4577-a725-97e9e0e23c69n%40googlegroups.com
> 
> .
>

-- 
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/CABbyFmrZmoX%2BzdK6faQeXLVJvQUW6s7nd3BZBnGoCd%3DxZ-DdRA%40mail.gmail.com.


[prometheus-users] exporter crashes, multiple up-metric-related alerts fire

2023-05-24 Thread Mario Cornaccini
hi, we got a custom made exporter, checking for running linux processes..

i got 1 scrape job with 27 targets;
also there is a general alert rule:
expr: up==0

so, when the exporter crashed, we got 27 alerts.

is there a way or best-practice to detect that the exporter crashed, and 
inhibit the 27 alerts, and just have one alert, exporter crashed ?

(happy to give any more info if needed)
cheers, fil

-- 
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/b6796581-dcff-4577-a725-97e9e0e23c69n%40googlegroups.com.


[prometheus-users] Re: Support for Japanese characters in Prometheus yml

2023-05-24 Thread Brian Candler
All unicode text should work as Prometheus labels. 
See https://prometheus.io/docs/concepts/data_model/
*"Label values may contain any Unicode characters."*

You just need to edit prometheus.yml with an editor that uses UTF-8 (not 
shift-JIS)

On Wednesday, 24 May 2023 at 07:26:48 UTC+1 Kesavanand Chavali wrote:

> Hello,
>
> We have a requirement to have some of the external labels to be in the 
> local language.
> e.g. customername
>
> Is the local language supported in Prometheus yml file? if yes. Is there 
> any guidance to show how to include these characters in Prometheus yml file?
>
> -- 
> Thanks and Regards,
> Kesav
>

-- 
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/dd7312a0-d60b-4bf5-b02f-aa63a5b9c0fcn%40googlegroups.com.