Pick and show time of max over a timeseries

Hi all,
I would show in a panel (table, singlestat,…)
timestamp and value of maximum in a time series.
I can get max value with max_over_time(range) function or directly in Grafana with Transformation but I don’ know how get timestamp corresponding to max value.
I see this issue but it have been closed.
Can you help me?

welcome to the forums. your have to do a simple sql query where you ask the database of the maximum point to give back a set including the timestamp and use this for your singlestat. for example

Thank you but my question is referred to Prometheus datasorce, not sql-like database.

Regards

This message is from an EXTERNAL SENDER to the Eni systems: pay ATTENTION, especially with links and attachments.

melrose
February 26

welcome to the forums. your have to do a simple sql query where you ask the database of the maximum point to give back a set including the timestamp and use this for your singlestat. for example

yes it is working fine there same

Sorry, can you send me an example in PromQL of what you mean?

:pray:

ldap.toml

[[servers]]
# Ldap server host (specify multiple hosts space separated)
host = "127.0.0.1"
# Default port is 389 or 636 if use_ssl = true
port = 389
# Set to true if ldap server supports TLS
use_ssl = false
# Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
start_tls = false
# set to true if you want to skip ssl cert validation
ssl_skip_verify = false

stunnel.conf

sslVersion = TLSv1.2

[ldap]
accept  = 389
connect = MY_AD:636
client = yes

Hi melrose
thank you for your post. This looks to me like how to get ldap through a tunnel.
I wonder how this is related to “Pick and show time of max over a timeseries”

1 Like

could you try this first

Ok, can anyone help me on this topic?

This forum post appears to address what you are looking for. Not sure if it will still work as they outlined back in 2018.

Same problem but I need solution for Prometheus datasource, not for InfluxDB

Try tmax_over_time() from MetricsQL - it returns the timestamp for the maximum value over the given lookbehind window im square brackets.