Network interface 95th percentile

270 views
Skip to first unread message

Vishnu B

unread,
Aug 17, 2019, 1:07:14 PM8/17/19
to Prometheus Users
Hi, i am trying to create graph for 95th Percentile usage of my network traffic.


Screenshot 2019-08-17 at 10.32.54 PM.png



for the above graph when i use the below query i dont get any data. Can some one help me understand the issue.


histogram_quantile(0.95, sum(rate(ifHCInOctets{instance=~"core1.ash1",ifAlias=~"pl3_166_level3"}[10m]) * 8) ) * 1e3


Regards,

Vishnu


Screenshot 2019-08-17 at 10.32.54 PM.png

Aliaksandr Valialkin

unread,
Aug 17, 2019, 4:13:50 PM8/17/19
to Vishnu B, Prometheus Users
histogram_quantile works only with histograms. You need quantile_over_time instead and subqueries instead.

--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/d31f719b-4710-4cc0-884e-c24c9b8a39d6%40googlegroups.com.


--
Best Regards,

Aliaksandr

Vishnu

unread,
Aug 19, 2019, 2:58:59 AM8/19/19
to Aliaksandr Valialkin, Prometheus Users
Thanks Aliaksandr, i have one last query. when i use the subquery  what should be the time interval? when i use the dashboard time (2days in my below screenshot) i dont get a straight line. Please help.

Screenshot 2019-08-19 at 12.27.43 PM.png

Regards
Vishnu

Aliaksandr Valialkin

unread,
Aug 19, 2019, 10:44:48 AM8/19/19
to Vishnu, Prometheus Users


On Mon, Aug 19, 2019, 09:58 Vishnu <vishnu...@gmail.com> wrote:
Thanks Aliaksandr, i have one last query. when i use the subquery  what should be the time interval? when i use the dashboard time (2days in my below screenshot) i dont get a straight line. Please help.

Start with 30m interval for the subquery, then adjust it as needed. This interval shows the lookback window for calculating the quantile for each point on the graph.

Ben Kochie

unread,
Aug 27, 2019, 1:31:19 PM8/27/19
to Vishnu, Aliaksandr Valialkin, Prometheus Users
I have a long-standing feature request with Grafana to properly display this kind of thing. Right now it doesn't work as you would expect.

Basicaly, the problem right now is that "instant" queries that you would use for a 95th percentile line across a graph are not displayed as a whole line.

Reply all
Reply to author
Forward
0 new messages