Re: [prometheus-users] Graph how long a job takes

2023-03-27 Thread Roberto Nunnari
Hello.

Thank you Stuart and Brian for your answer.

Unfortunately english is not my native language, and I cannot see how I
could make my question more understandable. Anyways, Brian got it right. :-)

In the meantime I already found the solution:
1) on a linux box, combined crontab+bash script+python script: make the sql
query and measure how long it takes
2) push this on pushgateway
3) scratch from prometheus
4) scratch from grafana

Best regards.
Roberto


Il giorno lun 27 mar 2023 alle ore 11:14 Brian Candler 
ha scritto:

> I think the question was, "does sql_exporter include a metric for the
> execution time of a query"?
>
> If it doesn't, and you're only doing a single query in the scrape job,
> then you could use prometheus' own *scrape_duration_seconds* metric as a
> rough proxy.
>
> On Monday, 27 March 2023 at 09:41:33 UTC+1 Stuart Clark wrote:
>
>> On 2023-03-24 14:01, Nunni wrote:
>> > Hello.
>> >
>> > I need is observe how long it takes to complete the execution of a
>> > particular mssql query. The query is executed once every hour, and I
>> > want to graph that for say a period of ten days.
>> > The query is up and running using sql_exporter and prometheus gets the
>> > results and correctly graphs it, but that’s not what I need.
>> >
>>
>> Unfortunately it isn't clear what you are asking for. From your
>> description it sounds like you are graphing the data, but you also say
>> it isn't what you need (but don't say how or what you are hoping for).
>> If you could describe what you are doing, what is happening & what you
>> are wanting instead someone might be able to suggest something...
>>
>> --
>> Stuart Clark
>>
> --
> 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/51f23a79-0351-46ff-aa79-cd13f807c11en%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/CACWyeot8VSaUYH%3D71J_%3D7CkQ4HZrrNiD%3Dj5zmSgysHUiwC%3DkRA%40mail.gmail.com.


Re: [prometheus-users] Graph how long a job takes

2023-03-27 Thread Brian Candler
I think the question was, "does sql_exporter include a metric for the 
execution time of a query"?

If it doesn't, and you're only doing a single query in the scrape job, then 
you could use prometheus' own *scrape_duration_seconds* metric as a rough 
proxy.

On Monday, 27 March 2023 at 09:41:33 UTC+1 Stuart Clark wrote:

> On 2023-03-24 14:01, Nunni wrote:
> > Hello.
> > 
> > I need is observe how long it takes to complete the execution of a
> > particular mssql query. The query is executed once every hour, and I
> > want to graph that for say a period of ten days.
> > The query is up and running using sql_exporter and prometheus gets the
> > results and correctly graphs it, but that’s not what I need.
> > 
>
> Unfortunately it isn't clear what you are asking for. From your 
> description it sounds like you are graphing the data, but you also say 
> it isn't what you need (but don't say how or what you are hoping for). 
> If you could describe what you are doing, what is happening & what you 
> are wanting instead someone might be able to suggest something...
>
> -- 
> Stuart Clark
>

-- 
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/51f23a79-0351-46ff-aa79-cd13f807c11en%40googlegroups.com.


Re: [prometheus-users] Graph how long a job takes

2023-03-27 Thread Stuart Clark

On 2023-03-24 14:01, Nunni wrote:

Hello.

I need is observe how long it takes to complete the execution of a
particular mssql query. The query is executed once every hour, and I
want to graph that for say a period of ten days.
The query is up and running using sql_exporter and prometheus gets the
results and correctly graphs it, but that’s not what I need.



Unfortunately it isn't clear what you are asking for. From your 
description it sounds like you are graphing the data, but you also say 
it isn't what you need (but don't say how or what you are hoping for). 
If you could describe what you are doing, what is happening & what you 
are wanting instead someone might be able to suggest something...


--
Stuart Clark

--
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/07bd9e311b187f0b1dd544d9bd4ed92e%40Jahingo.com.


[prometheus-users] Graph how long a job takes

2023-03-26 Thread Nunni
 

Hello.

I need is observe how long it takes to complete the execution of a 
particular mssql query. The query is executed once every hour, and I want 
to graph that for say a period of ten days.
The query is up and running using sql_exporter and prometheus gets the 
results and correctly graphs it, but that’s not what I need.

I’d be grateful for any hints.
Best regards.

-- 
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/676e485a-816a-472e-a583-676239a239dfn%40googlegroups.com.


[prometheus-users] Graph how long a job takes

2023-03-26 Thread Nunni
 

Hello.

I need is observe how long it takes to complete the execution of a 
particular mssql query. The query is executed once every hour, and I want 
to graph that for say a period of ten days.
The query is up and running using sql_exporter and prometheus gets the 
results and correctly graphs it, but that’s not what I need.

I’d be grateful for any hints.
Best regards.

-- 
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/baabdcf6-da8d-4c29-8a88-f5795e9f34a1n%40googlegroups.com.