https://prometheus.io/docs/prometheus/latest/querying/functions/#time
On Wed, Jul 27, 2022 at 5:57 AM BHARATH KUMAR <[email protected]> wrote: > Hello, > > How to get the current time in epochs in the Prometheus query? > > Like can we get this info using Node Exporter metrics or any timestamp > function we can use to get that? > > Any leads? > > Thanks & regards, > Bharath Kumar. > > On Tuesday, 26 July 2022 at 22:00:00 UTC+5:30 BHARATH KUMAR wrote: > >> Hi, >> >> I had a table with column name *last loggedin time* in grafana dashboard. >> >> This will give info regarding on particular server at what time the user >> had accessed that server last time >> >> The Prometheus query is as below: >> >> (max_over_time(last_time_user_logged_in_time{instance=~"$ip"}[5m]) * 1000) >> >> Now I need to compare during the last 24 hours, how many servers are not >> accessed. >> at the end of the query, I want to compare some epochs so that I will >> give output, but the epoch we need to pass is dynamic. >> >> How to do that? >> >> Any suggestions please? >> >> Thanks & regards, >> Bharath Kumar. >> > -- > 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/e9233a20-a966-4c82-a2e1-1b7a5a665ab4n%40googlegroups.com > <https://groups.google.com/d/msgid/prometheus-users/e9233a20-a966-4c82-a2e1-1b7a5a665ab4n%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/CABbyFmrdmcQNuiqi0_%2B-ZLvM_HSLVeOiKxbx48fAr8e65sGZaw%40mail.gmail.com.

