Identify the received metrics Unit

10 views
Skip to first unread message

Velmurugan C

unread,
Apr 29, 2020, 8:11:30 AM4/29/20
to Prometheus Users
I have grok exporter which takes the application log and provide the metrics to prometheus, 

Application log contains a part as "timetaken=100" where 100 in millisecond unit, Prometheus is getting that as timeTaken=100, for quantile calculation I need this to be in millisecond, how promethues will assume this as milliseconds?

Where we need to mention this values as milliseconds ?


Thanks..

Julius Volz

unread,
Apr 29, 2020, 8:16:30 AM4/29/20
to Velmurugan C, Prometheus Users
Prometheus does not have a built-in notion of units for time series sample values, although there are conventions for putting unit suffixes into metric names (see https://prometheus.io/docs/practices/naming/#metric-names).

For quantile calculation, Prometheus does not need to know the unit at all though - if the input is ms, the output will automatically be ms as well, since units don't come into play anywhere in the quantile calculation.

Just when you display the resulting quantile, you have to know that it's milliseconds (e.g. in Grafana you would configure the Y axis to interpret values as milliseconds).

--
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/e4c6e7f3-2187-4afc-be23-0d236b795e66%40googlegroups.com.

Velmurugan C

unread,
Apr 29, 2020, 9:04:00 AM4/29/20
to Prometheus Users
Thanks Julius


On Wednesday, April 29, 2020 at 5:46:30 PM UTC+5:30, Julius Volz wrote:
Prometheus does not have a built-in notion of units for time series sample values, although there are conventions for putting unit suffixes into metric names (see https://prometheus.io/docs/practices/naming/#metric-names).

For quantile calculation, Prometheus does not need to know the unit at all though - if the input is ms, the output will automatically be ms as well, since units don't come into play anywhere in the quantile calculation.

Just when you display the resulting quantile, you have to know that it's milliseconds (e.g. in Grafana you would configure the Y axis to interpret values as milliseconds).

On Wed, Apr 29, 2020 at 2:11 PM Velmurugan C <cvel...@gmail.com> wrote:
I have grok exporter which takes the application log and provide the metrics to prometheus, 

Application log contains a part as "timetaken=100" where 100 in millisecond unit, Prometheus is getting that as timeTaken=100, for quantile calculation I need this to be in millisecond, how promethues will assume this as milliseconds?

Where we need to mention this values as milliseconds ?


Thanks..

--
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 promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages