On 07.10.21 01:59, PK wrote:
> I am monitoring an application. For which Prometheus server is scraping the 
> matrices at the endpoint along with the timestamp.
> But in prometheus graph It is not getting displayed for timestamps that are 
> differ in millisecond. For eg:
> metric_name{name:"abc"} val1  1633586593322    // 2021-10-07T06:03:13.322Z
> metric_name{name:"abc"} val2  1633586593578    //2021-10-07T06:03:13.578Z
> metric_name{name:"abc"} val3  1633586593983    //2021-10-07T06:03:13.983Z
> metric_name{name:"abc"} val4  1633586594322    //2021-10-07T06:03:14.322Z
> metric_name{name:"abc"} val5  1633586595322    //2021-10-07T06:03:15.322Z
> 
> In The Prometheus graph, it is not showing the second and third time-series 
> data(the second and third are occurring at the same second as the first one 
> but in millisecond is different).  It is showing the first, fourth, and 
> fifth time-series data.

You needed a very high resolution graph to see all those samples. Note
that for a graph, a range query is performed, see
https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries

The step parameter in this query is chosen to match the resolution of
the graph (or even longer if you aren't interested in rendering as
many points as your screen has pixels). I doubt that any grafing
frontend will ever query a step of shorter than 1s.

In any case, you just get one point per step, and it will be the most
recent sample before each point in time.

If you want to inspect the samples actually in the TSDB, you can use
the following trick:

- Go to the "Table" view of the Prometheus Graph UI.
- Type a query like the following:
    metric_name{name:"abc"}[10m]
- You'll see essentially a dump of all the samples in the last 10m.

-- 
Björn Rabenstein
[PGP-ID] 0x851C3DA17D748D03
[email] [email protected]

-- 
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/20211007113518.GR9442%40jahnn.

Reply via email to