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 <[email protected]> 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/51f23a79-0351-46ff-aa79-cd13f807c11en%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/51f23a79-0351-46ff-aa79-cd13f807c11en%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CACWyeot8VSaUYH%3D71J_%3D7CkQ4HZrrNiD%3Dj5zmSgysHUiwC%3DkRA%40mail.gmail.com.

